mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
[ms-inline asm] Address the FIXME in AsmParser.cpp.
// FIXME: Constraints are hard coded to 'm', but we need an 'r' // constraint for addressof. This needs to be cleaned up! Test cases are already in place. Specifically, clang/test/CodeGen/ms-inline-asm.c t15(), t16(), and t24(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1727,7 +1727,7 @@ static void emitConvertFuncs(CodeGenTarget &Target, StringRef ClassName,
|
||||
<< " default: llvm_unreachable(\"invalid conversion entry!\");\n"
|
||||
<< " case CVT_Reg:\n"
|
||||
<< " Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);\n"
|
||||
<< " Operands[*(p + 1)]->setConstraint(\"m\");\n"
|
||||
<< " Operands[*(p + 1)]->setConstraint(\"r\");\n"
|
||||
<< " ++NumMCOperands;\n"
|
||||
<< " break;\n"
|
||||
<< " case CVT_Tied:\n"
|
||||
@@ -1830,9 +1830,13 @@ static void emitConvertFuncs(CodeGenTarget &Target, StringRef ClassName,
|
||||
|
||||
// Add a handler for the operand number lookup.
|
||||
OpOS << " case " << Name << ":\n"
|
||||
<< " Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);\n"
|
||||
<< " Operands[*(p + 1)]->setConstraint(\"m\");\n"
|
||||
<< " NumMCOperands += " << OpInfo.MINumOperands << ";\n"
|
||||
<< " Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);\n";
|
||||
|
||||
if (Op.Class->isRegisterClass())
|
||||
OpOS << " Operands[*(p + 1)]->setConstraint(\"r\");\n";
|
||||
else
|
||||
OpOS << " Operands[*(p + 1)]->setConstraint(\"m\");\n";
|
||||
OpOS << " NumMCOperands += " << OpInfo.MINumOperands << ";\n"
|
||||
<< " break;\n";
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user