mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
add encoder support and tests for rdtscp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96076 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a1e7621510
commit
b779033a23
@ -279,6 +279,7 @@ namespace X86II {
|
||||
MRM_E8 = 39,
|
||||
MRM_F0 = 40,
|
||||
MRM_F8 = 41,
|
||||
MRM_F9 = 42,
|
||||
|
||||
FormMask = 63,
|
||||
|
||||
|
@ -617,6 +617,10 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS,
|
||||
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
|
||||
|
@ -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]
|
||||
|
@ -38,4 +38,7 @@
|
||||
0x0f 0x01 0xc4
|
||||
|
||||
# CHECK: swapgs
|
||||
0x0f 0x01 0xf8
|
||||
0x0f 0x01 0xf8
|
||||
|
||||
# CHECK: rdtscp
|
||||
0x0f 0x01 0xf9
|
Loading…
Reference in New Issue
Block a user