xref: /aosp_15_r20/external/llvm/test/MC/Mips/macro-div-bad.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: not llvm-mc %s -arch=mips -mcpu=mips32r6 2>&1 | \
2*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s --check-prefix=R6
3*9880d681SAndroid Build Coastguard Worker# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64r6 2>&1 | \
4*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s --check-prefix=R6
5*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -arch=mips -mcpu=mips32r2 2>&1 | \
6*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s --check-prefix=NOT-R6
7*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64r2 2>&1 | \
8*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s --check-prefix=NOT-R6
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker  .text
11*9880d681SAndroid Build Coastguard Worker  div $25, $11
12*9880d681SAndroid Build Coastguard Worker  # R6: :[[@LINE-1]]:3: error: instruction requires a CPU feature not currently enabled
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker  div $25, $0
15*9880d681SAndroid Build Coastguard Worker  # NOT-R6: :[[@LINE-1]]:3: warning: division by zero
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker  div $0,$0
18*9880d681SAndroid Build Coastguard Worker  # NOT-R6: :[[@LINE-1]]:3: warning: dividing zero by zero
19