diff options
Diffstat (limited to 'test/ELF/mips-traps.s')
-rw-r--r-- | test/ELF/mips-traps.s | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/ELF/mips-traps.s b/test/ELF/mips-traps.s new file mode 100644 index 000000000000..783d1f298374 --- /dev/null +++ b/test/ELF/mips-traps.s @@ -0,0 +1,22 @@ +# Check trap instruction encoding. + +# REQUIRES: mips + +# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r6 -o %t.o %s +# RUN: ld.lld -r -o %t %t.o %t.o +# RUN: llvm-objdump -d -r %t | FileCheck --check-prefix=EB %s + +# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux -mcpu=mips32r6 -o %t.o %s +# RUN: ld.lld -r -o %t %t.o %t.o +# RUN: llvm-objdump -d -r %t | FileCheck --check-prefix=EL %s + +# EB: 8: 04 17 00 01 sigrie 1 +# EL: 8: 01 00 17 04 sigrie 1 + + .text + lw $t9, %got(.data)($gp) + addiu $a0, $t9, %lo(.data) + + .data +data: + .word 0 |