mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 00:29:20 +00:00
PTX: Fix if-then-else formatting and add missing asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133447 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b87e37f1b1
commit
cad129bcc0
@ -304,18 +304,16 @@ void PTXInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
// Select the appropriate opcode based on the register class
|
||||
if (RC == PTX::RegI16RegisterClass) {
|
||||
OpCode = PTX::STACKSTOREI16;
|
||||
}
|
||||
else if (RC == PTX::RegI32RegisterClass) {
|
||||
} else if (RC == PTX::RegI32RegisterClass) {
|
||||
OpCode = PTX::STACKSTOREI32;
|
||||
}
|
||||
else if (RC == PTX::RegI64RegisterClass) {
|
||||
} else if (RC == PTX::RegI64RegisterClass) {
|
||||
OpCode = PTX::STACKSTOREI32;
|
||||
}
|
||||
else if (RC == PTX::RegF32RegisterClass) {
|
||||
} else if (RC == PTX::RegF32RegisterClass) {
|
||||
OpCode = PTX::STACKSTOREF32;
|
||||
}
|
||||
else if (RC == PTX::RegF64RegisterClass) {
|
||||
} else if (RC == PTX::RegF64RegisterClass) {
|
||||
OpCode = PTX::STACKSTOREF64;
|
||||
} else {
|
||||
llvm_unreachable("Unknown PTX register class!");
|
||||
}
|
||||
|
||||
// Build the store instruction (really a mov)
|
||||
@ -341,18 +339,16 @@ void PTXInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
// Select the appropriate opcode based on the register class
|
||||
if (RC == PTX::RegI16RegisterClass) {
|
||||
OpCode = PTX::STACKLOADI16;
|
||||
}
|
||||
else if (RC == PTX::RegI32RegisterClass) {
|
||||
} else if (RC == PTX::RegI32RegisterClass) {
|
||||
OpCode = PTX::STACKLOADI32;
|
||||
}
|
||||
else if (RC == PTX::RegI64RegisterClass) {
|
||||
} else if (RC == PTX::RegI64RegisterClass) {
|
||||
OpCode = PTX::STACKLOADI32;
|
||||
}
|
||||
else if (RC == PTX::RegF32RegisterClass) {
|
||||
} else if (RC == PTX::RegF32RegisterClass) {
|
||||
OpCode = PTX::STACKLOADF32;
|
||||
}
|
||||
else if (RC == PTX::RegF64RegisterClass) {
|
||||
} else if (RC == PTX::RegF64RegisterClass) {
|
||||
OpCode = PTX::STACKLOADF64;
|
||||
} else {
|
||||
llvm_unreachable("Unknown PTX register class!");
|
||||
}
|
||||
|
||||
// Build the load instruction (really a mov)
|
||||
|
Loading…
Reference in New Issue
Block a user