1 # RUN: llvm-mc -triple mips64-unknown-unknown -target-abi o32 -filetype=obj -o - %s | \
2 # RUN: llvm-objdump -d -r -arch=mips64 - | \
3 # RUN: FileCheck -check-prefix=O32 %s
5 # RUN: llvm-mc -triple mips64-unknown-unknown -target-abi o32 %s | \
6 # RUN: FileCheck -check-prefix=ASM %s
8 # RUN: llvm-mc -triple mips64-unknown-unknown -target-abi n32 -filetype=obj -o - %s | \
9 # RUN: llvm-objdump -d -r -t -arch=mips64 - | \
10 # RUN: FileCheck -check-prefix=NXX -check-prefix=N32 %s
12 # RUN: llvm-mc -triple mips64-unknown-unknown -target-abi n32 %s | \
13 # RUN: FileCheck -check-prefix=ASM %s
15 # RUN: llvm-mc -triple mips64-unknown-unknown %s -filetype=obj -o - | \
16 # RUN: llvm-objdump -d -r -t -arch=mips64 - | \
17 # RUN: FileCheck -check-prefix=NXX -check-prefix=N64 %s
19 # RUN: llvm-mc -triple mips64-unknown-unknown %s | \
20 # RUN: FileCheck -check-prefix=ASM %s
25 .cpsetup $25, 8, __cerror
30 # FIXME: Direct object emission for N32 is still under development.
31 # N32 doesn't allow 3 operations to be specified in the same relocation
32 # record like N64 does.
36 # NXX: R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16 __cerror
37 # NXX: addiu $gp, $gp, 0
38 # NXX: R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO16 __cerror
39 # N32: addu $gp, $gp, $25
40 # N64: daddu $gp, $gp, $25
42 # ASM: .cpsetup $25, 8, __cerror
46 .cpsetup $25, $2, __cerror
50 # FIXME: Direct object emission for N32 is still under development.
51 # N32 doesn't allow 3 operations to be specified in the same relocation
52 # record like N64 does.
56 # NXX: R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16 __cerror
57 # NXX: addiu $gp, $gp, 0
58 # NXX: R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO16 __cerror
59 # N32: addu $gp, $gp, $25
60 # N64: daddu $gp, $gp, $25
62 # ASM: .cpsetup $25, $2, __cerror
64 # .cpsetup with local labels (PR22518):
76 # FIXME: Direct object emission for N32 is still under development.
77 # N32 doesn't allow 3 operations to be specified in the same relocation
78 # record like N64 does.
82 # NXX: R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16 $tmp0
83 # NXX: addiu $gp, $gp, 0
84 # NXX: R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO16 $tmp0
85 # N32: addu $gp, $gp, $25
86 # N64: daddu $gp, $gp, $25
91 # ASM: .cpsetup $25, $2, $tmp0
96 .cpsetup $25, 8, __cerror
99 # Testing that .cpsetup expands to nothing in this case
100 # by checking that the next instruction after the first
101 # nop is also a 'nop'.
106 # ASM: .cpsetup $25, 8, __cerror
109 # For .cpsetup with local labels, we need to check if $tmp0 is in the symbol
111 # NXX: .text 00000000 $tmp0