Lines Matching full:reg2

14  * ANDs reg2 with mask and places the result in reg1.
16 * You cannnot use the same register for reg1 & reg2.
19 .macro ANDI32 reg1, reg2, mask
24 and \reg1, \reg1, \reg2
26 andi \reg1, \reg2, %lo(\mask)
29 andhi \reg1, \reg2, %hi(\mask)
34 * ORs reg2 with mask and places the result in reg1.
36 * It is safe to use the same register for reg1 & reg2.
39 .macro ORI32 reg1, reg2, mask
42 orhi \reg1, \reg2, %hi(\mask)
43 ori \reg1, \reg2, %lo(\mask)
45 ori \reg1, \reg2, %lo(\mask)
48 orhi \reg1, \reg2, %hi(\mask)
53 * XORs reg2 with mask and places the result in reg1.
55 * It is safe to use the same register for reg1 & reg2.
58 .macro XORI32 reg1, reg2, mask
61 xorhi \reg1, \reg2, %hi(\mask)
64 xori \reg1, \reg2, %lo(\mask)
67 xorhi \reg1, \reg2, %hi(\mask)
75 * It is safe to use the same register for reg1 & reg2.
78 .macro BT reg1, reg2, bit
83 andi \reg1, \reg2, (1 << \bit)
85 andhi \reg1, \reg2, (1 << (\bit - 16))
91 * Tests the bit in reg2 and branches to label if the
94 * It is safe to use the same register for reg1 & reg2.
97 .macro BTBZ reg1, reg2, bit, label
98 BT \reg1, \reg2, \bit
103 * Tests the bit in reg2 and branches to label if the
106 * It is safe to use the same register for reg1 & reg2.
109 .macro BTBNZ reg1, reg2, bit, label
110 BT \reg1, \reg2, \bit
115 * Tests the bit in reg2 and then compliments the bit in reg2.
118 * It is NOT safe to use the same register for reg1 & reg2.
121 .macro BTC reg1, reg2, bit
126 andi \reg1, \reg2, (1 << \bit)
127 xori \reg2, \reg2, (1 << \bit)
129 andhi \reg1, \reg2, (1 << (\bit - 16))
130 xorhi \reg2, \reg2, (1 << (\bit - 16))
136 * Tests the bit in reg2 and then sets the bit in reg2.
139 * It is NOT safe to use the same register for reg1 & reg2.
142 .macro BTS reg1, reg2, bit
147 andi \reg1, \reg2, (1 << \bit)
148 ori \reg2, \reg2, (1 << \bit)
150 andhi \reg1, \reg2, (1 << (\bit - 16))
151 orhi \reg2, \reg2, (1 << (\bit - 16))
157 * Tests the bit in reg2 and then resets the bit in reg2.
160 * It is NOT safe to use the same register for reg1 & reg2.
163 .macro BTR reg1, reg2, bit
168 andi \reg1, \reg2, (1 << \bit)
169 andi \reg2, \reg2, %lo(~(1 << \bit))
171 andhi \reg1, \reg2, (1 << (\bit - 16))
172 andhi \reg2, \reg2, %lo(~(1 << (\bit - 16)))
178 * Tests the bit in reg2 and then compliments the bit in reg2.
182 * It is NOT safe to use the same register for reg1 & reg2.
185 .macro BTCBZ reg1, reg2, bit, label
186 BTC \reg1, \reg2, \bit
191 * Tests the bit in reg2 and then compliments the bit in reg2.
195 * It is NOT safe to use the same register for reg1 & reg2.
198 .macro BTCBNZ reg1, reg2, bit, label
199 BTC \reg1, \reg2, \bit
204 * Tests the bit in reg2 and then sets the bit in reg2.
208 * It is NOT safe to use the same register for reg1 & reg2.
211 .macro BTSBZ reg1, reg2, bit, label
212 BTS \reg1, \reg2, \bit
217 * Tests the bit in reg2 and then sets the bit in reg2.
221 * It is NOT safe to use the same register for reg1 & reg2.
224 .macro BTSBNZ reg1, reg2, bit, label
225 BTS \reg1, \reg2, \bit
230 * Tests the bit in reg2 and then resets the bit in reg2.
234 * It is NOT safe to use the same register for reg1 & reg2.
237 .macro BTRBZ reg1, reg2, bit, label
238 BTR \reg1, \reg2, \bit
243 * Tests the bit in reg2 and then resets the bit in reg2.
247 * It is NOT safe to use the same register for reg1 & reg2.
250 .macro BTRBNZ reg1, reg2, bit, label
251 BTR \reg1, \reg2, \bit
256 * Tests the bits in mask against reg2 stores the result in reg1.
259 * It is safe to use the same register for reg1 & reg2.
262 .macro TSTBZ reg1, reg2, mask, label
263 ANDI32 \reg1, \reg2, \mask
268 * Tests the bits in mask against reg2 stores the result in reg1.
271 * It is safe to use the same register for reg1 & reg2.
274 .macro TSTBNZ reg1, reg2, mask, label
275 ANDI32 \reg1, \reg2, \mask