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