Lines Matching refs:addr
52 static void __init set_addr(unsigned int *addr, unsigned int q1, int fmangled, unsigned int value) in set_addr() argument
55 *addr = value; in set_addr()
58 if (*addr == 0x01000000) { in set_addr()
61 } else if (addr[-1] == *q) { in set_addr()
63 addr[-1] = value; in set_addr()
66 prom_printf(wrong_setaddr, addr-1, addr[-1], *addr, *q, value); in set_addr()
72 static __inline__ void set_addr(unsigned int *addr, unsigned int q1, int fmangled, unsigned int val… in set_addr() argument
74 *addr = value; in set_addr()
83 unsigned *addr; in btfixup() local
142 addr = (unsigned *)*q; in btfixup()
143 if (addr < _stext || addr >= _end) { in btfixup()
147 insn = *addr; in btfixup()
152 insn = *addr; in btfixup()
159 if (addr >= __start___ksymtab && addr < __stop___ksymtab) { in btfixup()
160 *addr = p[1]; in btfixup()
164 *addr = (insn & 0xffc00000) | (p[1] >> 10); break; in btfixup()
166 *addr = (insn & 0xffffe000) | (p[1] & 0x3ff); break; in btfixup()
169 prom_printf(insn_f, p, addr, insn, addr[1]); in btfixup()
173 addr[1] = q[1]; in btfixup()
176 *addr = 0x40000000 | ((p[1] - (unsigned)addr) >> 2); in btfixup()
183 if (!(addr[1] & 0x80000000)) { in btfixup()
184 if ((addr[1] & 0xc1c00000) != 0x01000000) /* !SETHI */ in btfixup()
187 if ((addr[1] & 0x01800000) == 0x01800000) { in btfixup()
188 if ((addr[1] & 0x01f80000) == 0x01e80000) { in btfixup()
194 if ((addr[1] & 0xffffe003) == 0x9e03e000) { in btfixup()
196 int displac = (addr[1] << 19); in btfixup()
199 *addr = (0x10800000) + (displac & 0x3fffff); in btfixup()
200 q[1] = addr[1]; in btfixup()
201 addr[1] = p[2]; in btfixup()
204 if ((addr[1] & 0x201f) == 0x200f || (addr[1] & 0x7c000) == 0x3c000) in btfixup()
206 if ((addr[1] & 0x3e000000) == 0x1e000000) in btfixup()
210 *addr = 0x01000000; in btfixup()
217 if (addr[1] == 0x01000000) { /* NOP in the delay slot */ in btfixup()
218 q[1] = addr[1]; in btfixup()
219 *addr = p[2]; in btfixup()
222 if ((addr[1] & 0xc0000000) != 0xc0000000) { in btfixup()
224 if ((addr[1] & 0x30000000) == 0x10000000) { in btfixup()
226 if ((addr[1] & 0x3e000000) == 0x1c000000) in btfixup()
228 if ((addr[1] & 0x3e000000) > 0x12000000 || in btfixup()
229 ((addr[1] & 0x3e000000) == 0x12000000 && in btfixup()
233 *addr = p[2]; in btfixup()
234 q[1] = addr[1]; in btfixup()
235 addr[1] = 0x01000000; in btfixup()
238 if ((addr[1] & 0xf1ffffe0) == 0x90100000) { in btfixup()
240 if ((addr[1] & 0x3e000000) == 0x10000000 && in btfixup()
244 *addr = (p[2] & ~0x7c000) | ((addr[1] & 0x1f) << 14); in btfixup()
245 q[1] = addr[1]; in btfixup()
246 addr[1] = 0x01000000; in btfixup()
249 if ((addr[1] & 0x3e000000) == 0x12000000 && in btfixup()
251 *addr = (p[2] & ~0x3e000000) | ((addr[1] & 0x1f) << 25); in btfixup()
252 q[1] = addr[1]; in btfixup()
253 addr[1] = 0x01000000; in btfixup()
259 *addr = addr[1]; in btfixup()
260 q[1] = addr[1]; in btfixup()
261 addr[1] = p[2]; in btfixup()
268 prom_printf(insn_b, p, addr, insn); in btfixup()
274 do_fixup(addr); in btfixup()
280 prom_printf(insn_s, p, addr, insn); in btfixup()
283 set_addr(addr, q[1], fmangled, (insn & 0xffffe000) | (p[1] & 0x1fff)); in btfixup()
288 prom_printf(insn_h, p, addr, insn); in btfixup()
291 set_addr(addr, q[1], fmangled, (insn & 0xffc00000) | (p[1] >> 10)); in btfixup()
297 prom_printf(insn_a, p, addr, insn); in btfixup()
301 set_addr(addr, q[1], fmangled, in btfixup()
304 set_addr(addr, q[1], fmangled, in btfixup()
309 set_addr(addr, q[1], fmangled, (insn & 0xffc00000) | (p[1] >> 10)); in btfixup()
312 set_addr(addr, q[1], fmangled, (insn & 0xffffe000) | (p[1] & 0x3ff)); in btfixup()
314 prom_printf(insn_i, p, addr, insn); in btfixup()