[llvm-commits] [llvm] r148316 - in /llvm/trunk: test/MC/X86/intel-syntax.s utils/TableGen/AsmMatcherEmitter.cpp

Devang Patel dpatel at apple.com
Tue Jan 17 10:30:46 PST 2012


Author: dpatel
Date: Tue Jan 17 12:30:45 2012
New Revision: 148316

URL: http://llvm.org/viewvc/llvm-project?rev=148316&view=rev
Log:
Intel syntax: Ignore mnemonic aliases.

Modified:
    llvm/trunk/test/MC/X86/intel-syntax.s
    llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp

Modified: llvm/trunk/test/MC/X86/intel-syntax.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/intel-syntax.s?rev=148316&r1=148315&r2=148316&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/intel-syntax.s (original)
+++ llvm/trunk/test/MC/X86/intel-syntax.s Tue Jan 17 12:30:45 2012
@@ -1,5 +1,10 @@
 // RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel %s | FileCheck %s
 
+_test:
+	xor	EAX, EAX
+	ret
+
+_main:
 // CHECK:	movl	$257, -4(%rsp)
 	mov	DWORD PTR [RSP - 4], 257
 // CHECK:	movq	$123, -16(%rsp)
@@ -16,3 +21,6 @@
 	mov	RCX, QWORD PTR [0]
 // CHECK:	movl	-24(%rsp,%rax,4), %eax	
 	mov	EAX, DWORD PTR [RSP + 4*RAX - 24]
+// CHECK:	callq	_test
+	call	_test
+	ret

Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=148316&r1=148315&r2=148316&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Tue Jan 17 12:30:45 2012
@@ -2388,7 +2388,9 @@
 
   if (HasMnemonicAliases) {
     OS << "  // Process all MnemonicAliases to remap the mnemonic.\n";
-    OS << "  applyMnemonicAliases(Mnemonic, AvailableFeatures);\n\n";
+    OS << "  // FIXME : Add an entry in AsmParserVariant to check this.\n";
+    OS << "  if (!VariantID)\n";
+    OS << "    applyMnemonicAliases(Mnemonic, AvailableFeatures);\n\n";
   }
 
   // Emit code to compute the class list for this operand vector.





More information about the llvm-commits mailing list