mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
PTX: Add support for i8 type and introduce associated .b8 registers
The i8 type is required for boolean values, but can only use ld, st and mov instructions. The i1 type continues to be used for predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133814 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,6 +33,7 @@ static const struct map_entry {
|
||||
const TargetRegisterClass *cls;
|
||||
const int opcode;
|
||||
} map[] = {
|
||||
{ &PTX::RegI8RegClass, PTX::MOVU8rr },
|
||||
{ &PTX::RegI16RegClass, PTX::MOVU16rr },
|
||||
{ &PTX::RegI32RegClass, PTX::MOVU32rr },
|
||||
{ &PTX::RegI64RegClass, PTX::MOVU64rr },
|
||||
@@ -302,7 +303,9 @@ void PTXInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
int OpCode;
|
||||
|
||||
// Select the appropriate opcode based on the register class
|
||||
if (RC == PTX::RegI16RegisterClass) {
|
||||
if (RC == PTX::RegI8RegisterClass) {
|
||||
OpCode = PTX::STACKSTOREI8;
|
||||
} else if (RC == PTX::RegI16RegisterClass) {
|
||||
OpCode = PTX::STACKSTOREI16;
|
||||
} else if (RC == PTX::RegI32RegisterClass) {
|
||||
OpCode = PTX::STACKSTOREI32;
|
||||
@@ -337,7 +340,9 @@ void PTXInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
int OpCode;
|
||||
|
||||
// Select the appropriate opcode based on the register class
|
||||
if (RC == PTX::RegI16RegisterClass) {
|
||||
if (RC == PTX::RegI8RegisterClass) {
|
||||
OpCode = PTX::STACKLOADI8;
|
||||
} else if (RC == PTX::RegI16RegisterClass) {
|
||||
OpCode = PTX::STACKLOADI16;
|
||||
} else if (RC == PTX::RegI32RegisterClass) {
|
||||
OpCode = PTX::STACKLOADI32;
|
||||
|
Reference in New Issue
Block a user