0001
0002 #include <asm/ppc_asm.h>
0003 #include <asm/asm-compat.h>
0004
0005
0006 _GLOBAL(xmon_mfspr)
0007 PPC_LL r5, .Lmfspr_table@got(r2)
0008 b xmon_mxspr
0009
0010
0011 _GLOBAL(xmon_mtspr)
0012 PPC_LL r5, .Lmtspr_table@got(r2)
0013 b xmon_mxspr
0014
0015
0016
0017
0018
0019
0020 xmon_mxspr:
0021
0022
0023
0024
0025
0026
0027 rlwinm r3, r3, 3, 0x3ff << 3
0028 add r5, r5, r3
0029 mtctr r5
0030 mr r3, r4
0031 bctr
0032
0033 .Lmfspr_table:
0034 spr = 0
0035 .rept 1024
0036 mfspr r3, spr
0037 blr
0038 spr = spr + 1
0039 .endr
0040
0041 .Lmtspr_table:
0042 spr = 0
0043 .rept 1024
0044 mtspr spr, r4
0045 blr
0046 spr = spr + 1
0047 .endr