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 | func: | |
15 | .set noreorder | |
dc462216 RS |
16 | li $4, 0x12345678 # 0000 lui a0,0x1234 |
17 | # 0004 ori a0,a0,0x5678 | |
f983ac44 | 18 | la $4, shared # 0008 addiu a0,gp,shared |
dc462216 | 19 | la $4, unshared # 000c lui a0,hi(unshared) |
f983ac44 | 20 | # 0010 addiu a0,a0,lo(unshared) |
dc462216 | 21 | la $4, end # 0014 lui a0,hi(end) |
f983ac44 | 22 | # 0018 addiu a0,a0,lo(end) |
dc462216 RS |
23 | j end # 001c j end |
24 | jal end # 0020 jal end | |
25 | lw $4, shared # 0024 lw a0,shared(gp) | |
26 | lw $4, unshared # 0028 lui a0,hi(unshared) | |
27 | # 002c lw a0,lo(unshared)(a0) | |
28 | lw $4, end # 0030 lui a0,hi(end) | |
29 | # 0034 lw a0,lo(end)(a0) | |
30 | ld $4, shared # 0038 ld a0,shared(gp) | |
31 | ld $4, unshared # 003c lui a0,hi(unshared) | |
32 | # 0040 ld a0,lo(unshared)(a0) | |
33 | ld $4, end # 0044 lui a0,hi(end) | |
34 | # 0048 ld a0,lo(end)(a0) | |
35 | sw $4, shared # 004c sw a0,shared(gp) | |
36 | sw $4, unshared # 0050 lui at,hi(unshared) | |
37 | # 0054 sw a0,lo(unshared)(at) | |
38 | sd $4, shared # 0058 sd a0,shared(gp) | |
39 | sd $4, unshared # 005c lui at,hi(unshared) | |
40 | # 0060 sd a0,lo(unshared)(at) | |
41 | ulh $4, unshared # 0064 lui at,hi(unshared) | |
f983ac44 | 42 | # 0068 addiu at,at,lo(unshared) |
dc462216 RS |
43 | # 006c lb a0,0(at) |
44 | # 0070 lbu at,1(at) | |
45 | # 0074 sll a0,a0,8 | |
46 | # 0078 or a0,a0,at | |
47 | ush $4, unshared # 007c lui at,hi(unshared) | |
f983ac44 | 48 | # 0080 addiu at,at,lo(unshared) |
dc462216 RS |
49 | # 0084 sb a0,1(at) |
50 | # 0088 srl a0,a0,8 | |
51 | # 008c sb a0,0(at) | |
52 | # 0090 lbu at,1(at) | |
53 | # 0094 sll a0,a0,8 | |
54 | # 0098 or a0,a0,at | |
55 | ulw $4, unshared # 009c lui at,hi(unshared) | |
f983ac44 | 56 | # 00a0 addiu at,at,lo(unshared) |
dc462216 RS |
57 | # 00a4 lwl a0,0(at) |
58 | # 00a8 lwr a0,3(at) | |
59 | usw $4, unshared # 00ac lui at,hi(unshared) | |
f983ac44 | 60 | # 00b0 addiu at,at,lo(unshared) |
dc462216 RS |
61 | # 00b4 swl a0,0(at) |
62 | # 00b8 swr a0,3(at) | |
63 | li.d $4, 1.0 # 00bc li a0,0xffc0 | |
64 | # 00c0 dsll32 a0,a0,14 # giving 0x3ff00000... | |
65 | li.d $4, 1.9 # 00c4 lui at,hi(F1.9) | |
66 | # 00c8 ld a0,lo(F1.9)(at) | |
67 | li.d $f0, 1.0 # 00cc lui at,0x3ff0 | |
68 | # 00d0 mtc1 at,$f1 | |
69 | # 00d4 mtc1 zero,$f0 | |
70 | li.d $f0, 1.9 # 00d8 ldc1 $f0,L1.9(gp) | |
71 | seq $4, $5, -100 # 00dc daddiu a0,a1,100 | |
72 | # 00e0 sltiu a0,a0,1 | |
73 | sne $4, $5, -100 # 00e4 daddiu a0,a1,100 | |
74 | # 00e8 sltu a0,zero,a0 | |
75 | move $4, $5 # 00ec move a0,a1 | |
76 | ||
f983ac44 | 77 | dla $4, shared # 00f0 addiu a0,gp,shared |
dc462216 | 78 | dla $4, unshared # 00f4 lui a0,hi(unshared) |
f983ac44 | 79 | # 00f8 addiu a0,a0,lo(unshared) |
dc462216 | 80 | uld $4, unshared # 00fc lui at,hi(unshared) |
f983ac44 | 81 | # 0100 addiu at,at,lo(unshared) |
dc462216 RS |
82 | # 0104 ldl a0,0(at) |
83 | # 0108 ldr a0,7(at) | |
84 | usd $4, unshared # 010c lui at,hi(unshared) | |
f983ac44 | 85 | # 0110 addiu at,at,lo(unshared) |
dc462216 RS |
86 | # 0114 sdl a0,0(at) |
87 | # 0118 sdr a0,7(at) | |
88 | ||
89 | bgt $4, 0x7fffffff, end # 011c lui at,0x8000 | |
90 | # 0120 slt at,a0,at | |
91 | # 0124 beqz at,end | |
92 | bgtu $4, 0xffffffff, end # 0128 li at,0x8000 | |
93 | # 012c dsll at,at,17 | |
94 | # 0130 sltu at,a0,at | |
95 | # 0134 beqz at,end | |
96 | ble $4, 0x7fffffff, end # 0138 lui at,0x8000 | |
97 | # 013c slt at,a0,at | |
98 | # 0140 bnez at,end | |
99 | bleu $4, 0xffffffff, end # 0144 li at,0x8000 | |
100 | # 0148 dsll at,at,17 | |
101 | # 014c sltu at,a0,at | |
102 | # 0150 bnez at,end | |
103 | ||
104 | # Should produce warnings given -mfp32 | |
105 | # add.d $f1, $f2, $f3 | |
106 | ||
107 | end: | |
aea2ae6e L |
108 | |
109 | # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... | |
110 | .space 8 |