-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Set temporaryCallFrame in WebAssembly.asm when !USE(BUILTIN_FRAME_ADDRESS) #46839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
EWS run on previous version of this PR (hash d140d36) |
d140d36
to
d273218
Compare
EWS run on previous version of this PR (hash d273218) |
…RESS) https://bugs.webkit.org/show_bug.cgi?id=294597 Reviewed by NOBODY (OOPS!). When !USE(BUILTIN_FRAME_ADDRESS), DECLARE_WASM_CALL_FRAME() expects a non-null temporaryCallFrame().
d273218
to
ae10311
Compare
EWS run on current version of this PR (hash ae10311) |
#if USE(BUILTIN_FRAME_ADDRESS) | ||
#define OFFLINE_ASM_USE_BUILTIN_FRAME_ADDRESS 1 | ||
#else | ||
#define OFFLINE_ASM_USE_BUILTIN_FRAME_ADDRESS 0 | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This addition makes LLIntAssembly.h bloat significantly (since LLInt generates each combination).
@@ -1159,7 +1158,7 @@ end | |||
loadp (constexpr (JSWebAssemblyInstance::offsetOfVM()))[wasmInstance], a0 | |||
copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(a0, a1) | |||
|
|||
if ASSERT_ENABLED | |||
if (not USE_BUILTIN_FRAME_ADDRESS) or ASSERT_ENABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should just make ARMv7 work with BUILTIN_FRAME_ADDRESS
. It is the last JIT architecture which is not supporting this BUILTIN_FRAME_ADDRES
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In IPInt side, I think we should just put this frame without ASSERT_ENABLED. We would like to support arbitrary arch in IPInt, and we may support things without USE_BUILTIN_FRAME_ADDRESS. But anyway, I think definitely all JIT arch should support USE_BUILTIN_FRAME_ADDRESS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But for this particular case, I think we should just enable USE_BUILTIN_FRAME_ADDRESS for ARMv7. That's the simplest solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. However it looks like we get broken code when doing a Release build with GCC on ARMv7. I can see it doing
sub sp, #180 @ 0xb4
add r7, sp, #24
and then dereferencing that to get the caller frame address. clang
correctly sets up r7
before allocating stack space. Looking for a workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any way to work around this, I think this needs an upstream GCC fix. How about we gate this on ARMv7
in WebAssembly.asm for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e. to avoid the blow up in LLIntAssembly.h
.
I agree with @aoikonomopoulos; I think the best path forward here is 1) a patch for GCC, and 2) to use ARMv7 as the condition for now, to avoid blowing up the header. Then, we can bump up the minimum supported GCC version and remove this. |
d140d36
ae10311
🛠 playstation