--- zzzz-none-000/linux-2.6.32.61/arch/powerpc/kernel/misc_32.S 2013-06-10 09:43:48.000000000 +0000 +++ ar9-7330-650/linux-2.6.32.61/arch/powerpc/kernel/misc_32.S 2011-07-20 07:23:51.000000000 +0000 @@ -820,3 +820,80 @@ relocate_new_kernel_size: .long relocate_new_kernel_end - relocate_new_kernel #endif + +#if defined(CONFIG_PPC32) && defined(CONFIG_CC_OPTIMIZE_FOR_SIZE) +/* Routines for saving integer registers, called by the compiler. */ +/* Called with r11 pointing to the stack header word of the caller of the */ +/* function, just beyond the end of the integer save area. */ + +_GLOBAL(_savegpr_14) stw 14,-72(11) /* save gp registers */ +_GLOBAL(_savegpr_15) stw 15,-68(11) +_GLOBAL(_savegpr_16) stw 16,-64(11) +_GLOBAL(_savegpr_17) stw 17,-60(11) +_GLOBAL(_savegpr_18) stw 18,-56(11) +_GLOBAL(_savegpr_19) stw 19,-52(11) +_GLOBAL(_savegpr_20) stw 20,-48(11) +_GLOBAL(_savegpr_21) stw 21,-44(11) +_GLOBAL(_savegpr_22) stw 22,-40(11) +_GLOBAL(_savegpr_23) stw 23,-36(11) +_GLOBAL(_savegpr_24) stw 24,-32(11) +_GLOBAL(_savegpr_25) stw 25,-28(11) +_GLOBAL(_savegpr_26) stw 26,-24(11) +_GLOBAL(_savegpr_27) stw 27,-20(11) +_GLOBAL(_savegpr_28) stw 28,-16(11) +_GLOBAL(_savegpr_29) stw 29,-12(11) +_GLOBAL(_savegpr_30) stw 30,-8(11) +_GLOBAL(_savegpr_31) stw 31,-4(11) + blr + +/* Routines for restoring integer registers, called by the compiler. */ +/* Called with r11 pointing to the stack header word of the caller of the */ +/* function, just beyond the end of the integer restore area. */ + +_GLOBAL(_restgpr_14) lwz 14,-72(11) /* restore gp registers */ +_GLOBAL(_restgpr_15) lwz 15,-68(11) +_GLOBAL(_restgpr_16) lwz 16,-64(11) +_GLOBAL(_restgpr_17) lwz 17,-60(11) +_GLOBAL(_restgpr_18) lwz 18,-56(11) +_GLOBAL(_restgpr_19) lwz 19,-52(11) +_GLOBAL(_restgpr_20) lwz 20,-48(11) +_GLOBAL(_restgpr_21) lwz 21,-44(11) +_GLOBAL(_restgpr_22) lwz 22,-40(11) +_GLOBAL(_restgpr_23) lwz 23,-36(11) +_GLOBAL(_restgpr_24) lwz 24,-32(11) +_GLOBAL(_restgpr_25) lwz 25,-28(11) +_GLOBAL(_restgpr_26) lwz 26,-24(11) +_GLOBAL(_restgpr_27) lwz 27,-20(11) +_GLOBAL(_restgpr_28) lwz 28,-16(11) +_GLOBAL(_restgpr_29) lwz 29,-12(11) +_GLOBAL(_restgpr_30) lwz 30,-8(11) +_GLOBAL(_restgpr_31) lwz 31,-4(11) + blr + +/* Routines for restoring integer registers, called by the compiler. */ +/* Called with r11 pointing to the stack header word of the caller of the */ +/* function, just beyond the end of the integer restore area. */ + +_GLOBAL(_restgpr_14_x) lwz 14,-72(11) /* restore gp registers */ +_GLOBAL(_restgpr_15_x) lwz 15,-68(11) +_GLOBAL(_restgpr_16_x) lwz 16,-64(11) +_GLOBAL(_restgpr_17_x) lwz 17,-60(11) +_GLOBAL(_restgpr_18_x) lwz 18,-56(11) +_GLOBAL(_restgpr_19_x) lwz 19,-52(11) +_GLOBAL(_restgpr_20_x) lwz 20,-48(11) +_GLOBAL(_restgpr_21_x) lwz 21,-44(11) +_GLOBAL(_restgpr_22_x) lwz 22,-40(11) +_GLOBAL(_restgpr_23_x) lwz 23,-36(11) +_GLOBAL(_restgpr_24_x) lwz 24,-32(11) +_GLOBAL(_restgpr_25_x) lwz 25,-28(11) +_GLOBAL(_restgpr_26_x) lwz 26,-24(11) +_GLOBAL(_restgpr_27_x) lwz 27,-20(11) +_GLOBAL(_restgpr_28_x) lwz 28,-16(11) +_GLOBAL(_restgpr_29_x) lwz 29,-12(11) +_GLOBAL(_restgpr_30_x) lwz 30,-8(11) +_GLOBAL(_restgpr_31_x) lwz 0,4(11) + lwz 31,-4(11) + mtlr 0 + mr 1,11 + blr +#endif