[llvm-commits] [llvm] r103015 - in /llvm/trunk: lib/Target/X86/AsmParser/X86AsmParser.cpp test/MC/AsmParser/X86/x86_64-suffix-matching.s
Daniel Dunbar
daniel at zuster.org
Tue May 4 10:31:02 PDT 2010
Author: ddunbar
Date: Tue May 4 12:31:02 2010
New Revision: 103015
URL: http://llvm.org/viewvc/llvm-project?rev=103015&view=rev
Log:
MC/X86: Chris pointed that 'as' isn't consistent in accepting the long form of
instructions which have no direct register usage.
Darwin 'as' accepts:
add $0, (%rax)
but rejects
mov $0, (%rax)
for example.
Given that, only accept suffix matches which match exactly one form. We still
need to emit nice diagnostics for failures...
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/trunk/test/MC/AsmParser/X86/x86_64-suffix-matching.s
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=103015&r1=103014&r2=103015&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue May 4 12:31:02 2010
@@ -683,11 +683,6 @@
if (MatchB + MatchW + MatchL == 2)
return false;
- // Similarly, if all three matched then we assume this is a generic operation
- // involving memory, and take the 'l' form (to match 'gas').
- if (MatchB + MatchW + MatchL == 0)
- return false;
-
// Otherwise, the match failed.
return true;
}
Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-suffix-matching.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-suffix-matching.s?rev=103015&r1=103014&r2=103015&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_64-suffix-matching.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_64-suffix-matching.s Tue May 4 12:31:02 2010
@@ -4,5 +4,3 @@
add $0, %eax
// CHECK: addb $255, %al
add $0xFF, %al
-// CHECK: addl $0, (%rax)
- add $0, 0(%rax)
More information about the llvm-commits
mailing list