1 #include <asm/ppc_asm.h>
3 /* unsigned long xmon_mfspr(sprn, default_value) */
5 PPC_LL r5, .Lmfspr_table@got(r2)
8 /* void xmon_mtspr(sprn, new_value) */
10 PPC_LL r5, .Lmtspr_table@got(r2)
15 * r4 = default or new value
20 * To index into the table of mxsprs we need:
21 * i = (sprn & 0x3ff) * 8
23 * i = (sprn << 3) & (0x3ff << 3)
25 rlwinm r3, r3, 3, 0x3ff << 3
28 mr r3, r4 /* put default_value in r3 for mfspr */