Merge pull request #30 from Rot127/ppc_ps_mem_s12

PPC S12 immediates
This commit is contained in:
Wu ChenXu 2023-08-09 23:06:13 +08:00 committed by GitHub
commit d1baa87528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -16,12 +16,13 @@ def PPCDispRID12Operand : AsmOperandClass {
}
def dispRID12 : Operand<iPTR> {
let PrintMethod = "printS12ImmOperand";
let ParserMatchClass = PPCDispRID12Operand;
let OperandType = "OPERAND_IMMEDIATE";
}
def memrid12 : Operand<iPTR> { // Paired Single displacement where imm is 12 bits.
let PrintMethod = "printMemRegImm";
let PrintMethod = "printMemRegImmPS";
let MIOperandInfo = (ops dispRID12:$imm, ptr_rc_nor0:$reg);
let OperandType = "OPERAND_MEMORY";
}

View File

@ -3052,7 +3052,11 @@ void printOpPrintGroupEnum(StringRef const &TargetName,
"SVELogicalImm_int16_t",
"SVELogicalImm_int32_t",
"SVELogicalImm_int64_t",
"ZPRasFPR_128"};
"ZPRasFPR_128"
};
static const std::set<std::string> PPCExceptions = {
"S12ImmOperand", // PS S12 immediates. Used as memory disponent.
};
bool NoExceptions = false;
const std::set<std::string> *Exc;
@ -3060,6 +3064,8 @@ void printOpPrintGroupEnum(StringRef const &TargetName,
Exc = &ARMExceptions;
else if (TargetName == "AArch64")
Exc = &AArch64Exceptions;
else if (TargetName == "PPC")
Exc = &PPCExceptions;
else
NoExceptions = true;