75 lines · plain
1// RUN: llvm-mc -triple=amdgcn -mcpu=gfx810 -show-encoding %s | FileCheck -check-prefix=PACKED %s2// RUN: llvm-mc -triple=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefix=PACKED %s3 4// RUN: not llvm-mc -triple=amdgcn -mcpu=fiji 2>&1 %s | FileCheck -check-prefix=UNPACKED-ERR --implicit-check-not=error: %s5 6 7//===----------------------------------------------------------------------===//8// Buffer Format Instructions.9//===----------------------------------------------------------------------===//10 11buffer_load_format_d16_x v1, off, s[4:7], s112// 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], s115// PACKED: buffer_load_format_d16_xy v1, off, s[4:7], s1 ; encoding: [0x00,0x00,0x24,0xe0,0x00,0x01,0x01,0x01]16// UNPACKED-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode17 18buffer_load_format_d16_xyz v[1:2], off, s[4:7], s119// 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: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode21 22buffer_load_format_d16_xyzw v[1:2], off, s[4:7], s123// 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: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode25 26buffer_store_format_d16_x v1, off, s[4:7], s127// 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], s130// PACKED: buffer_store_format_d16_xy v1, off, s[4:7], s1 ; encoding: [0x00,0x00,0x34,0xe0,0x00,0x01,0x01,0x01]31// UNPACKED-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode32 33buffer_store_format_d16_xyz v[1:2], off, s[4:7], s134// 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: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode36 37buffer_store_format_d16_xyzw v[1:2], off, s[4:7], s138// 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: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode40 41 42//===----------------------------------------------------------------------===//43// TBuffer Format Instructions.44//===----------------------------------------------------------------------===//45 46tbuffer_load_format_d16_x v1, off, s[4:7], dfmt:15, nfmt:2, s147// PACKED: tbuffer_load_format_d16_x v1, off, s[4:7], s1 format:[BUF_DATA_FORMAT_RESERVED_15,BUF_NUM_FORMAT_USCALED] ; encoding: [0x00,0x00,0x7c,0xe9,0x00,0x01,0x01,0x01]48 49tbuffer_load_format_d16_xy v1, off, s[4:7], dfmt:15, nfmt:2, s150// PACKED: tbuffer_load_format_d16_xy v1, off, s[4:7], s1 format:[BUF_DATA_FORMAT_RESERVED_15,BUF_NUM_FORMAT_USCALED] ; encoding: [0x00,0x80,0x7c,0xe9,0x00,0x01,0x01,0x01]51// UNPACKED-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode52 53tbuffer_load_format_d16_xyz v[1:2], off, s[4:7], dfmt:15, nfmt:2, s154// PACKED: tbuffer_load_format_d16_xyz v[1:2], off, s[4:7], s1 format:[BUF_DATA_FORMAT_RESERVED_15,BUF_NUM_FORMAT_USCALED] ; encoding: [0x00,0x00,0x7d,0xe9,0x00,0x01,0x01,0x01]55// UNPACKED-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode56 57tbuffer_load_format_d16_xyzw v[1:2], off, s[4:7], dfmt:15, nfmt:2, s158// PACKED: tbuffer_load_format_d16_xyzw v[1:2], off, s[4:7], s1 format:[BUF_DATA_FORMAT_RESERVED_15,BUF_NUM_FORMAT_USCALED] ; encoding: [0x00,0x80,0x7d,0xe9,0x00,0x01,0x01,0x01]59// UNPACKED-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode60 61tbuffer_store_format_d16_x v1, off, s[4:7], dfmt:15, nfmt:2, s162// PACKED: tbuffer_store_format_d16_x v1, off, s[4:7], s1 format:[BUF_DATA_FORMAT_RESERVED_15,BUF_NUM_FORMAT_USCALED] ; encoding: [0x00,0x00,0x7e,0xe9,0x00,0x01,0x01,0x01]63 64tbuffer_store_format_d16_xy v1, off, s[4:7], dfmt:15, nfmt:2, s165// PACKED: tbuffer_store_format_d16_xy v1, off, s[4:7], s1 format:[BUF_DATA_FORMAT_RESERVED_15,BUF_NUM_FORMAT_USCALED] ; encoding: [0x00,0x80,0x7e,0xe9,0x00,0x01,0x01,0x01]66// UNPACKED-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode67 68tbuffer_store_format_d16_xyz v[1:2], off, s[4:7], dfmt:15, nfmt:2, s169// PACKED: tbuffer_store_format_d16_xyz v[1:2], off, s[4:7], s1 format:[BUF_DATA_FORMAT_RESERVED_15,BUF_NUM_FORMAT_USCALED] ; encoding: [0x00,0x00,0x7f,0xe9,0x00,0x01,0x01,0x01]70// UNPACKED-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode71 72tbuffer_store_format_d16_xyzw v[1:2], off, s[4:7], dfmt:15, nfmt:2, s173// PACKED: tbuffer_store_format_d16_xyzw v[1:2], off, s[4:7], s1 format:[BUF_DATA_FORMAT_RESERVED_15,BUF_NUM_FORMAT_USCALED] ; encoding: [0x00,0x80,0x7f,0xe9,0x00,0x01,0x01,0x01]74// UNPACKED-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode75