RESOLVED FIXED 141903
Add calleeSaveRegisters() implementation for ARM Traditional
https://bugs.webkit.org/show_bug.cgi?id=141903
Summary Add calleeSaveRegisters() implementation for ARM Traditional
Csaba Osztrogonác
Reported 2015-02-23 05:45:14 PST
Add calleeSaveRegisters() implementation for ARM Traditional
Attachments
Patch (1.69 KB, patch)
2015-02-23 05:45 PST, Csaba Osztrogonác
no flags
Csaba Osztrogonác
Comment 1 2015-02-23 05:45:28 PST
Csaba Osztrogonác
Comment 2 2015-02-23 06:00:00 PST
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 register, v6." But it seems GCC ARM EABI handles r9 as callee-saved register: https://github.com/gcc-mirror/gcc/blob/master/gcc/config/arm/arm.h#L775 I checked some disassembly of example codes and JSC too, and can confirm that r4-r11 registers are callee-saved.
Csaba Osztrogonác
Comment 3 2015-02-23 06:13:21 PST
You omitted the fp/r7 from ARM Thumb2 callee-saved register list: http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/jit/RegisterSet.cpp#L84 But registersToPreserve() explicitly removes fp from the list: http://trac.webkit.org/browser/branches/jsCStack/Source/JavaScriptCore/jit/RegisterPreservationWrapperGenerator.cpp#L37 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.
WebKit Commit Bot
Comment 4 2015-02-26 01:20:43 PST
Comment on attachment 247112 [details] Patch Clearing flags on attachment: 247112 Committed r180667: <http://trac.webkit.org/changeset/180667>
WebKit Commit Bot
Comment 5 2015-02-26 01:20:47 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.