Add calleeSaveRegisters() implementation for ARM Traditional
Created attachment 247112 [details]
AAPCS (http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf) says that r4-r11 are callee-saved registers,
only the role of r9 isn't clear.
"The role of register r9 is platform specific. A virtual platform may assign
any role to this register and must document this usage. For example, it may
designate it as the static base (SB) in a position-independent data model,
or it may designate it as the thread register (TR) in an environment with
thread-local storage. The usage of this register may require that the value
held is persistent across all calls. A virtual platform that has no need for
such a special register may designate r9 as an additional callee-saved variable
But it seems GCC ARM EABI handles r9 as callee-saved register:
I checked some disassembly of example codes and JSC too,
and can confirm that r4-r11 registers are callee-saved.
You omitted the fp/r7 from ARM Thumb2 callee-saved register list:
But registersToPreserve() explicitly removes fp from the list:
I think it is confusing to omit r11/fp on ARM Traditional and r7/fp
on ARM Thumb2, since these registers are general callee-saved registers.
ARM EABI doesn't specify a dedicated frame pointer, additionally GCC omits
using frame pointer with O1.
Comment on attachment 247112 [details]
Clearing flags on attachment: 247112
Committed r180667: <http://trac.webkit.org/changeset/180667>
All reviewed patches have been landed. Closing bug.