Commit | Line | Data |
---|---|---|
dc462216 RS |
1 | |
2 | .sdata | |
3 | shared: .4byte 11 | |
4 | ||
5 | .data | |
6 | .size unshared,16 | |
7 | unshared: | |
8 | .4byte 1 | |
9 | .4byte 2 | |
10 | .4byte 3 | |
11 | .4byte 4 | |
12 | ||
13 | .text | |
14 | .ent func | |
15 | func: | |
dc462216 RS |
16 | .set noreorder |
17 | .cpload $25 # 0000 lui gp,hi(_gp_disp) | |
18 | # 0004 addiu gp,gp,lo(_gp_disp) | |
19 | # 0008 addu gp,gp,t9 | |
20 | .set reorder | |
21 | .cprestore 8 # 000c sw gp,8(sp) | |
22 | .cpadd $4 # 0010 addu a0,a0,gp | |
23 | li $4, 0x12345678 # 0014 lui a0,0x1234 | |
24 | # 0018 ori a0,a0,0x5678 | |
25 | la $4, shared # 001c lw a0,got(.sdata)(gp) | |
26 | # 0020 nop | |
27 | # 0024 addiu a0,a0,lo(shared) | |
28 | la $4, unshared # 0028 lw a0,got(.data)(gp) | |
29 | # 002c nop | |
30 | # 0030 addiu a0,a0,lo(unshared) | |
31 | la $4, end # 0034 lw a0,got(.text)(gp) | |
32 | # 0038 nop | |
33 | # 003c addiu a0,a0,lo(end) | |
34 | j end # 0040 b end | |
35 | # 0044 nop | |
36 | jal end # 0048 lw t9,got(.text)(gp) | |
37 | # 004c nop | |
38 | # 0050 addiu t9,t9,lo(end) | |
39 | # 0054 jalr t9 | |
40 | # 0058 nop | |
41 | # 005c lw gp,8(sp) | |
42 | lw $4, shared # 0060 lw a0,got(.sdata)(gp) | |
43 | # 0064 nop | |
44 | # 0068 addiu a0,a0,lo(shared) | |
45 | # 006c lw a0,(a0) | |
46 | lw $4, unshared # 0070 lw a0,got(.data)(gp) | |
47 | # 0074 nop | |
48 | # 0078 addiu a0,a0,lo(unshared) | |
49 | # 007c lw a0,(a0) | |
50 | lw $4, end # 0080 lw a0,got(.text)(gp) | |
51 | # 0084 nop | |
52 | # 0088 addiu a0,a0,lo(end) | |
53 | # 008c lw a0,(a0) | |
54 | ld $4, shared # 0090 lw at,got(.sdata)(gp) | |
55 | # 0094 nop | |
56 | # 0098 lw a0,lo(shared)(at) | |
57 | # 009c lw a1,lo(shared)+4(at) | |
58 | ld $4, unshared # 00a0 lw at,got(.data)(gp) | |
59 | # 00a4 nop | |
60 | # 00a8 lw a0,lo(unshared)(at) | |
61 | # 00ac lw a1,lo(unshared)+4(at) | |
62 | ld $4, end # 00b0 lw at,got(.text)(gp) | |
63 | # 00b4 nop | |
64 | # 00b8 lw a0,lo(end)(at) | |
65 | # 00bc lw a1,lo(end)+4(at) | |
66 | sw $4, shared # 00c0 lw at,got(.sdata)(gp) | |
67 | # 00c4 nop | |
68 | # 00c8 addiu at,at,lo(shared) | |
69 | # 00cc sw a0,0(at) | |
70 | sw $4, unshared # 00d0 lw at,got(.data)(gp) | |
71 | # 00d4 nop | |
72 | # 00d8 addiu at,at,lo(unshared) | |
73 | # 00dc sw a0,0(at) | |
74 | sd $4, shared # 00e0 lw at,got(.sdata)(gp) | |
75 | # 00e4 nop | |
76 | # 00e8 sw a0,lo(shared)(at) | |
77 | # 00ec sw a1,lo(shared)+4(at) | |
78 | sd $4, unshared # 00f0 lw at,got(.data)(gp) | |
79 | # 00f4 nop | |
80 | # 00f8 sw a0,lo(unshared)(at) | |
81 | # 00fc sw a1,lo(unshared)+4(at) | |
82 | ulh $4, unshared # 0100 lw at,got(.data)(gp) | |
83 | # 0104 nop | |
84 | # 0108 addiu at,at,lo(unshared) | |
85 | # 010c lb a0,0(at) | |
86 | # 0110 lbu at,1(at) | |
87 | # 0114 sll a0,a0,8 | |
88 | # 0118 or a0,a0,at | |
89 | ush $4, unshared # 011c lw at,got(.data)(gp) | |
90 | # 0120 nop | |
91 | # 0124 addiu at,at,lo(unshared) | |
92 | # 0128 sb a0,0(at) | |
93 | # 012c srl a0,a0,8 | |
94 | # 0130 sb a0,1(at) | |
95 | # 0134 lbu at,0(at) | |
96 | # 0138 sll a0,a0,8 | |
97 | # 013c or a0,a0,at | |
98 | ulw $4, unshared # 0140 lw at,got(.data)(gp) | |
99 | # 0144 nop | |
100 | # 0148 addiu at,at,lo(unshared) | |
101 | # 014c lwl a0,0(at) | |
102 | # 0150 lwr a0,3(at) | |
103 | usw $4, unshared # 0154 lw at,got(.data)(gp) | |
104 | # 0158 nop | |
105 | # 015c addiu at,at,lo(unshared) | |
106 | # 0160 swl a0,0(at) | |
107 | # 0164 swr a0,3(at) | |
108 | li.d $4, 1.0 # 0168 lui a0,0x3ff0 | |
109 | # 016c move a1,zero | |
110 | li.d $4, 1.9 # 0170 lw at,got(.rodata)(gp) | |
111 | # 0174 lw a0,lo(F1.9)(at) | |
112 | # 0178 lw a1,lo(F1.9)+4(at) | |
113 | li.d $f0, 1.0 # 017c lw at,got(.rodata)(gp) | |
114 | # 0180 ldc1 $f0,lo(L1.0)(at) | |
115 | li.d $f0, 1.9 # 0184 lw at,got(.rodata)(gp) | |
116 | # 0188 ldc1 $f0,lo(L1.9)(at) | |
117 | seq $4, $5, -100 # 018c addiu a0,a1,100 | |
118 | # 0190 sltiu a0,a0,1 | |
119 | sne $4, $5, -100 # 0194 addiu a0,a1,100 | |
120 | # 0198 sltu a0,zero,a0 | |
121 | move $4, $5 # 019c move a0,a1 | |
122 | ||
123 | # Not available in 32-bit mode | |
124 | # dla $4, shared | |
125 | # dla $4, unshared | |
126 | # uld $4, unshared | |
127 | # usd $4, unshared | |
128 | ||
129 | # Should produce warnings given -mgp32 | |
130 | # bgt $4, 0x7fffffff, end | |
131 | # bgtu $4, 0xffffffff, end | |
132 | # ble $4, 0x7fffffff, end | |
133 | # bleu $4, 0xffffffff, end | |
134 | ||
135 | # Should produce warnings given -mfp32 | |
136 | add.d $f1, $f2, $f3 # 01a0 add.d $f1,$f2,$f3 | |
137 | ||
aea2ae6e | 138 | .end func |
dc462216 | 139 | end: |
aea2ae6e L |
140 | |
141 | # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... | |
142 | .space 8 |