# RS6000RegisterSaveRestore.S # Save and restore all the global registers on a SPARC. # # Peter B. Kessler, November 15, 1989 5:42:14 pm PST # Makoto Udagawa, 17-Sep-91 19:23:11 # .csect save←regs[ds] .globl save←regs[ds] .globl .save←regs[PR] .csect .save←regs[PR] .save←regs: mfmq 31 mfxer 30 mfctr 29 mfcr 28 stm 28, 248(1) # save special registers brl # just a null function .csect restore←regs[ds] .globl restore←regs[ds] .globl .restore←regs[PR] .csect .restore←regs[PR] .restore←regs: lm 28, 248(1) # load special registers mtmq 31 mtxer 30 mtctr 29 mtcrf 0xff, 28 brl # just a null function