xref: /aosp_15_r20/external/llvm/test/MC/Mips/mips32r3/invalid.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# Instructions that are valid for the current ISA but should be rejected by the assembler (e.g.
2*9880d681SAndroid Build Coastguard Worker# invalid set of operands or operand's restrictions not met).
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker# RUN: not llvm-mc %s -triple=mips-unknown-linux -mcpu=mips32r3 2>%t1
5*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s < %t1
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker        .text
8*9880d681SAndroid Build Coastguard Worker        .set noreorder
9*9880d681SAndroid Build Coastguard Worker        cache -1, 255($7)    # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
10*9880d681SAndroid Build Coastguard Worker        cache 32, 255($7)    # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
11*9880d681SAndroid Build Coastguard Worker        jalr.hb $31          # CHECK: :[[@LINE]]:9: error: source and destination must be different
12*9880d681SAndroid Build Coastguard Worker        jalr.hb $31, $31     # CHECK: :[[@LINE]]:9: error: source and destination must be different
13*9880d681SAndroid Build Coastguard Worker        pref -1, 255($7)     # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
14*9880d681SAndroid Build Coastguard Worker        pref 32, 255($7)     # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
15