mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
[ms-inline asm] Have the target AsmParser create the asmrewrite for the offsetof
operator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e5372d6565
commit
6e43157b5d
@ -3667,12 +3667,6 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
|
||||
AsmStrRewrites.push_back(AsmRewrite(AOK_SizeDirective,
|
||||
Operand->getStartLoc(), 0,
|
||||
Operand->getMemSize()));
|
||||
|
||||
// Don't emit the offset directive.
|
||||
if (Operand->isOffsetOf())
|
||||
AsmStrRewrites.push_back(AsmRewrite(AOK_Skip,
|
||||
Operand->getOffsetOfLoc(), 7));
|
||||
|
||||
if (isOutput) {
|
||||
std::string Constraint = "=";
|
||||
++InputIdx;
|
||||
|
@ -886,6 +886,9 @@ X86Operand *X86AsmParser::ParseIntelOffsetOfOperator(SMLoc Start) {
|
||||
|
||||
End = Parser.getTok().getLoc();
|
||||
|
||||
// Don't emit the offset operator.
|
||||
InstInfo->AsmRewrites->push_back(AsmRewrite(AOK_Skip, OffsetOfLoc, 7));
|
||||
|
||||
// The offset operator will have an 'r' constraint, thus we need to create
|
||||
// register operand to ensure proper matching. Just pick a GPR based on
|
||||
// the size of a pointer.
|
||||
|
Loading…
Reference in New Issue
Block a user