diff options
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/MC/AMDGPU/ds.s | 50 | ||||
-rw-r--r-- | llvm/test/MC/AMDGPU/expressions.s | 2 | ||||
-rw-r--r-- | llvm/test/MC/AMDGPU/gfx7_asm_all.s | 38 | ||||
-rw-r--r-- | llvm/test/MC/AMDGPU/gfx8_asm_all.s | 84 | ||||
-rw-r--r-- | llvm/test/MC/Disassembler/AMDGPU/ds_vi.txt | 26 |
5 files changed, 161 insertions, 39 deletions
diff --git a/llvm/test/MC/AMDGPU/ds.s b/llvm/test/MC/AMDGPU/ds.s index d867b137297..f234325c1d4 100644 --- a/llvm/test/MC/AMDGPU/ds.s +++ b/llvm/test/MC/AMDGPU/ds.s @@ -140,24 +140,32 @@ ds_max_f32 v2, v4 // VI: ds_max_f32 v2, v4 ; encoding: [0x00,0x00,0x26,0xd8,0x02,0x04,0x00,0x00] ds_gws_init v2 gds -// SICI: ds_gws_init v2 gds ; encoding: [0x00,0x00,0x66,0xd8,0x02,0x00,0x00,0x00] -// VI: ds_gws_init v2 gds ; encoding: [0x00,0x00,0x33,0xd8,0x02,0x00,0x00,0x00] +// SICI: ds_gws_init v2 gds ; encoding: [0x00,0x00,0x66,0xd8,0x00,0x02,0x00,0x00] +// VI: ds_gws_init v2 gds ; encoding: [0x00,0x00,0x33,0xd9,0x00,0x02,0x00,0x00] -ds_gws_sema_v v2 gds -// SICI: ds_gws_sema_v v2 gds ; encoding: [0x00,0x00,0x6a,0xd8,0x02,0x00,0x00,0x00] -// VI: ds_gws_sema_v v2 gds ; encoding: [0x00,0x00,0x35,0xd8,0x02,0x00,0x00,0x00] +ds_gws_init v3 offset:12345 gds +// SICI: ds_gws_init v3 offset:12345 gds ; encoding: [0x39,0x30,0x66,0xd8,0x00,0x03,0x00,0x00] +// VI: ds_gws_init v3 offset:12345 gds ; encoding: [0x39,0x30,0x33,0xd9,0x00,0x03,0x00,0x00] + +ds_gws_sema_v gds +// SICI: ds_gws_sema_v gds ; encoding: [0x00,0x00,0x6a,0xd8,0x00,0x00,0x00,0x00] +// VI: ds_gws_sema_v gds ; encoding: [0x00,0x00,0x35,0xd9,0x00,0x00,0x00,0x00] + +ds_gws_sema_v offset:257 gds +// SICI: ds_gws_sema_v offset:257 gds ; encoding: [0x01,0x01,0x6a,0xd8,0x00,0x00,0x00,0x00] +// VI: ds_gws_sema_v offset:257 gds ; encoding: [0x01,0x01,0x35,0xd9,0x00,0x00,0x00,0x00] ds_gws_sema_br v2 gds -// SICI: ds_gws_sema_br v2 gds ; encoding: [0x00,0x00,0x6e,0xd8,0x02,0x00,0x00,0x00] -// VI: ds_gws_sema_br v2 gds ; encoding: [0x00,0x00,0x37,0xd8,0x02,0x00,0x00,0x00] +// SICI: ds_gws_sema_br v2 gds ; encoding: [0x00,0x00,0x6e,0xd8,0x00,0x02,0x00,0x00] +// VI: ds_gws_sema_br v2 gds ; encoding: [0x00,0x00,0x37,0xd9,0x00,0x02,0x00,0x00] -ds_gws_sema_p v2 gds -// SICI: ds_gws_sema_p v2 gds ; encoding: [0x00,0x00,0x72,0xd8,0x02,0x00,0x00,0x00] -// VI: ds_gws_sema_p v2 gds ; encoding: [0x00,0x00,0x39,0xd8,0x02,0x00,0x00,0x00] +ds_gws_sema_p gds +// SICI: ds_gws_sema_p gds ; encoding: [0x00,0x00,0x72,0xd8,0x00,0x00,0x00,0x00] +// VI: ds_gws_sema_p gds ; encoding: [0x00,0x00,0x39,0xd9,0x00,0x00,0x00,0x00] ds_gws_barrier v2 gds -// SICI: ds_gws_barrier v2 gds ; encoding: [0x00,0x00,0x76,0xd8,0x02,0x00,0x00,0x00] -// VI: ds_gws_barrier v2 gds ; encoding: [0x00,0x00,0x3b,0xd8,0x02,0x00,0x00,0x00] +// SICI: ds_gws_barrier v2 gds ; encoding: [0x00,0x00,0x76,0xd8,0x00,0x02,0x00,0x00] +// VI: ds_gws_barrier v2 gds ; encoding: [0x00,0x00,0x3b,0xd9,0x00,0x02,0x00,0x00] ds_write_b8 v2, v4 // SICI: ds_write_b8 v2, v4 ; encoding: [0x00,0x00,0x78,0xd8,0x02,0x04,0x00,0x00] @@ -284,17 +292,17 @@ ds_read_u16 v8, v2 // VI: ds_read_u16 v8, v2 ; encoding: [0x00,0x00,0x78,0xd8,0x02,0x00,0x00,0x08] -//ds_consume v8 -// FIXMESICI: ds_consume v8 ; encoding: [0x00,0x00,0xf4,0xd8,0x00,0x00,0x00,0x08] -// FIXMEVI: ds_consume v8 ; encoding: [0x00,0x00,0x7a,0xd8,0x00,0x00,0x00,0x08] +ds_consume v8 +// SICI: ds_consume v8 ; encoding: [0x00,0x00,0xf4,0xd8,0x00,0x00,0x00,0x08] +// VI: ds_consume v8 ; encoding: [0x00,0x00,0x7a,0xd9,0x00,0x00,0x00,0x08] -//ds_append v8 -// FIXMESICI: ds_append v8 ; encoding: [0x00,0x00,0xf8,0xd8,0x00,0x00,0x00,0x08] -// FIXMEVI: ds_append v8 ; encoding: [0x00,0x00,0x7c,0xd8,0x00,0x00,0x00,0x08] +ds_append v8 +// SICI: ds_append v8 ; encoding: [0x00,0x00,0xf8,0xd8,0x00,0x00,0x00,0x08] +// VI: ds_append v8 ; encoding: [0x00,0x00,0x7c,0xd9,0x00,0x00,0x00,0x08] -//ds_ordered_count v8, v2 gds -// FIXMESICI: ds_ordered_count v8, v2 gds ; encoding: [0x00,0x00,0xfe,0xd8,0x02,0x00,0x00,0x08] -// FIXMEVI: ds_ordered_count v8, v2 gds ; encoding: [0x00,0x00,0x7f,0xd8,0x02,0x00,0x00,0x08] +ds_ordered_count v8, v2 gds +// SICI: ds_ordered_count v8, v2 gds ; encoding: [0x00,0x00,0xfe,0xd8,0x02,0x00,0x00,0x08] +// VI: ds_ordered_count v8, v2 gds ; encoding: [0x00,0x00,0x7f,0xd9,0x02,0x00,0x00,0x08] ds_add_u64 v2, v[4:5] // SICI: ds_add_u64 v2, v[4:5] ; encoding: [0x00,0x00,0x00,0xd9,0x02,0x04,0x00,0x00] diff --git a/llvm/test/MC/AMDGPU/expressions.s b/llvm/test/MC/AMDGPU/expressions.s index 9fc956628f1..e593bcd7561 100644 --- a/llvm/test/MC/AMDGPU/expressions.s +++ b/llvm/test/MC/AMDGPU/expressions.s @@ -11,7 +11,7 @@ s_mov_b32 s0, global // Use a token with the same name as a global ds_gws_init v2 gds -// VI: ds_gws_init v2 gds ; encoding: [0x00,0x00,0x33,0xd8,0x02,0x00,0x00,0x00] +// VI: ds_gws_init v2 gds ; encoding: [0x00,0x00,0x33,0xd9,0x00,0x02,0x00,0x00] // Use a global with the same name as a token s_mov_b32 s0, gds diff --git a/llvm/test/MC/AMDGPU/gfx7_asm_all.s b/llvm/test/MC/AMDGPU/gfx7_asm_all.s index 09c4b365ff8..d1d864c3ffe 100644 --- a/llvm/test/MC/AMDGPU/gfx7_asm_all.s +++ b/llvm/test/MC/AMDGPU/gfx7_asm_all.s @@ -456,19 +456,25 @@ ds_max_f32 v1, v2 offset:65535 gds // CHECK: [0xff,0xff,0x4e,0xd8,0x01,0x02,0x00,0x00] ds_gws_init v1 gds -// CHECK: [0x00,0x00,0x66,0xd8,0x01,0x00,0x00,0x00] +// CHECK: [0x00,0x00,0x66,0xd8,0x00,0x01,0x00,0x00] -ds_gws_sema_v v1 gds -// CHECK: [0x00,0x00,0x6a,0xd8,0x01,0x00,0x00,0x00] +ds_gws_sema_v gds +// CHECK: [0x00,0x00,0x6a,0xd8,0x00,0x00,0x00,0x00] ds_gws_sema_br v1 gds -// CHECK: [0x00,0x00,0x6e,0xd8,0x01,0x00,0x00,0x00] +// CHECK: [0x00,0x00,0x6e,0xd8,0x00,0x01,0x00,0x00] -ds_gws_sema_p v1 gds -// CHECK: [0x00,0x00,0x72,0xd8,0x01,0x00,0x00,0x00] +ds_gws_sema_p gds +// CHECK: [0x00,0x00,0x72,0xd8,0x00,0x00,0x00,0x00] ds_gws_barrier v1 gds -// CHECK: [0x00,0x00,0x76,0xd8,0x01,0x00,0x00,0x00] +// CHECK: [0x00,0x00,0x76,0xd8,0x00,0x01,0x00,0x00] + +ds_gws_sema_release_all offset:65535 gds +// CHECK: [0xff,0xff,0x62,0xd8,0x00,0x00,0x00,0x00] + +ds_gws_sema_release_all gds +// CHECK: [0x00,0x00,0x62,0xd8,0x00,0x00,0x00,0x00] ds_write_b8 v1, v2 offset:65535 // CHECK: [0xff,0xff,0x78,0xd8,0x01,0x02,0x00,0x00] @@ -2660,6 +2666,24 @@ ds_max_src2_f64 v1 offset:4 ds_max_src2_f64 v1 offset:65535 gds // CHECK: [0xff,0xff,0x4e,0xdb,0x01,0x00,0x00,0x00] +ds_wrap_rtn_b32 v255, v1, v2, v3 offset:65535 +// CHECK: [0xff,0xff,0xd0,0xd8,0x01,0x02,0x03,0xff] + +ds_wrap_rtn_b32 v255, v1, v2, v3 offset:65535 gds +// CHECK: [0xff,0xff,0xd2,0xd8,0x01,0x02,0x03,0xff] + +ds_wrap_rtn_b32 v255, v1, v2, v3 +// CHECK: [0x00,0x00,0xd0,0xd8,0x01,0x02,0x03,0xff] + +ds_condxchg32_rtn_b64 v[5:6], v1, v[2:3] +// CHECK: [0x00,0x00,0xf8,0xd9,0x01,0x02,0x00,0x05] + +ds_condxchg32_rtn_b64 v[5:6], v1, v[2:3] gds +// CHECK: [0x00,0x00,0xfa,0xd9,0x01,0x02,0x00,0x05] + +ds_condxchg32_rtn_b64 v[5:6], v1, v[254:255] offset:65535 +// CHECK: [0xff,0xff,0xf8,0xd9,0x01,0xfe,0x00,0x05] + exp mrt0, v0, v0, v0, v0 // CHECK: [0x0f,0x00,0x00,0xf8,0x00,0x00,0x00,0x00] diff --git a/llvm/test/MC/AMDGPU/gfx8_asm_all.s b/llvm/test/MC/AMDGPU/gfx8_asm_all.s index 409cafd2832..2580e6c941f 100644 --- a/llvm/test/MC/AMDGPU/gfx8_asm_all.s +++ b/llvm/test/MC/AMDGPU/gfx8_asm_all.s @@ -2678,6 +2678,90 @@ ds_max_src2_f64 v1 offset:4 ds_max_src2_f64 v1 offset:65535 gds // CHECK: [0xff,0xff,0xa7,0xd9,0x01,0x00,0x00,0x00] +ds_and_src2_b32 v1 +// CHECK: [0x00,0x00,0x12,0xd9,0x01,0x00,0x00,0x00] + +ds_and_src2_b32 v1 gds +// CHECK: [0x00,0x00,0x13,0xd9,0x01,0x00,0x00,0x00] + +ds_and_src2_b32 v255 offset:65535 +// CHECK: [0xff,0xff,0x12,0xd9,0xff,0x00,0x00,0x00] + +ds_append v5 +// CHECK: [0x00,0x00,0x7c,0xd9,0x00,0x00,0x00,0x05] + +ds_append v5 gds +// CHECK: [0x00,0x00,0x7d,0xd9,0x00,0x00,0x00,0x05] + +ds_append v255 offset:65535 +// CHECK: [0xff,0xff,0x7c,0xd9,0x00,0x00,0x00,0xff] + +ds_consume v5 +// CHECK: [0x00,0x00,0x7a,0xd9,0x00,0x00,0x00,0x05] + +ds_consume v5 gds +// CHECK: [0x00,0x00,0x7b,0xd9,0x00,0x00,0x00,0x05] + +ds_consume v255 offset:65535 +// CHECK: [0xff,0xff,0x7a,0xd9,0x00,0x00,0x00,0xff] + +ds_ordered_count v5, v1 gds +// CHECK: [0x00,0x00,0x7f,0xd9,0x01,0x00,0x00,0x05] + +ds_ordered_count v5, v255 offset:65535 gds +// CHECK: [0xff,0xff,0x7f,0xd9,0xff,0x00,0x00,0x05] + +ds_ordered_count v5, v255 gds +// CHECK: [0x00,0x00,0x7f,0xd9,0xff,0x00,0x00,0x05] + +ds_gws_barrier v1 gds +// CHECK: [0x00,0x00,0x3b,0xd9,0x00,0x01,0x00,0x00] + +ds_gws_barrier v255 offset:65535 gds +// CHECK: [0xff,0xff,0x3b,0xd9,0x00,0xff,0x00,0x00] + +ds_gws_init v1 gds +// CHECK: [0x00,0x00,0x33,0xd9,0x00,0x01,0x00,0x00] + +ds_gws_init v255 offset:65535 gds +// CHECK: [0xff,0xff,0x33,0xd9,0x00,0xff,0x00,0x00] + +ds_gws_sema_br v1 gds +// CHECK: [0x00,0x00,0x37,0xd9,0x00,0x01,0x00,0x00] + +ds_gws_sema_br v255 offset:65535 gds +// CHECK: [0xff,0xff,0x37,0xd9,0x00,0xff,0x00,0x00] + +ds_gws_sema_p offset:65535 gds +// CHECK: [0xff,0xff,0x39,0xd9,0x00,0x00,0x00,0x00] + +ds_gws_sema_p gds +// CHECK: [0x00,0x00,0x39,0xd9,0x00,0x00,0x00,0x00] + +ds_gws_sema_release_all offset:65535 gds +// CHECK: [0xff,0xff,0x31,0xd9,0x00,0x00,0x00,0x00] + +ds_gws_sema_release_all gds +// CHECK: [0x00,0x00,0x31,0xd9,0x00,0x00,0x00,0x00] + +ds_gws_sema_v offset:65535 gds +// CHECK: [0xff,0xff,0x35,0xd9,0x00,0x00,0x00,0x00] + +ds_gws_sema_v gds +// CHECK: [0x00,0x00,0x35,0xd9,0x00,0x00,0x00,0x00] + +ds_wrap_rtn_b32 v5, v255, v2, v3 gds +// CHECK: [0x00,0x00,0x69,0xd8,0xff,0x02,0x03,0x05] + +ds_wrap_rtn_b32 v5, v255, v2, v255 offset:65535 +// CHECK: [0xff,0xff,0x68,0xd8,0xff,0x02,0xff,0x05] + +ds_condxchg32_rtn_b64 v[5:6], v1, v[254:255] offset:65535 gds +// CHECK: [0xff,0xff,0xfd,0xd8,0x01,0xfe,0x00,0x05] + +ds_condxchg32_rtn_b64 v[5:6], v1, v[254:255] +// CHECK: [0x00,0x00,0xfc,0xd8,0x01,0xfe,0x00,0x05] + exp mrt0, v0, v0, v0, v0 // CHECK: [0x0f,0x00,0x00,0xc4,0x00,0x00,0x00,0x00] diff --git a/llvm/test/MC/Disassembler/AMDGPU/ds_vi.txt b/llvm/test/MC/Disassembler/AMDGPU/ds_vi.txt index 84d55cd7e63..6d910ea5bb5 100644 --- a/llvm/test/MC/Disassembler/AMDGPU/ds_vi.txt +++ b/llvm/test/MC/Disassembler/AMDGPU/ds_vi.txt @@ -81,20 +81,26 @@ # VI: ds_max_f32 v2, v4 ; encoding: [0x00,0x00,0x26,0xd8,0x02,0x04,0x00,0x00] 0x00 0x00 0x26 0xd8 0x02 0x04 0x00 0x00 -# VI: ds_gws_init v2 gds ; encoding: [0x00,0x00,0x33,0xd8,0x02,0x00,0x00,0x00] -0x00 0x00 0x33 0xd8 0x02 0x00 0x00 0x00 +# VI: ds_gws_init v2 gds ; encoding: [0x00,0x00,0x33,0xd9,0x00,0x02,0x00,0x00] +0x00 0x00 0x33 0xd9 0x00 0x02 0x00,0x00 -# VI: ds_gws_sema_v v2 gds ; encoding: [0x00,0x00,0x35,0xd8,0x02,0x00,0x00,0x00] -0x00 0x00 0x35 0xd8 0x02 0x00 0x00 0x00 +# VI: ds_gws_init v3 offset:12345 gds ; encoding: [0x39,0x30,0x33,0xd9,0x00,0x03,0x00,0x00] +0x39 0x30 0x33 0xd9 0x00 0x03 0x00 0x00 -# VI: ds_gws_sema_br v2 gds ; encoding: [0x00,0x00,0x37,0xd8,0x02,0x00,0x00,0x00] -0x00 0x00 0x37 0xd8 0x02 0x00 0x00 0x00 +# VI: ds_gws_sema_v gds ; encoding: [0x00,0x00,0x35,0xd9,0x00,0x00,0x00,0x00] +0x00 0x00 0x35 0xd9 0x00 0x00 0x00 0x00 -# VI: ds_gws_sema_p v2 gds ; encoding: [0x00,0x00,0x39,0xd8,0x02,0x00,0x00,0x00] -0x00 0x00 0x39 0xd8 0x02 0x00 0x00 0x00 +# VI: ds_gws_sema_v offset:257 gds ; encoding: [0x01,0x01,0x35,0xd9,0x00,0x00,0x00,0x00] +0x01 0x01 0x35 0xd9 0x00 0x00 0x00 0x00 -# VI: ds_gws_barrier v2 gds ; encoding: [0x00,0x00,0x3b,0xd8,0x02,0x00,0x00,0x00] -0x00 0x00 0x3b 0xd8 0x02 0x00 0x00 0x00 +# VI: ds_gws_sema_br v2 gds ; encoding: [0x00,0x00,0x37,0xd9,0x00,0x02,0x00,0x00] +0x00 0x00 0x37 0xd9 0x00 0x02 0x00 0x00 + +# VI: ds_gws_sema_p gds ; encoding: [0x00,0x00,0x39,0xd9,0x00,0x00,0x00,0x00] +0x00 0x00 0x39 0xd9 0x00 0x00 0x00 0x00 + +# VI: ds_gws_barrier v2 gds ; encoding: [0x00,0x00,0x3b,0xd9,0x00,0x02,0x00,0x00] +0x00 0x00 0x3b 0xd9 0x00 0x02 0x00 0x00 # VI: ds_write_b8 v2, v4 ; encoding: [0x00,0x00,0x3c,0xd8,0x02,0x04,0x00,0x00] 0x00 0x00 0x3c 0xd8 0x02 0x04 0x00 0x00 |