Title: [149331] trunk/Source/_javascript_Core
Revision
149331
Author
[email protected]
Date
2013-04-29 16:54:32 -0700 (Mon, 29 Apr 2013)

Log Message

Use push and pop for iOS math function thunks
https://bugs.webkit.org/show_bug.cgi?id=115215

Patch by Benjamin Poulain <[email protected]> on 2013-04-29
Reviewed by Filip Pizlo.

The iOS ABI is a little different than regular ARM ABI regarding stack alignment.
The requirement is 4 bytes:
"The ARM environment uses a stack that—at the point of function calls—is 4-byte aligned,
 grows downward, and contains local variables and a function’s parameters."

Subsequently, we can just use push and pop to preserve the link register.

* jit/ThunkGenerators.cpp:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (149330 => 149331)


--- trunk/Source/_javascript_Core/ChangeLog	2013-04-29 23:52:29 UTC (rev 149330)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-04-29 23:54:32 UTC (rev 149331)
@@ -1,3 +1,19 @@
+2013-04-29  Benjamin Poulain  <[email protected]>
+
+        Use push and pop for iOS math function thunks
+        https://bugs.webkit.org/show_bug.cgi?id=115215
+
+        Reviewed by Filip Pizlo.
+
+        The iOS ABI is a little different than regular ARM ABI regarding stack alignment.
+        The requirement is 4 bytes:
+        "The ARM environment uses a stack that—at the point of function calls—is 4-byte aligned,
+         grows downward, and contains local variables and a function’s parameters."
+
+        Subsequently, we can just use push and pop to preserve the link register.
+
+        * jit/ThunkGenerators.cpp:
+
 2013-04-29  Brent Fulgham  <[email protected]>
 
         [Windows, WinCairo] Get rid of last few pthread include/link references.

Modified: trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp (149330 => 149331)


--- trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp	2013-04-29 23:52:29 UTC (rev 149330)
+++ trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp	2013-04-29 23:54:32 UTC (rev 149331)
@@ -555,13 +555,11 @@
         ".thumb\n" \
         ".thumb_func " THUMB_FUNC_PARAM(function##Thunk) "\n" \
         SYMBOL_STRING(function##Thunk) ":" "\n" \
-        "sub sp, sp, #16\n" \
-        "str lr, [sp, #0]\n" \
+        "push {lr}\n" \
         "vmov r0, r1, d0\n" \
         "blx " GLOBAL_REFERENCE(function) "\n" \
         "vmov d0, r0, r1\n" \
-        "ldr lr, [sp, #0]\n" \
-        "add sp, sp, #16\n" \
+        "pop {lr}\n" \
         "bx lr\n" \
     ); \
     extern "C" { \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to