2001-10-24 Chris Demetriou <cgd@broadcom.com>
[platform/upstream/binutils.git] / gas / testsuite / gas / mips / mips-gp64-fp64-pic.s
1
2         .sdata
3 shared: .word   11
4
5         .data
6 unshared:
7         .word   1
8         .word   2
9         .word   3
10         .word   4
11
12         .text
13         .ent    func
14 func:
15         .set noreorder
16         .cpload $25             # 0000 lui      gp,hi(_gp_disp)
17                                 # 0004 addiu    gp,gp,lo(_gp_disp)
18                                 # 0008 addu     gp,gp,t9
19         .set reorder
20         .cprestore 8            # 000c sw       gp,8(sp)
21         .cpadd $4               # 0010 addu     a0,a0,gp
22         li      $4, 0x12345678  # 0014 lui      a0,0x1234
23                                 # 0018 ori      a0,a0,0x5678
24         la      $4, shared      # 001c lw       a0,got(.sdata)(gp)
25                                 # 0020 nop
26                                 # 0024 addiu    a0,a0,lo(shared)
27         la      $4, unshared    # 0028 lw       a0,got(.data)(gp)
28                                 # 002c nop
29                                 # 0030 addiu    a0,a0,lo(unshared)
30         la      $4, end         # 0034 lw       a0,got(.text)(gp)
31                                 # 0038 nop
32                                 # 003c addiu    a0,a0,lo(end)
33         j       end             # 0040 b        end
34                                 # 0044 nop
35         jal     end             # 0048 lw       t9,got(.text)(gp)
36                                 # 004c nop
37                                 # 0050 addiu    t9,t9,lo(end)
38                                 # 0054 jalr     t9
39                                 # 0058 nop
40                                 # 005c lw       gp,8(sp)
41         lw      $4, shared      # 0060 lw       a0,got(.sdata)(gp)
42                                 # 0064 nop
43                                 # 0068 addiu    a0,a0,lo(shared)
44                                 # 006c lw       a0,(a0)
45         lw      $4, unshared    # 0070 lw       a0,got(.data)(gp)
46                                 # 0074 nop
47                                 # 0078 addiu    a0,a0,lo(unshared)
48                                 # 007c lw       a0,(a0)
49         lw      $4, end         # 0080 lw       a0,got(.text)(gp)
50                                 # 0084 nop
51                                 # 0088 addiu    a0,a0,lo(end)
52                                 # 008c lw       a0,(a0)
53         ld      $4, shared      # 0090 lw       a0,got(.sdata)(gp)
54                                 # 0094 nop
55                                 # 0098 addiu    a0,a0,lo(shared)
56                                 # 009c ld       a0,(a0)
57         ld      $4, unshared    # 00a0 lw       a0,got(.data)(gp)
58                                 # 00a4 nop
59                                 # 00a8 addiu    a0,a0,lo(unshared)
60                                 # 00ac ld       a0,(a0)
61         ld      $4, end         # 00b0 lw       a0,got(.text)(gp)
62                                 # 00b4 nop
63                                 # 00b8 addiu    a0,a0,lo(end)
64                                 # 00bc ld       a0,(a0)
65         sw      $4, shared      # 00c0 lw       at,got(.sdata)(gp)
66                                 # 00c4 nop
67                                 # 00c8 addiu    at,at,lo(shared)
68                                 # 00cc sw       a0,0(at)
69         sw      $4, unshared    # 00d0 lw       at,got(.data)(gp)
70                                 # 00d4 nop
71                                 # 00d8 addiu    at,at,lo(unshared)
72                                 # 00dc sw       a0,0(at)
73         sd      $4, shared      # 00e0 lw       at,got(.sdata)(gp)
74                                 # 00e4 nop
75                                 # 00e8 addiu    at,at,lo(shared)
76                                 # 00ec sd       a0,(at)
77         sd      $4, unshared    # 00f0 lw       at,got(.data)(gp)
78                                 # 00f4 nop
79                                 # 00f8 addiu    at,at,lo(unshared)
80                                 # 00fc sd       a0,(at)
81         ulh     $4, unshared    # 0100 lw       at,got(.data)(gp)
82                                 # 0104 nop
83                                 # 0108 addiu    at,at,lo(unshared)
84                                 # 010c lb       a0,0(at)
85                                 # 0110 lbu      at,1(at)
86                                 # 0114 sll      a0,a0,8
87                                 # 0118 or       a0,a0,at
88         ush     $4, unshared    # 011c lw       at,got(.data)(gp)
89                                 # 0120 nop
90                                 # 0124 addiu    at,at,lo(unshared)
91                                 # 0128 sb       a0,0(at)
92                                 # 012c srl      a0,a0,8
93                                 # 0130 sb       a0,1(at)
94                                 # 0134 lbu      at,0(at)
95                                 # 0138 sll      a0,a0,8
96                                 # 013c or       a0,a0,at
97         ulw     $4, unshared    # 0140 lw       at,got(.data)(gp)
98                                 # 0144 nop
99                                 # 0148 addiu    at,at,lo(unshared)
100                                 # 014c lwl      a0,0(at)
101                                 # 0150 lwr      a0,3(at)
102         usw     $4, unshared    # 0154 lw       at,got(.data)(gp)
103                                 # 0158 nop
104                                 # 015c addiu    at,at,lo(unshared)
105                                 # 0160 swl      a0,0(at)
106                                 # 0164 swr      a0,3(at)
107         li.d    $4, 1.0         # 0168 li       a0,0xffc0
108                                 # 016c dsll32   a0,a0,14
109         li.d    $4, 1.9         # 0170 lw       at,got(.rodata)(gp)
110                                 # 0174 ld       a0,lo(F1.9)(at)
111         li.d    $f0, 1.0        # 0178 li       at,0xffc0
112                                 # 017c dsll32   at,at,14
113                                 # 0180 dmtc1    at,$f0
114         li.d    $f0, 1.9        # 0184 lw       at,got(.rodata)(gp)
115                                 # 0188 ldc1     $f0,lo(L1.9)(at)
116         seq     $4, $5, -100    # 018c daddiu   a0,a1,100
117                                 # 0190 sltiu    a0,a0,1
118         sne     $4, $5, -100    # 0194 daddiu   a0,a1,100
119                                 # 0198 sltu     a0,zero,a0
120         move    $4, $5          # 019c move     a0,a1
121
122         dla     $4, shared      # 01a0 ld       a0,got(.sdata)(gp)
123                                 # 01a4 nop
124                                 # 01a8 addiu    a0,a0,lo(shared) 
125         dla     $4, unshared    # 01ac ld       a0,got(.data)(gp)
126                                 # 01b0 nop
127                                 # 01b4 addiu    a0,a0,lo(unshared)
128         uld     $4, unshared    # 01b8 lw       at,got(.data)(gp)
129                                 # 01bc nop
130                                 # 01c0 addiu    at,at,lo(unshared)
131                                 # 01c4 ldl      a0,0(at)
132                                 # 01c8 ldr      a0,7(at)
133         usd     $4, unshared    # 01cc lw       at,got(.data)(gp)
134                                 # 01d0 nop
135                                 # 01d4 addiu    at,at,lo(unshared)
136                                 # 01d8 sdl      a0,0(at)
137                                 # 01dc sdr      a0,7(at)
138
139         bgt     $4, 0x7fffffff, end     # 01e0 lui      at,0x8000
140                                         # 01e4 slt      at,a0,at
141                                         # 01e8 beqz     at,end
142                                         # 01ec nop
143         bgtu    $4, 0xffffffff, end     # 01f0 li       at,0x8000
144                                         # 01f4 dsll     at,at,17
145                                         # 01f8 sltu     at,a0,at
146                                         # 01fc beqz     at,end
147                                         # 0200 nop
148         ble     $4, 0x7fffffff, end     # 0204 lui      at,0x8000
149                                         # 0208 slt      at,a0,at
150                                         # 020c bnez     at,end
151                                         # 0210 nop
152         bleu    $4, 0xffffffff, end     # 0214 li       at,0x8000
153                                         # 0218 dsll     at,at,17
154                                         # 021c sltu     at,a0,at
155                                         # 0220 bnez     at,end
156                                         # 0224 nop
157
158         add.d   $f1, $f2, $f3   # 0228 add.d    $f1,$f2,$f3
159
160         .end    func
161 end:
162
163 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
164         .space  8