On return, a assembler subroutine called from C must somehow set <pc> to the
value passed in <lr>. Immediately after return, <lr> contains the adrs of the
current instruction, which is of pretty limited use to the calling program.
Apart from
mov pc, lr ; return
i could use
stmdb sp!, {r4-r12, lr} ; entry
; destroy all regs except <pc> and <sp>
ldmia sp!, {r4-r12, pc} ; return with <lr> destroyed
Do I still have to restore <lr>, just in case some day a clever compiler might
think of a way to use it ?
After all, a cycle is a cycle, and a word is a word ...
Does anybody know if there is an "official" definition of the Arm-Linux
assembly language calling conventions ?
Thank You very much,
Regards, Klaus
--
Mobotix AG
Klaus Borchers
Luxemburgerstr. 6
D-67657 Kaiserslautern
Germany
Tel: +49 (631) 3033141
Fax: +49 (631) 3033190
E-Mail: [EMAIL PROTECTED]
_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.