diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-10-02 23:38:50 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-10-02 23:38:50 +0000 |
commit | f9e008bf673a8eeb04766bfc99f51068608809d2 (patch) | |
tree | 0deba15e11a758ec5adc15006510f2568294ab29 | |
parent | 8e71e617c9b1e42737ffd00984a5025ec90c734c (diff) | |
download | llvm-f9e008bf673a8eeb04766bfc99f51068608809d2.tar.gz llvm-f9e008bf673a8eeb04766bfc99f51068608809d2.tar.bz2 llvm-f9e008bf673a8eeb04766bfc99f51068608809d2.tar.xz |
Revert 165057, per Jim's request. This requires further discussion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165069 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/MC/MCParser/MCParsedAsmOperand.h | 7 | ||||
-rw-r--r-- | lib/Target/X86/AsmParser/X86AsmParser.cpp | 34 |
2 files changed, 8 insertions, 33 deletions
diff --git a/include/llvm/MC/MCParser/MCParsedAsmOperand.h b/include/llvm/MC/MCParser/MCParsedAsmOperand.h index 06e9dc9065..0ce32d617e 100644 --- a/include/llvm/MC/MCParser/MCParsedAsmOperand.h +++ b/include/llvm/MC/MCParser/MCParsedAsmOperand.h @@ -34,13 +34,6 @@ public: /// isMem - Is this a memory operand? virtual bool isMem() const = 0; - /// isMSAsmWildcard - Is this a wildcard operand? This is specific to - /// MS-style inline assembly and should never happen in normal assembly. - virtual bool isMSAsmWildcard() const { return false; } - - /// setMSAsmWildcard - Convert the operand into a wildcard. - virtual void setMSAsmWildcard(unsigned Size) { } - /// getStartLoc - Get the location of the first token of this operand. virtual SMLoc getStartLoc() const = 0; /// getEndLoc - Get the location of the last token of this operand. diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 2f78b16e44..704d5f9426 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -158,8 +158,7 @@ struct X86Operand : public MCParsedAsmOperand { Token, Register, Immediate, - Memory, - MSAsmWildcard + Memory } Kind; SMLoc StartLoc, EndLoc; @@ -186,10 +185,6 @@ struct X86Operand : public MCParsedAsmOperand { unsigned Scale; unsigned Size; } Mem; - - struct { - unsigned Size; - } MSAsm; }; X86Operand(KindTy K, SMLoc Start, SMLoc End) @@ -323,32 +318,25 @@ struct X86Operand : public MCParsedAsmOperand { bool isMem() const { return Kind == Memory; } bool isMem8() const { - return (Kind == Memory && (!Mem.Size || Mem.Size == 8)) || - (Kind == MSAsmWildcard && MSAsm.Size == 8); + return Kind == Memory && (!Mem.Size || Mem.Size == 8); } bool isMem16() const { - return (Kind == Memory && (!Mem.Size || Mem.Size == 16)) || - (Kind == MSAsmWildcard && MSAsm.Size == 16); + return Kind == Memory && (!Mem.Size || Mem.Size == 16); } bool isMem32() const { - return (Kind == Memory && (!Mem.Size || Mem.Size == 32)) || - (Kind == MSAsmWildcard && MSAsm.Size == 32); + return Kind == Memory && (!Mem.Size || Mem.Size == 32); } bool isMem64() const { - return (Kind == Memory && (!Mem.Size || Mem.Size == 64)) || - (Kind == MSAsmWildcard && MSAsm.Size == 64); + return Kind == Memory && (!Mem.Size || Mem.Size == 64); } bool isMem80() const { - return (Kind == Memory && (!Mem.Size || Mem.Size == 80)) || - (Kind == MSAsmWildcard && MSAsm.Size == 80); + return Kind == Memory && (!Mem.Size || Mem.Size == 80); } bool isMem128() const { - return (Kind == Memory && (!Mem.Size || Mem.Size == 128)) || - (Kind == MSAsmWildcard && MSAsm.Size == 128); + return Kind == Memory && (!Mem.Size || Mem.Size == 128); } bool isMem256() const { - return (Kind == Memory && (!Mem.Size || Mem.Size == 256)) || - (Kind == MSAsmWildcard && MSAsm.Size == 256); + return Kind == Memory && (!Mem.Size || Mem.Size == 256); } bool isMemVX32() const { @@ -375,12 +363,6 @@ struct X86Operand : public MCParsedAsmOperand { bool isReg() const { return Kind == Register; } - bool isMSAsmWildcard() const { return Kind == MSAsmWildcard; } - void setMSAsmWildcard(unsigned Size) { - Kind = MSAsmWildcard; - this->MSAsm.Size = Size; - } - void addExpr(MCInst &Inst, const MCExpr *Expr) const { // Add as immediates when possible. if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr)) |