Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Support Emscripten EH/SjLj in Wasm64 #14108
Support Emscripten EH/SjLj in Wasm64 #14108
Changes from all commits
0eca1c6
abe0ce1
de7ba72
8b06b62
06270c9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What is this
__deps
and how is this different from entries in deps_info.py? I deleted this because tests run correctly without this, but not sure what this is for.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 first tried to change this to
siglongjmp: '_emscripten_longjmp'
But then
wasm0.test_longjmp
succeeds butwasm1.test_longjmp
fails saying "no alias for siglongjmp[here](https://github.com/emscripten-core/emscripten/blob/ad438dfba750622d124f2de5b1154a374aeeaec4/src/modules.js#L270). Not really sure what's going on and why
wasm0.test_longjmpworks while
wasm1doesn't, but all tests work if I move
if ASSERTIONS` into the function .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.
You should probable move this alias into native code alongsize longjmp.
If its really just an alias you can use
weak_alias
in the C source code, but it looks like the signature is different so you might need to write a one-line wrapper here.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.
That sounds better. I'll split this PR into two as you suggested and do it there.
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.
It looks like this is an auto-incrementing counter.. set from the
uint32_t setjmpId
above. If so why does it need to change type? At least I would expectsetjmpId
to be of the same type.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.
It's tricky... It looks I need to turn even more variables into
uintptr_t
.emscripten_longjmp
in turn changedtestSetjmp
's first argument touintptr_t
.testSetjmp
's first argumentid
is compared with the local variablecurr
. So it'suintptr_t
now: Linkcurr
is set fromtable[i].id
, which isTableEntry.id
. Soid
inTableEntry
here is nowuintptr_t
: Linktable[i].id
is set fromsetjmpId
,setjmpId
needs to beuintptr_t
too: LinksetjmpId
is stored inenv
(first parameter) insaveSetjmp
,saveSetjmp
's first argument has to change touintptr_t
: Link5 was missing in this PR so I added it too. Not sure if this propagation of
uintptr_t
is good... WDYT?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.
Cool... I tried this but I got some odd crashed in the compiler.. but if this works that is great!