mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Recognize monitor/mwait with explicit register arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125805 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c788f44642
commit
5ad596f9d2
@ -3673,6 +3673,14 @@ let Uses = [ECX, EAX] in
|
||||
def MWAITrr : I<0x01, MRM_C9, (outs), (ins), "mwait", []>, TB,
|
||||
Requires<[HasSSE3]>;
|
||||
|
||||
def : InstAlias<"mwait %eax, %ecx", (MWAITrr)>, Requires<[In32BitMode]>;
|
||||
def : InstAlias<"mwait %rax, %rcx", (MWAITrr)>, Requires<[In64BitMode]>;
|
||||
|
||||
def : InstAlias<"monitor %eax, %ecx, %edx", (MONITORrrr)>,
|
||||
Requires<[In32BitMode]>;
|
||||
def : InstAlias<"monitor %rax, %rcx, %rdx", (MONITORrrr)>,
|
||||
Requires<[In64BitMode]>;
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
// Non-Instruction Patterns
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
@ -14,9 +14,15 @@
|
||||
// CHECK: encoding: [0x0f,0xae,0xf0]
|
||||
monitor
|
||||
// CHECK: monitor
|
||||
// CHECK: encoding: [0x0f,0x01,0xc8]
|
||||
monitor %eax, %ecx, %edx
|
||||
// CHECK: monitor
|
||||
// CHECK: encoding: [0x0f,0x01,0xc8]
|
||||
mwait
|
||||
// CHECK: mwait
|
||||
// CHECK: encoding: [0x0f,0x01,0xc9]
|
||||
mwait %eax, %ecx
|
||||
// CHECK: mwait
|
||||
// CHECK: encoding: [0x0f,0x01,0xc9]
|
||||
|
||||
vmcall
|
||||
|
@ -2,6 +2,18 @@
|
||||
// RUN: FileCheck < %t %s
|
||||
// RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s
|
||||
|
||||
monitor
|
||||
// CHECK: monitor
|
||||
// CHECK: encoding: [0x0f,0x01,0xc8]
|
||||
monitor %rax, %rcx, %rdx
|
||||
// CHECK: monitor
|
||||
// CHECK: encoding: [0x0f,0x01,0xc8]
|
||||
mwait
|
||||
// CHECK: mwait
|
||||
// CHECK: encoding: [0x0f,0x01,0xc9]
|
||||
mwait %rax, %rcx
|
||||
// CHECK: mwait
|
||||
// CHECK: encoding: [0x0f,0x01,0xc9]
|
||||
|
||||
// Suffix inference:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user