| 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 | .frame $sp,0,$31 |
| 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 a0,got(.sdata)(gp) |
| 55 | # 0094 nop |
| 56 | # 0098 addiu a0,a0,lo(shared) |
| 57 | # 009c ld a0,(a0) |
| 58 | ld $4, unshared # 00a0 lw a0,got(.data)(gp) |
| 59 | # 00a4 nop |
| 60 | # 00a8 addiu a0,a0,lo(unshared) |
| 61 | # 00ac ld a0,(a0) |
| 62 | ld $4, end # 00b0 lw a0,got(.text)(gp) |
| 63 | # 00b4 nop |
| 64 | # 00b8 addiu a0,a0,lo(end) |
| 65 | # 00bc ld a0,(a0) |
| 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 addiu at,at,lo(shared) |
| 77 | # 00ec sd a0,(at) |
| 78 | sd $4, unshared # 00f0 lw at,got(.data)(gp) |
| 79 | # 00f4 nop |
| 80 | # 00f8 addiu at,at,lo(unshared) |
| 81 | # 00fc sd a0,(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 li a0,0xffc0 |
| 109 | # 016c dsll32 a0,a0,14 |
| 110 | li.d $4, 1.9 # 0170 lw at,got(.rodata)(gp) |
| 111 | # 0174 ld a0,lo(F1.9)(at) |
| 112 | li.d $f0, 1.0 # 0178 li at,0xffc0 |
| 113 | # 017c dsll32 at,at,14 |
| 114 | # 0180 dmtc1 at,$f0 |
| 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 daddiu a0,a1,100 |
| 118 | # 0190 sltiu a0,a0,1 |
| 119 | sne $4, $5, -100 # 0194 daddiu a0,a1,100 |
| 120 | # 0198 sltu a0,zero,a0 |
| 121 | move $4, $5 # 019c move a0,a1 |
| 122 | |
| 123 | dla $4, shared # 01a0 lw a0,got(.sdata)(gp) |
| 124 | # 01a4 nop |
| 125 | # 01a8 addiu a0,a0,lo(shared) |
| 126 | dla $4, unshared # 01ac lw a0,got(.data)(gp) |
| 127 | # 01b0 nop |
| 128 | # 01b4 addiu a0,a0,lo(unshared) |
| 129 | uld $4, unshared # 01b8 lw at,got(.data)(gp) |
| 130 | # 01bc nop |
| 131 | # 01c0 addiu at,at,lo(unshared) |
| 132 | # 01c4 ldl a0,0(at) |
| 133 | # 01c8 ldr a0,7(at) |
| 134 | usd $4, unshared # 01cc lw at,got(.data)(gp) |
| 135 | # 01d0 nop |
| 136 | # 01d4 addiu at,at,lo(unshared) |
| 137 | # 01d8 sdl a0,0(at) |
| 138 | # 01dc sdr a0,7(at) |
| 139 | |
| 140 | bgt $4, 0x7fffffff, end # 01e0 li at,0x8000 |
| 141 | # 01e4 dsll at,at,0x10 |
| 142 | # 01e8 slt at,a0,at |
| 143 | # 01ec beqz at,end |
| 144 | # 01f0 nop |
| 145 | bgtu $4, 0xffffffff, end # 01f4 li at,0x8000 |
| 146 | # 01f8 dsll at,at,17 |
| 147 | # 01fc sltu at,a0,at |
| 148 | # 0200 beqz at,end |
| 149 | # 0204 nop |
| 150 | ble $4, 0x7fffffff, end # 0208 li at,0x8000 |
| 151 | # 020c dsll at,at,0x10 |
| 152 | # 0210 slt at,a0,at |
| 153 | # 0214 bnez at,end |
| 154 | # 0218 nop |
| 155 | bleu $4, 0xffffffff, end # 021c li at,0x8000 |
| 156 | # 0220 dsll at,at,17 |
| 157 | # 0224 sltu at,a0,at |
| 158 | # 0228 bnez at,end |
| 159 | # 022c nop |
| 160 | |
| 161 | add.d $f1, $f2, $f3 # 0230 add.d $f1,$f2,$f3 |
| 162 | |
| 163 | .end func |
| 164 | end: |
| 165 | |
| 166 | # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... |
| 167 | .space 8 |