[Webkit-unassigned] [Bug 103128] LLInt C Loop backend should work on 32 bit platforms, both big and little endian

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 17 06:07:53 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=103128





--- Comment #21 from Tobias Netzel <tobias.netzel at googlemail.com>  2013-05-17 06:06:19 PST ---
With the introduction of the watchdog timer (http://trac.webkit.org/changeset/148639) there appeared a new problem; the size of bool. Currently the code assumes that bool is always 8 bit sized, while this isn't the case for all platforms/compilers. I think little endian platforms should be able to read a 32/64 bit sized bool correctly using a 8 bit load instruction, but big endian platforms do definitely have a problem here as you have to read using the correct instruction in order to get the correct value.
As this is a compiler property I guess detection for size of bool has to go into <wtf/Compiler.h>?

Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
 _llint_op_loop_hint:
     traceExecution()
     loadp JITStackFrame::vm[sp], t1
-    loadb VM::watchdog+Watchdog::m_timerDidFire[t1], t0
+    if C_LOOP
+        loadi VM::watchdog+Watchdog::m_timerDidFire[t1], t0
+    else
+        loadb VM::watchdog+Watchdog::m_timerDidFire[t1], t0
+    end
     btbnz t0, .handleWatchdogTimer
 .afterWatchdogTimerCheck:
     checkSwitchToJITForLoop()

Obviously my patch is very ugly but at least it makes it work correctly on 32 and 64 bit big endian platforms and helps to illustrate the problem.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list