summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/mips-traps.s
blob: 65662b31c03ea429a65e13a19d4372bb557d5a24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 --no-show-raw-insn %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 --no-show-raw-insn %t | FileCheck --check-prefix=EL %s

# EB:        8:       sigrie 1
# EL:        8:       sigrie 1

  .text
  lw     $t9, %got(.data)($gp)
  addiu  $a0, $t9, %lo(.data)

  .data
data:
  .word 0
OpenPOWER on IntegriCloud