1# RUN: not llvm-mc %s -triple mips-unknown-linux-gnu -mcpu=mips32 \
2# RUN:                --position-independent -filetype=obj -o /dev/null 2>&1 \
3# RUN:  | FileCheck %s -check-prefix=O32
4
5# RUN: llvm-mc %s -triple mips64-unknown-linux-gnu -filetype=obj \
6# RUN:            -o /dev/null 2>&1 \
7# RUN:   | FileCheck %s -allow-empty -check-prefix=N64
8
9# RUN: llvm-mc %s -triple mips64-unknown-linux-gnuabin32 -filetype=obj \
10# RUN:            -o /dev/null 2>&1 \
11# RUN:   | FileCheck %s -allow-empty -check-prefix=N32
12
13# RUN: llvm-mc %s -triple mips64-unknown-linux-gnuabin32 -filetype=obj -o - \
14# RUN:   | llvm-objdump -d -r - | FileCheck %s --check-prefix=NO-STORE
15
16# RUN: llvm-mc %s -triple mips64-unknown-linux-gnu -filetype=obj -o - \
17# RUN:   | llvm-objdump -d -r - | FileCheck %s --check-prefix=NO-STORE
18
19  .text
20  .ent foo
21foo:
22  .frame  $sp, 0, $ra
23  .set noreorder
24  .set noat
25
26  .cpload $25
27  .cprestore 8
28# O32-NOT: error: pseudo-instruction requires $at, which is not available
29# N32-NOT: error: pseudo-instruction requires $at, which is not available
30# N64-NOT: error: pseudo-instruction requires $at, which is not available
31# NO-STORE-NOT: sw  $gp, 8($sp)
32
33  jal $25
34  jal $4, $25
35  jal foo
36
37  .end foo
38
39  .ent bar
40bar:
41  .frame  $sp, 0, $ra
42  .set noreorder
43  .set noat
44
45  .cpload $25
46  .cprestore 65536
47# O32: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
48# N32-NOT: error: pseudo-instruction requires $at, which is not available
49# N64-NOT: error: pseudo-instruction requires $at, which is not available
50# NO-STORE-NOT: sw $gp,
51
52  jal $25
53  jal $4, $25
54  jal bar
55
56  .end bar
57