X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arm%2Farm_stub.S;h=cc38dd202130c38e1bde42dbd4040846e19503d4;hb=0a74ef66e11356f34c80568cca92b6cdc596248c;hp=a7271fd16acd5687b4b75bdff3ccdfedce4e7e34;hpb=d5e0983c10e0ca717603dd1a406ff0d6e450e905;p=gpsp.git diff --git a/arm/arm_stub.S b/arm/arm_stub.S index a7271fd..cc38dd2 100644 --- a/arm/arm_stub.S +++ b/arm/arm_stub.S @@ -171,13 +171,20 @@ #define restore_flags() ;\ msr cpsr_f, reg_flags ;\ +#ifdef __ARM_EABI__ + @ must align stack + #define call_c_saved_regs r2, r3, r12, lr +#else + #define call_c_saved_regs r3, r12, lr +#endif + @ Calls a C function - all caller save registers which are important to the @ dynarec and to returning from this function are saved. #define call_c_function(function) ;\ - stmdb sp!, { r3, r12, lr } ;\ + stmdb sp!, { call_c_saved_regs } ;\ bl function ;\ - ldmia sp!, { r3, r12, lr } ;\ + ldmia sp!, { call_c_saved_regs } ;\ @ Update the GBA hardware (video, sound, input, etc)