136 lines · plain
1// RUN: not llvm-mc -triple=thumbv8m.main -mattr=+fp-armv8 -mattr=+cdecp0 -mattr=+cdecp1 -show-encoding < %s 2>%t | FileCheck %s2// RUN: FileCheck <%t --check-prefixes=ERROR,ERROR-FP %s3// RUN: not llvm-mc -triple=thumbv8m.main -mattr=+fp-armv8d16sp -mattr=+cdecp0 -mattr=+cdecp1 -show-encoding < %s 2>%t | FileCheck %s4// RUN: FileCheck <%t --check-prefixes=ERROR,ERROR-FP %s5// RUN: not llvm-mc -triple=thumbv8.1m.main -mattr=+mve -mattr=+cdecp0 -mattr=+cdecp1 -show-encoding < %s 2>%t | FileCheck --check-prefixes=CHECK,CHECK-MVE %s6// RUN: FileCheck <%t --check-prefixes=ERROR,ERROR-MVE %s7 8// CHECK-LABEL: test_predication:9test_predication:10ittt eq11// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: instructions in IT block must be predicable12vcx1a p1, s7, #204713// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: instructions in IT block must be predicable14vcx2 p0, d0, d15, #015// ERROR-FP: [[@LINE+2]]:{{[0-9]+}}: error: instruction requires: mve16// ERROR-MVE: [[@LINE+1]]:{{[0-9]+}}: error: instructions in IT block must be predicable17vcx3 p0, q0, q7, q0, #1218nop19nop20nop21 22// CHECK-LABEL: test_vcx1:23test_vcx1:24// CHECK-NEXT: vcx1 p0, s11, #1234 @ encoding: [0x69,0xec,0x92,0x50]25vcx1 p0, s11, #123426// CHECK-NEXT: vcx1a p1, s7, #2047 @ encoding: [0x6f,0xfc,0xbf,0x31]27vcx1a p1, s7, #204728// CHECK-NEXT: vcx1 p0, d0, #0 @ encoding: [0x20,0xed,0x00,0x00]29vcx1 p0, d0, #030// CHECK-NEXT: vcx1a p1, d3, #2047 @ encoding: [0x2f,0xfd,0xbf,0x31]31vcx1a p1, d3, #204732// CHECK-MVE-NEXT: vcx1 p0, q1, #1234 @ encoding: [0x29,0xec,0xd2,0x20]33// ERROR-FP: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction, any one of the following would fix this:34vcx1 p0, q1, #123435// CHECK-MVE-NEXT: vcx1a p1, q5, #4095 @ encoding: [0x2f,0xfd,0xff,0xa1]36// ERROR-FP: [[@LINE+1]]:{{[0-9]+}}: error: instruction requires: mve37vcx1a p1, q5, #409538 39// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction40vcx1a p1, s7, s7, #204741// ERROR-FP: [[@LINE+4]]:{{[0-9]+}}: error: operand must be an immediate in the range [0,2047]42// ERROR-MVE: [[@LINE+3]]:{{[0-9]+}}: error: invalid instruction, any one of the following would fix this43// ERROR-MVE: [[@LINE+2]]:{{[0-9]+}}: note: operand must be a register in range [q0, q7]44// ERROR-MVE: [[@LINE+1]]:{{[0-9]+}}: note: operand must be an immediate in the range [0,2047]45vcx1 p0, d0, #204846// ERROR-FP: [[@LINE+1]]:{{[0-9]+}}: error: operand must be an immediate in the range [0,2047]47vcx1a p1, s0, #204848// ERROR-FP: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction49vcx1 p0, q0, #409650// ERROR-FP: [[@LINE+2]]:{{[0-9]+}}: error: coprocessor must be in the range [p0, p7]51// ERROR-MVE: [[@LINE+1]]:{{[0-9]+}}: error: invalid operand for instruction52vcx1 p8, d0, #123453// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction54vcx1 p0, d16, #123455// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction56vcx1 p0, s32, #123457// ERROR-FP: [[@LINE+7]]:{{[0-9]+}}: error: invalid instruction, any one of the following would fix this:58// ERROR-FP: [[@LINE+6]]:{{[0-9]+}}: note: operand must be a register in range [s0, s31]59// ERROR-FP: [[@LINE+5]]:{{[0-9]+}}: note: operand must be a register in range [d0, d15]60// ERROR-MVE: [[@LINE+4]]:{{[0-9]+}}: error: invalid instruction, any one of the following would fix this:61// ERROR-MVE: [[@LINE+3]]:{{[0-9]+}}: note: operand must be a register in range [q0, q7]62// ERROR-MVE: [[@LINE+2]]:{{[0-9]+}}: note: operand must be a register in range [s0, s31]63// ERROR-MVE: [[@LINE+1]]:{{[0-9]+}}: note: operand must be a register in range [d0, d15]64vcx1 p0, q8, #123465// ERROR: [[@LINE+3]]:{{[0-9]+}}: error: invalid instruction, any one of the following would fix this:66// ERROR: [[@LINE+2]]:{{[0-9]+}}: note: operand must be a register in range [s0, s31]67// ERROR: [[@LINE+1]]:{{[0-9]+}}: note: operand must be a register in range [d0, d15]68vcx1 p0, r0, #123469// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction70vcx1 p0, d0, d0, #071// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction72vcx1a p0, d0, d2, #073 74// CHECK-LABEL: test_vcx2:75test_vcx2:76// CHECK-NEXT: vcx2 p0, s0, s31, #12 @ encoding: [0x33,0xec,0x2f,0x00]77vcx2 p0, s0, s31, #1278// CHECK-NEXT: vcx2a p0, s1, s1, #63 @ encoding: [0x7f,0xfc,0xb0,0x00]79vcx2a p0, s1, s1, #6380// CHECK-NEXT: vcx2 p0, d0, d15, #0 @ encoding: [0x30,0xed,0x0f,0x00]81vcx2 p0, d0, d15, #082// CHECK-NEXT: vcx2a p0, d1, d11, #63 @ encoding: [0x3f,0xfd,0x9b,0x10]83vcx2a p0, d1, d11, #6384// CHECK-MVE: vcx2 p1, q0, q6, #123 @ encoding: [0x3e,0xed,0xdc,0x01]85vcx2 p1, q0, q6, #12386// CHECK-MVE: vcx2a p1, q3, q7, #127 @ encoding: [0x3f,0xfd,0xde,0x61]87vcx2a p1, q3, q7, #12788 89// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: operand must be an immediate in the range [0,63]90vcx2 p0, d0, d1, #6491// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: operand must be an immediate in the range [0,63]92vcx2a p0, s3, s1, #6493// ERROR-MVE: [[@LINE+2]]:{{[0-9]+}}: error: operand must be an immediate in the range [0,127]94// ERROR-FP: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction95vcx2a p0, q1, q5, #12896// ERROR-FP: [[@LINE+1]]:{{[0-9]+}}: error: operand must be a register in range [d0, d15]97vcx2 p1, d0, q2, #098// ERROR-FP: [[@LINE+1]]:{{[0-9]+}}: error: operand must be a register in range [s0, s31]99vcx2a p1, q2, s3, #0100// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction101vcx2 p1, d0, d0, d2, #0102// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction103vcx2a p1, q2, q3, q1, #0104 105// CHECK-LABEL: test_vcx3:106test_vcx3:107// CHECK-NEXT: vcx3 p0, s0, s31, s0, #1 @ encoding: [0x8f,0xec,0x90,0x00]108vcx3 p0, s0, s31, s0, #1109// CHECK-NEXT: vcx3a p1, s1, s17, s11, #7 @ encoding: [0xf8,0xfc,0xb5,0x01]110vcx3a p1, s1, s17, s11, #7111// CHECK-NEXT: vcx3 p0, d0, d15, d7, #0 @ encoding: [0x8f,0xed,0x07,0x00]112vcx3 p0, d0, d15, d7, #0113// CHECK-NEXT: vcx3a p1, d1, d11, d11, #7 @ encoding: [0xbb,0xfd,0x1b,0x11]114vcx3a p1, d1, d11, d11, #7115// CHECK-MVE-NEXT: vcx3 p0, q0, q2, q0, #12 @ encoding: [0xa4,0xed,0x40,0x00]116vcx3 p0, q0, q2, q0, #12117// CHECK-MVE-NEXT: vcx3a p1, q3, q7, q6, #15 @ encoding: [0xbe,0xfd,0x5c,0x61]118vcx3a p1, q3, q7, q6, #15119 120// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: operand must be an immediate in the range [0,7]121vcx3a p1, d1, d11, d12, #8122// ERROR-MVE: [[@LINE+2]]:{{[0-9]+}}: error: operand must be an immediate in the range [0,15]123// ERROR-FP: error: invalid instruction124vcx3a p1, q1, q2, q3, #16125// ERROR-MVE: [[@LINE+2]]:{{[0-9]+}}: error: operand must be a register in range [d0, d15]126// ERROR-FP: [[@LINE+1]]:{{[0-9]+}}: error: operand must be a register in range [d0, d15]127vcx3 p0, d0, q0, d7, #1128// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: operand must be a register in range [s0, s31]129vcx3a p1, s0, s1, d3, #2130// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction131vcx3a p0, s0, d0, q0, #2132// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction133vcx3 p0, s0, s0, s31, s0, #1134// ERROR: [[@LINE+1]]:{{[0-9]+}}: error: invalid instruction135vcx3a p1, d1, d3, d22, d22, #7136