[llvm-commits] [llvm] r96076 - in /llvm/trunk: lib/Target/X86/X86InstrInfo.h lib/Target/X86/X86MCCodeEmitter.cpp test/MC/AsmParser/X86/x86_32-new-encoder.s test/MC/Disassembler/simple-tests.txt
Chris Lattner
sabre at nondot.org
Fri Feb 12 19:42:25 PST 2010
Author: lattner
Date: Fri Feb 12 21:42:24 2010
New Revision: 96076
URL: http://llvm.org/viewvc/llvm-project?rev=96076&view=rev
Log:
add encoder support and tests for rdtscp
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.h
llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp
llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s
llvm/trunk/test/MC/Disassembler/simple-tests.txt
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=96076&r1=96075&r2=96076&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Fri Feb 12 21:42:24 2010
@@ -279,6 +279,7 @@
MRM_E8 = 39,
MRM_F0 = 40,
MRM_F8 = 41,
+ MRM_F9 = 42,
FormMask = 63,
Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=96076&r1=96075&r2=96076&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Fri Feb 12 21:42:24 2010
@@ -617,6 +617,10 @@
EmitByte(BaseOpcode, CurByte, OS);
EmitByte(0xF8, CurByte, OS);
break;
+ case X86II::MRM_F9:
+ EmitByte(BaseOpcode, CurByte, OS);
+ EmitByte(0xF9, CurByte, OS);
+ break;
}
// If there is a remaining operand, it must be a trailing immediate. Emit it
Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s?rev=96076&r1=96075&r2=96076&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_32-new-encoder.s Fri Feb 12 21:42:24 2010
@@ -29,6 +29,11 @@
// CHECK: swapgs
// CHECK: encoding: [0x0f,0x01,0xf8]
+rdtscp
+// CHECK: rdtscp
+// CHECK: encoding: [0x0f,0x01,0xf9]
+
+
// CHECK: movl %eax, 16(%ebp) # encoding: [0x89,0x45,0x10]
movl %eax, 16(%ebp)
// CHECK: movl %eax, -16(%ebp) # encoding: [0x89,0x45,0xf0]
Modified: llvm/trunk/test/MC/Disassembler/simple-tests.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/simple-tests.txt?rev=96076&r1=96075&r2=96076&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/simple-tests.txt (original)
+++ llvm/trunk/test/MC/Disassembler/simple-tests.txt Fri Feb 12 21:42:24 2010
@@ -38,4 +38,7 @@
0x0f 0x01 0xc4
# CHECK: swapgs
-0x0f 0x01 0xf8
\ No newline at end of file
+0x0f 0x01 0xf8
+
+# CHECK: rdtscp
+0x0f 0x01 0xf9
\ No newline at end of file
More information about the llvm-commits
mailing list