xref: /aosp_15_r20/external/llvm/test/MC/X86/mpx-encodings.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple x86_64-- -mattr=+mpx --show-encoding %s |\
2*9880d681SAndroid Build Coastguard Worker// RUN:   FileCheck %s --check-prefixes=CHECK,ENCODING
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple x86_64-- -mattr=+mpx -filetype=obj %s |\
5*9880d681SAndroid Build Coastguard Worker// RUN:   llvm-objdump -d - -mattr=+mpx | FileCheck %s
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker// CHECK: bndmk (%rax), %bnd0
8*9880d681SAndroid Build Coastguard Worker// ENCODING:  encoding: [0xf3,0x48,0x0f,0x1b,0x00]
9*9880d681SAndroid Build Coastguard Workerbndmk (%rax), %bnd0
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker// CHECK: bndmk 1024(%rax), %bnd1
12*9880d681SAndroid Build Coastguard Worker// ENCODING:  encoding: [0xf3,0x48,0x0f,0x1b,0x88,0x00,0x04,0x00,0x00]
13*9880d681SAndroid Build Coastguard Workerbndmk 1024(%rax), %bnd1
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker// CHECK: bndmov  %bnd2, %bnd1
16*9880d681SAndroid Build Coastguard Worker// ENCODING:  encoding: [0x66,0x0f,0x1b,0xd1]
17*9880d681SAndroid Build Coastguard Workerbndmov %bnd2, %bnd1
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker// CHECK: bndmov %bnd1, 1024(%r9)
20*9880d681SAndroid Build Coastguard Worker// ENCODING:  encoding: [0x66,0x49,0x0f,0x1b,0x89,0x00,0x04,0x00,0x00]
21*9880d681SAndroid Build Coastguard Workerbndmov %bnd1, 1024(%r9)
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Worker// CHECK: bndstx %bnd1, 1024(%rax)
24*9880d681SAndroid Build Coastguard Worker// ENCODING:  encoding: [0x0f,0x1b,0x88,0x00,0x04,0x00,0x00]
25*9880d681SAndroid Build Coastguard Workerbndstx %bnd1, 1024(%rax)
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Worker// CHECK: bndldx 1024(%r8), %bnd1
28*9880d681SAndroid Build Coastguard Worker// ENCODING:  encoding: [0x41,0x0f,0x1a,0x88,0x00,0x04,0x00,0x00]
29*9880d681SAndroid Build Coastguard Workerbndldx 1024(%r8), %bnd1
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Worker// CHECK: bndcl 121(%r10), %bnd1
32*9880d681SAndroid Build Coastguard Worker// ENCODING:  encoding: [0xf3,0x49,0x0f,0x1a,0x4a,0x79]
33*9880d681SAndroid Build Coastguard Workerbndcl 121(%r10), %bnd1
34*9880d681SAndroid Build Coastguard Worker
35*9880d681SAndroid Build Coastguard Worker// CHECK: bndcn 121(%rcx), %bnd3
36*9880d681SAndroid Build Coastguard Worker// ENCODING:  encoding: [0xf2,0x48,0x0f,0x1b,0x59,0x79]
37*9880d681SAndroid Build Coastguard Workerbndcn 121(%rcx), %bnd3
38*9880d681SAndroid Build Coastguard Worker
39*9880d681SAndroid Build Coastguard Worker// CHECK: bndcu %rdx, %bnd3
40*9880d681SAndroid Build Coastguard Worker// ENCODING:  encoding: [0xf2,0x48,0x0f,0x1a,0xda]
41*9880d681SAndroid Build Coastguard Workerbndcu %rdx, %bnd3
42