Skip to content

Commit

Permalink
drc: fix eabi alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
notaz committed Sep 4, 2011
1 parent c21718e commit 0a74ef6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions arm/arm_stub.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0a74ef6

Please sign in to comment.