[Webkit-unassigned] [Bug 128115] [Win] LLINT is not working.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 13 12:28:25 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=128115
--- Comment #41 from peavo at outlook.com 2014-02-13 12:25:39 PST ---
It seems Win 32-bit has 4 byte stack alignment, as I've seen both 4, 8, and C as the last nibble in esp when entering the callToJavaScript function.
I guess this means we cannot use fixed offsets of the stack pointer to find the function arguments on the stack.
I've tried aligning the stack to 16 byte as suggested.
I also stored the value (esp & 0xf) in a temp register, and used that to compute the offset of the function arguments.
This is the prologue code I've tried:
...
pushCalleeSaves
if X86
subp 12, sp
elsif X86_WIN
subp 16, sp
move sp, t4
move t4, t0
move t4, t2
andp 0xf, t2
andp 0xfffffff0, t0
move t0, sp
storep t4, [sp]
elsif ARM or ARMv7 or ARMv7_TRADITIONAL
...
Code to get function arguments from stack:
if X86
loadp 36[sp], vm
loadp 32[sp], entry
elsif X86_WIN
loadp 40[sp,temp3], vm
loadp 36[sp,temp3], entry
else
move cfr, previousCFR
end
...
if X86
loadp 28[sp], previousPC
loadp 24[sp], previousCFR
elsif X86_WIN
loadp 32[sp,temp3], previousPC
loadp 28[sp,temp3], previousCFR
end
storep previousPC, ReturnPC[cfr]
storep previousCFR, CallerFrame[cfr]
if X86
loadp 40[sp], protoCallFrame
elsif X86_WIN
loadp 44[sp,temp3], protoCallFrame
end
This works fine in both debug and release, no more asserts, and I can see that the value of the parameters picked off the stack are correct.
Is this an OK way to do it?
--
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