1// RUN: llvm-mc -arch=amdgcn -mcpu=gfx810 -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=PACKED %s 2// RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=PACKED %s 3 4// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding 2>&1 %s | FileCheck -check-prefix=UNPACKED-ERR -check-prefix=GCN-ERR %s 5 6 7//===----------------------------------------------------------------------===// 8// Buffer Format Instructions. 9//===----------------------------------------------------------------------===// 10 11buffer_load_format_d16_x v1, off, s[4:7], s1 12// PACKED: buffer_load_format_d16_x v1, off, s[4:7], s1 ; encoding: [0x00,0x00,0x20,0xe0,0x00,0x01,0x01,0x01] 13 14buffer_load_format_d16_xy v1, off, s[4:7], s1 15// PACKED: buffer_load_format_d16_xy v1, off, s[4:7], s1 ; encoding: [0x00,0x00,0x24,0xe0,0x00,0x01,0x01,0x01] 16// UNPACKED-ERR: error: instruction not supported on this GPU 17 18buffer_load_format_d16_xyz v[1:2], off, s[4:7], s1 19// PACKED: buffer_load_format_d16_xyz v[1:2], off, s[4:7], s1 ; encoding: [0x00,0x00,0x28,0xe0,0x00,0x01,0x01,0x01] 20// UNPACKED-ERR: error: instruction not supported on this GPU 21 22buffer_load_format_d16_xyzw v[1:2], off, s[4:7], s1 23// PACKED: buffer_load_format_d16_xyzw v[1:2], off, s[4:7], s1 ; encoding: [0x00,0x00,0x2c,0xe0,0x00,0x01,0x01,0x01] 24// UNPACKED-ERR: error: instruction not supported on this GPU 25 26buffer_store_format_d16_x v1, off, s[4:7], s1 27// PACKED: buffer_store_format_d16_x v1, off, s[4:7], s1 ; encoding: [0x00,0x00,0x30,0xe0,0x00,0x01,0x01,0x01] 28 29buffer_store_format_d16_xy v1, off, s[4:7], s1 30// PACKED: buffer_store_format_d16_xy v1, off, s[4:7], s1 ; encoding: [0x00,0x00,0x34,0xe0,0x00,0x01,0x01,0x01] 31// UNPACKED-ERR: error: instruction not supported on this GPU 32 33buffer_store_format_d16_xyz v[1:2], off, s[4:7], s1 34// PACKED: buffer_store_format_d16_xyz v[1:2], off, s[4:7], s1 ; encoding: [0x00,0x00,0x38,0xe0,0x00,0x01,0x01,0x01] 35// UNPACKED-ERR: error: instruction not supported on this GPU 36 37buffer_store_format_d16_xyzw v[1:2], off, s[4:7], s1 38// PACKED: buffer_store_format_d16_xyzw v[1:2], off, s[4:7], s1 ; encoding: [0x00,0x00,0x3c,0xe0,0x00,0x01,0x01,0x01] 39// UNPACKED-ERR: error: instruction not supported on this GPU 40 41 42//===----------------------------------------------------------------------===// 43// TBuffer Format Instructions. 44//===----------------------------------------------------------------------===// 45 46tbuffer_load_format_d16_x v1, off, s[4:7], dfmt:15, nfmt:2, s1 47// PACKED: tbuffer_load_format_d16_x v1, off, s[4:7], dfmt:15, nfmt:2, s1 ; encoding: [0x00,0x00,0x7c,0xe9,0x00,0x01,0x01,0x01] 48 49tbuffer_load_format_d16_xy v1, off, s[4:7], dfmt:15, nfmt:2, s1 50// PACKED: tbuffer_load_format_d16_xy v1, off, s[4:7], dfmt:15, nfmt:2, s1 ; encoding: [0x00,0x80,0x7c,0xe9,0x00,0x01,0x01,0x01] 51// UNPACKED-ERR: error: instruction not supported on this GPU 52 53tbuffer_load_format_d16_xyz v[1:2], off, s[4:7], dfmt:15, nfmt:2, s1 54// PACKED: tbuffer_load_format_d16_xyz v[1:2], off, s[4:7], dfmt:15, nfmt:2, s1 ; encoding: [0x00,0x00,0x7d,0xe9,0x00,0x01,0x01,0x01] 55// UNPACKED-ERR: error: instruction not supported on this GPU 56 57tbuffer_load_format_d16_xyzw v[1:2], off, s[4:7], dfmt:15, nfmt:2, s1 58// PACKED: tbuffer_load_format_d16_xyzw v[1:2], off, s[4:7], dfmt:15, nfmt:2, s1 ; encoding: [0x00,0x80,0x7d,0xe9,0x00,0x01,0x01,0x01] 59// UNPACKED-ERR: error: instruction not supported on this GPU 60 61tbuffer_store_format_d16_x v1, off, s[4:7], dfmt:15, nfmt:2, s1 62// PACKED: tbuffer_store_format_d16_x v1, off, s[4:7], dfmt:15, nfmt:2, s1 ; encoding: [0x00,0x00,0x7e,0xe9,0x00,0x01,0x01,0x01] 63 64tbuffer_store_format_d16_xy v1, off, s[4:7], dfmt:15, nfmt:2, s1 65// PACKED: tbuffer_store_format_d16_xy v1, off, s[4:7], dfmt:15, nfmt:2, s1 ; encoding: [0x00,0x80,0x7e,0xe9,0x00,0x01,0x01,0x01] 66// UNPACKED-ERR: error: instruction not supported on this GPU 67 68tbuffer_store_format_d16_xyz v[1:2], off, s[4:7], dfmt:15, nfmt:2, s1 69// PACKED: tbuffer_store_format_d16_xyz v[1:2], off, s[4:7], dfmt:15, nfmt:2, s1 ; encoding: [0x00,0x00,0x7f,0xe9,0x00,0x01,0x01,0x01] 70// UNPACKED-ERR: error: instruction not supported on this GPU 71 72tbuffer_store_format_d16_xyzw v[1:2], off, s[4:7], dfmt:15, nfmt:2, s1 73// PACKED: tbuffer_store_format_d16_xyzw v[1:2], off, s[4:7], dfmt:15, nfmt:2, s1 ; encoding: [0x00,0x80,0x7f,0xe9,0x00,0x01,0x01,0x01] 74// UNPACKED-ERR: error: instruction not supported on this GPU 75