1# Instructions that are valid for the current ISA but should be rejected by the assembler (e.g. 2# invalid set of operands or operand's restrictions not met). 3 4# RUN: not llvm-mc %s -triple=mips64-unknown-linux -mcpu=mips64r2 2>%t1 5# RUN: FileCheck %s < %t1 6 7 .text 8 .set noreorder 9 andi $2, $3, -1 # CHECK: :[[@LINE]]:22: error: expected 16-bit unsigned immediate 10 andi $2, $3, 65536 # CHECK: :[[@LINE]]:22: error: expected 16-bit unsigned immediate 11 cache -1, 255($7) # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate 12 cache 32, 255($7) # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate 13 dext $2, $3, -1, 1 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 14 dext $2, $3, 64, 1 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 15 dext $2, $3, 1, 0 # CHECK: :[[@LINE]]:25: error: expected immediate in range 1 .. 32 16 dext $2, $3, 32, 33 # CHECK: :[[@LINE]]:26: error: expected immediate in range 1 .. 32 17 dextm $2, $3, -1, 1 # CHECK: :[[@LINE]]:23: error: expected 5-bit unsigned immediate 18 dextm $2, $3, 32, 1 # CHECK: :[[@LINE]]:23: error: expected 5-bit unsigned immediate 19 dextm $2, $3, -1, 33 # CHECK: :[[@LINE]]:23: error: expected 5-bit unsigned immediate 20 dextm $2, $3, 32, 33 # CHECK: :[[@LINE]]:23: error: expected 5-bit unsigned immediate 21 dextm $2, $3, 1, 32 # CHECK: :[[@LINE]]:26: error: expected immediate in range 33 .. 64 22 dextm $2, $3, 1, 65 # CHECK: :[[@LINE]]:26: error: expected immediate in range 33 .. 64 23 dextm $3, $4, 31, 34 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: size plus position are not in the range 33 .. 64 24 dextu $2, $3, 31, 1 # CHECK: :[[@LINE]]:23: error: expected immediate in range 32 .. 63 25 dextu $2, $3, 64, 1 # CHECK: :[[@LINE]]:23: error: expected immediate in range 32 .. 63 26 dextu $2, $3, 32, 0 # CHECK: :[[@LINE]]:27: error: expected immediate in range 1 .. 32 27 dextu $2, $3, 32, 33 # CHECK: :[[@LINE]]:27: error: expected immediate in range 1 .. 32 28 dextu $3, $4, 33, 32 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: size plus position are not in the range 33 .. 64 29 dins $2, $3, -1, 1 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 30 dins $2, $3, 64, 1 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 31 dins $2, $3, 1, -1 # CHECK: :[[@LINE]]:25: error: expected immediate in range 1 .. 32 32 dinsm $2, $3, -1, 1 # CHECK: :[[@LINE]]:23: error: expected 5-bit unsigned immediate 33 dinsm $2, $3, 32, 1 # CHECK: :[[@LINE]]:23: error: expected 5-bit unsigned immediate 34 dinsm $2, $3, 0, 1 # CHECK: :[[@LINE]]:26: error: expected immediate in range 2 .. 64 35 dinsm $2, $3, 0, 65 # CHECK: :[[@LINE]]:26: error: expected immediate in range 2 .. 64 36 dinsm $4, $5, 31, 34 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: size plus position are not in the range 33 .. 64 37 dinsu $2, $3, 31, 1 # CHECK: :[[@LINE]]:23: error: expected immediate in range 32 .. 63 38 dinsu $2, $3, 64, 1 # CHECK: :[[@LINE]]:23: error: expected immediate in range 32 .. 63 39 dinsu $2, $3, 32, 0 # CHECK: :[[@LINE]]:27: error: expected immediate in range 1 .. 32 40 dinsu $2, $3, 32, 33 # CHECK: :[[@LINE]]:27: error: expected immediate in range 1 .. 32 41 dinsu $4, $5, 33, 32 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: size plus position are not in the range 33 .. 64 42 drotr $2, $3, -1 # CHECK: :[[@LINE]]:23: error: expected 6-bit unsigned immediate 43 drotr $2, $3, 64 # CHECK: :[[@LINE]]:23: error: expected 6-bit unsigned immediate 44 drotr32 $2, $3, -1 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate 45 drotr32 $2, $3, 32 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate 46 dsll $2, $3, -1 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 47 dsll $2, $3, 64 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 48 dsll32 $2, $3, -1 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 49 dsll32 $2, $3, 32 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 50 dsrl $2, $3, -1 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 51 dsrl $2, $3, 64 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 52 dsrl32 $2, $3, -1 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 53 dsrl32 $2, $3, 64 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 54 dsra $2, $3, -1 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 55 dsra $2, $3, 64 # CHECK: :[[@LINE]]:22: error: expected 6-bit unsigned immediate 56 dsra32 $2, $3, -1 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 57 dsra32 $2, $3, 64 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 58 # FIXME: Check '0 < pos + size <= 32' constraint on ext 59 ext $2, $3, -1, 1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 60 ext $2, $3, 32, 1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 61 ext $2, $3, 1, 0 # CHECK: :[[@LINE]]:24: error: expected immediate in range 1 .. 32 62 ext $2, $3, 1, 33 # CHECK: :[[@LINE]]:24: error: expected immediate in range 1 .. 32 63 # FIXME: Check size on ins 64 ins $2, $3, -1, 1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 65 ins $2, $3, 32, 1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 66 jalr.hb $31 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: source and destination must be different 67 jalr.hb $31, $31 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: source and destination must be different 68 ori $2, $3, -1 # CHECK: :[[@LINE]]:21: error: expected 16-bit unsigned immediate 69 ori $2, $3, 65536 # CHECK: :[[@LINE]]:21: error: expected 16-bit unsigned immediate 70 pref -1, 255($7) # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate 71 pref 32, 255($7) # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate 72 sll $2, $3, -1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 73 sll $2, $3, 32 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 74 srl $2, $3, -1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 75 srl $2, $3, 32 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 76 sra $2, $3, -1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 77 sra $2, $3, 32 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate 78 rotr $2, $3, -1 # CHECK: :[[@LINE]]:22: error: expected 5-bit unsigned immediate 79 rotr $2, $3, 32 # CHECK: :[[@LINE]]:22: error: expected 5-bit unsigned immediate 80 xori $2, $3, -1 # CHECK: :[[@LINE]]:22: error: expected 16-bit unsigned immediate 81 xori $2, $3, 65536 # CHECK: :[[@LINE]]:22: error: expected 16-bit unsigned immediate 82