diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-08-25 22:23:38 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-08-25 22:23:38 +0000 |
commit | 18854173720bef72b1edb1be8485331cffa987d0 (patch) | |
tree | e3f5321adcdaea3dbfed4530abf29bebbbff2a9c /llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp | |
parent | a3644d60463b1d9e03c08384b0e279a9bd80236e (diff) | |
download | bcm5719-llvm-18854173720bef72b1edb1be8485331cffa987d0.tar.gz bcm5719-llvm-18854173720bef72b1edb1be8485331cffa987d0.zip |
First round of fixes for the x86 fixes for the x86 move accumulator from/to memory offset instructions.
-Assembly parser now properly check the size of the memory operation specified in intel syntax. So 'mov word ptr [5], al' is no longer accepted.
-x86-32 disassembly of these instructions no longer sign extends the 32-bit address immediate based on size.
-Intel syntax printing prints the ptr size and places brackets around the address immediate.
Known remaining issues with these instructions:
-Segment override prefix is not supported. PR16962 and PR16961.
-Immediate size should be changed by address size prefix.
llvm-svn: 189201
Diffstat (limited to 'llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp b/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp index b9d008209e5..44393115cc4 100644 --- a/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp +++ b/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp @@ -215,3 +215,19 @@ void X86ATTInstPrinter::printMemReference(const MCInst *MI, unsigned Op, O << markup(">"); } + +void X86ATTInstPrinter::printMemOffset(const MCInst *MI, unsigned Op, + raw_ostream &O) { + const MCOperand &DispSpec = MI->getOperand(Op); + + O << markup("<mem:"); + + if (DispSpec.isImm()) { + O << formatImm(DispSpec.getImm()); + } else { + assert(DispSpec.isExpr() && "non-immediate displacement?"); + O << *DispSpec.getExpr(); + } + + O << markup(">"); +} |