Tom Stellard | 2b65ed3 | 2015-12-21 18:44:27 +0000 | [diff] [blame^] | 1 | // RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s 2>&1 | FileCheck -check-prefix=SI -check-prefix=GCN %s |
| 2 | // RUN: not llvm-mc -arch=amdgcn -mcpu=hawaii -show-encoding %s | FileCheck -check-prefix=CI %s |
| 3 | // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck -check-prefix=VI %s |
| 4 | |
| 5 | // Add a different RUN line for the failing checks, because when stderr and stdout are mixed the |
| 6 | // order things are printed is not deterministic. |
| 7 | // RUN: not llvm-mc -arch=amdgcn -mcpu=hawaii -show-encoding %s 2>&1 | FileCheck -check-prefix=GCN %s |
| 8 | // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s 2>&1 | FileCheck -check-prefix=GCN %s |
Matt Arsenault | 3b15967 | 2015-12-01 20:31:08 +0000 | [diff] [blame] | 9 | |
| 10 | s_mov_b64 flat_scratch, -1 |
| 11 | // SI: error: invalid operand for instruction |
Tom Stellard | 2b65ed3 | 2015-12-21 18:44:27 +0000 | [diff] [blame^] | 12 | // CI: s_mov_b64 flat_scratch, -1 ; encoding: [0xc1,0x04,0xe8,0xbe] |
| 13 | // VI: s_mov_b64 flat_scratch, -1 ; encoding: [0xc1,0x01,0xe6,0xbe] |
Matt Arsenault | 3b15967 | 2015-12-01 20:31:08 +0000 | [diff] [blame] | 14 | |
| 15 | s_mov_b32 flat_scratch_lo, -1 |
| 16 | // SI: error: invalid operand for instruction |
Tom Stellard | 2b65ed3 | 2015-12-21 18:44:27 +0000 | [diff] [blame^] | 17 | // CI: s_mov_b32 flat_scratch_lo, -1 ; encoding: [0xc1,0x03,0xe8,0xbe] |
| 18 | // VI: s_mov_b32 flat_scratch_lo, -1 ; encoding: [0xc1,0x00,0xe6,0xbe] |
Matt Arsenault | 3b15967 | 2015-12-01 20:31:08 +0000 | [diff] [blame] | 19 | |
| 20 | s_mov_b32 flat_scratch_hi, -1 |
| 21 | // SI: error: invalid operand for instruction |
Tom Stellard | 2b65ed3 | 2015-12-21 18:44:27 +0000 | [diff] [blame^] | 22 | // CI: s_mov_b32 flat_scratch_hi, -1 ; encoding: [0xc1,0x03,0xe9,0xbe] |
| 23 | // VI: s_mov_b32 flat_scratch_hi, -1 ; encoding: [0xc1,0x00,0xe7,0xbe] |
Matt Arsenault | 3b15967 | 2015-12-01 20:31:08 +0000 | [diff] [blame] | 24 | |
| 25 | |
| 26 | s_mov_b64 flat_scratch_lo, -1 |
| 27 | // GCN: error: invalid operand for instruction |
| 28 | |
| 29 | s_mov_b64 flat_scratch_hi, -1 |
| 30 | // GCN: error: invalid operand for instruction |
| 31 | |
| 32 | s_mov_b32 flat_scratch, -1 |
| 33 | // GCN: error: invalid operand for instruction |