summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/Disassembler/AMDGPU/lit.local.cfg2
-rw-r--r--llvm/test/MC/Disassembler/AMDGPU/mov.txt31
-rw-r--r--llvm/test/MC/Disassembler/AMDGPU/nop.txt4
3 files changed, 37 insertions, 0 deletions
diff --git a/llvm/test/MC/Disassembler/AMDGPU/lit.local.cfg b/llvm/test/MC/Disassembler/AMDGPU/lit.local.cfg
new file mode 100644
index 00000000000..2a665f06be7
--- /dev/null
+++ b/llvm/test/MC/Disassembler/AMDGPU/lit.local.cfg
@@ -0,0 +1,2 @@
+if not 'AMDGPU' in config.root.targets:
+ config.unsupported = True
diff --git a/llvm/test/MC/Disassembler/AMDGPU/mov.txt b/llvm/test/MC/Disassembler/AMDGPU/mov.txt
new file mode 100644
index 00000000000..3b6ba4210b8
--- /dev/null
+++ b/llvm/test/MC/Disassembler/AMDGPU/mov.txt
@@ -0,0 +1,31 @@
+# RUN: llvm-mc -arch=amdgcn -mcpu=tonga -disassemble -show-encoding < %s | FileCheck %s
+
+# CHECK: v_mov_b32_e32 v2, v1 ; encoding: [0x01,0x03,0x04,0x7e]
+0x01 0x03 0x04 0x7e
+
+# CHECK: v_mov_b32_e32 v1, 0.5 ; encoding: [0xf0,0x02,0x02,0x7e]
+0xf0 0x02 0x02 0x7e
+
+# CHECK: v_mov_b32_e32 v15, s100 ; encoding: [0x64,0x02,0x1e,0x7e]
+0x64 0x02 0x1e 0x7e
+
+# CHECK: v_mov_b32_e32 v90, flat_scratch_lo ; encoding: [0x66,0x02,0xb4,0x7e]
+0x66 0x02 0xb4 0x7e
+
+# CHECK: v_mov_b32_e32 v150, vcc_lo ; encoding: [0x6a,0x02,0x2c,0x7f]
+0x6a 0x02 0x2c 0x7f
+
+# CHECK: v_mov_b32_e32 v199, exec_lo ; encoding: [0x7e,0x02,0x8e,0x7f]
+0x7e 0x02 0x8e 0x7f
+
+# CHECK: v_mov_b32_e32 v222, m0 ; encoding: [0x7c,0x02,0xbc,0x7f]
+0x7c 0x02 0xbc 0x7f
+
+# CHECK: v_mov_b32_e32 v255, -13 ; encoding: [0xcd,0x02,0xfe,0x7f]
+0xcd 0x02 0xfe 0x7f
+
+# CHECK: v_cvt_f32_i32_e32 v153, s98 ; encoding: [0x62,0x0a,0x32,0x7f]
+0x62 0x0a 0x32 0x7f
+
+# CHECK: v_cvt_f32_u32_e32 v33, -4.0 ; encoding: [0xf7,0x0c,0x42,0x7e]
+0xf7 0x0c 0x42 0x7e \ No newline at end of file
diff --git a/llvm/test/MC/Disassembler/AMDGPU/nop.txt b/llvm/test/MC/Disassembler/AMDGPU/nop.txt
new file mode 100644
index 00000000000..0305765e6f5
--- /dev/null
+++ b/llvm/test/MC/Disassembler/AMDGPU/nop.txt
@@ -0,0 +1,4 @@
+# RUN: llvm-mc -arch=amdgcn -mcpu=tonga -disassemble -show-encoding < %s | FileCheck %s
+
+# CHECK: v_nop ; encoding: [0x00,0x00,0x00,0x7e]
+0x00 0x00 0x00 0x7e
OpenPOWER on IntegriCloud