mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
[inline asm] Implement mayLoad and mayStore for inline assembly. In general,
the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation. For inline assembly, however, we need to compute these based on the constraints. Revert r166929 as this is no longer needed, but leave the test case in place. rdar://12033048 and PR13504 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167040 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -707,8 +707,9 @@ void MachineVerifier::verifyInlineAsm(const MachineInstr *MI) {
|
||||
report("Asm string must be an external symbol", MI);
|
||||
if (!MI->getOperand(1).isImm())
|
||||
report("Asm flags must be an immediate", MI);
|
||||
// Allowed flags are Extra_HasSideEffects = 1, and Extra_IsAlignStack = 2.
|
||||
if (!isUInt<2>(MI->getOperand(1).getImm()))
|
||||
// Allowed flags are Extra_HasSideEffects = 1, Extra_IsAlignStack = 2,
|
||||
// Extra_AsmDialect = 4, Extra_MayLoad = 8, and Extra_MayStore = 16.
|
||||
if (!isUInt<5>(MI->getOperand(1).getImm()))
|
||||
report("Unknown asm flags", &MI->getOperand(1), 1);
|
||||
|
||||
assert(InlineAsm::MIOp_FirstOperand == 2 && "Asm format changed");
|
||||
|
||||
Reference in New Issue
Block a user