1 # RUN: llvm-mc -show-encoding -triple mips-unknown-unknown %s \
2 # RUN: | FileCheck %s -check-prefix=CHECK-ENC
4 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s \
5 # RUN: | llvm-objdump -disassemble - | FileCheck %s -check-prefix=CHECK-INSTR
7 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s \
8 # RUN: | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-REL
11 # Check that 1 is added to the high 16 bits if bit 15 of the low part is 1.
16 # CHECK-ENC: # encoding: [0x3c,0x04,0xde,0xae]
17 # CHECK-ENC: # encoding: [0x80,0x82,0xbe,0xef]
20 # Check that assembler can handle %hi(label1 - label2) and %lo(label1 - label2)
24 # Emit zeros so that difference between $L3 and $L1 is 0x30124 bytes.
28 addiu $
4, $
4, %lo
($L3-$L1
)
29 # CHECK-INSTR: lui $4, 3
30 # CHECK-INSTR: addiu $4, $4, 292
34 lw $
5, %lo
($L2-$L3
)($
5)
35 # CHECK-INSTR: lui $5, 0
36 # CHECK-INSTR: lw $5, -8($5)
39 # Check that relocation isn't emitted for %hi(label1 - label2) and
40 # %lo(label1 - label2) expressions.
42 # CHECK-REL-NOT: R_MIPS