1# Source file used to test branch relaxation with swapping. 2 3 .text 4foo: 5 6 move $2, $4 7 b foo 8 move $2, $4 9 b bar 10 11 lw $2, ($4) 12 b foo 13 lw $2, ($4) 14 b bar 15 16 sw $2, ($4) 17 b foo 18 sw $2, ($4) 19 b bar 20 21 move $2, $4 22 beq $2, $3, foo 23 move $2, $4 24 beq $2, $3, bar 25 move $2, $4 26 beq $4, $5, foo 27 move $2, $4 28 beq $4, $5, bar 29 30 addiu $2, $4, 1 31 beq $2, $3, foo 32 addiu $2, $4, 1 33 beq $2, $3, bar 34 addiu $2, $4, 1 35 beq $4, $5, foo 36 addiu $2, $4, 1 37 beq $4, $5, bar 38 39 lw $2, ($4) 40 beq $2, $3, foo 41 lw $2, ($4) 42 beq $2, $3, bar 43 lw $2, ($4) 44 beq $4, $5, foo 45 lw $2, ($4) 46 beq $4, $5, bar 47 48 sw $2, ($4) 49 beq $2, $3, foo 50 sw $2, ($4) 51 beq $2, $3, bar 52 sw $2, ($4) 53 beq $4, $5, foo 54 sw $2, ($4) 55 beq $4, $5, bar 56 57 mfc1 $2, $0 58 move $6, $7 59 beq $2, $3, foo 60 mfc1 $2, $0 61 move $6, $7 62 beq $2, $3, bar 63 mfc1 $2, $0 64 move $6, $7 65 beq $4, $5, foo 66 mfc1 $2, $0 67 move $6, $7 68 beq $4, $5, bar 69 70 move $2, $4 71 bc1t foo 72 move $2, $4 73 bc1t bar 74 75 .set nomove 76 move $2, $4 77 b foo 78 move $2, $4 79 b bar 80 .set move 81 82 move $2, $4 830: b foo 84 move $2, $4 850: b bar 86 87 .set noreorder 88 move $6, $7 89 .set reorder 90 move $2, $4 91 b foo 92 .set noreorder 93 move $6, $7 94 .set reorder 95 move $2, $4 96 b bar 97 98 sw $2, 0f 990: b foo 100 sw $2, 0f 1010: b bar 102 103 lwc1 $0, ($4) 104 b foo 105 lwc1 $0, ($4) 106 b bar 107 108 cfc1 $2, $31 109 b foo 110 cfc1 $2, $31 111 b bar 112 113 ctc1 $2, $31 114 b foo 115 ctc1 $2, $31 116 b bar 117 118 mtc1 $2, $31 119 b foo 120 mtc1 $2, $31 121 b bar 122 123 mfhi $2 124 b foo 125 mfhi $2 126 b bar 127 128 move $2, $4 129 jr $2 130 move $2, $4 131 jr $4 132 133 move $2, $4 134 jalr $2 135 move $2, $4 136 jalr $4 137 138 move $2, $31 139 jalr $3 140 move $31, $4 141 jalr $5 142 143 move $31, $4 144 jalr $2, $3 145 move $2, $31 146 jalr $2, $3 147 148 .space 0x20000 # to make a 128kb loop body 149bar: 150# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... 151 .space 8 152