[llvm-branch-commits] [llvm-branch] r113896 - in /llvm/branches/release_28: ./ lib/Target/X86/AsmParser/X86AsmParser.cpp test/MC/AsmParser/X86/x86_instructions.s
Bill Wendling
isanbard at gmail.com
Tue Sep 14 16:38:48 PDT 2010
Author: void
Date: Tue Sep 14 18:38:48 2010
New Revision: 113896
URL: http://llvm.org/viewvc/llvm-project?rev=113896&view=rev
Log:
Approved by Chris
$ svn merge -c 113894 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r113894 into '.':
U test/MC/AsmParser/X86/x86_instructions.s
U lib/Target/X86/AsmParser/X86AsmParser.cpp
Log:
add a terrible hack to allow out with dx is parens, a gas bug.
This fixes PR8114
Modified:
llvm/branches/release_28/ (props changed)
llvm/branches/release_28/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/branches/release_28/test/MC/AsmParser/X86/x86_instructions.s
Propchange: llvm/branches/release_28/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 14 18:38:48 2010
@@ -1,2 +1,2 @@
/llvm/branches/Apple/Pertwee:110850,110961
-/llvm/trunk:113057,113109,113123,113146,113158,113255,113257,113260,113297,113299,113303,113322,113345,113365-113366,113394,113483-113485,113557,113576,113637,113764,113820,113828
+/llvm/trunk:113057,113109,113123,113146,113158,113255,113257,113260,113297,113299,113303,113322,113345,113365-113366,113394,113483-113485,113557,113576,113637,113764,113820,113828,113894
Modified: llvm/branches/release_28/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_28/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=113896&r1=113895&r2=113896&view=diff
==============================================================================
--- llvm/branches/release_28/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/branches/release_28/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue Sep 14 18:38:48 2010
@@ -815,6 +815,20 @@
Operands.erase(Operands.begin() + 1);
}
+ // FIXME: Hack to handle "out[bwl]? %al, (%dx)" -> "outb %al, %dx".
+ if ((Name == "outb" || Name == "outw" || Name == "outl" || Name == "out") &&
+ Operands.size() == 3) {
+ X86Operand &Op = *(X86Operand*)Operands.back();
+ if (Op.isMem() && Op.Mem.SegReg == 0 &&
+ isa<MCConstantExpr>(Op.Mem.Disp) &&
+ cast<MCConstantExpr>(Op.Mem.Disp)->getValue() == 0 &&
+ Op.Mem.BaseReg == MatchRegisterName("dx") && Op.Mem.IndexReg == 0) {
+ SMLoc Loc = Op.getEndLoc();
+ Operands.back() = X86Operand::CreateReg(Op.Mem.BaseReg, Loc, Loc);
+ delete &Op;
+ }
+ }
+
// FIXME: Hack to handle "f{mul*,add*,sub*,div*} $op, st(0)" the same as
// "f{mul*,add*,sub*,div*} $op"
if ((Name.startswith("fmul") || Name.startswith("fadd") ||
Modified: llvm/branches/release_28/test/MC/AsmParser/X86/x86_instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_28/test/MC/AsmParser/X86/x86_instructions.s?rev=113896&r1=113895&r2=113896&view=diff
==============================================================================
--- llvm/branches/release_28/test/MC/AsmParser/X86/x86_instructions.s (original)
+++ llvm/branches/release_28/test/MC/AsmParser/X86/x86_instructions.s Tue Sep 14 18:38:48 2010
@@ -164,3 +164,12 @@
// CHECK: imull %ecx, %eax
imull %ecx, %eax
+
+// PR8114
+// CHECK: outb %al, %dx
+// CHECK: outw %ax, %dx
+// CHECK: outl %eax, %dx
+
+out %al, (%dx)
+out %ax, (%dx)
+outl %eax, (%dx)
More information about the llvm-branch-commits
mailing list