-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Move setjmp/longjmp helper functions and globals to compiler_rt_wasm … #7203
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
…library Previously these have been generated by LLVM during codegen but this doesn't work once we have separate compilation. See LLVM change: https://reviews.llvm.org/D49208
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.
General approach is good
system/lib/compiler-rt/extras.c
Outdated
} | ||
|
||
void getTempRet0(int value) { | ||
__tempRet0 = value; |
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.
Maybe
int getTempRet0() {
return __tempRet0;
}
@@ -467,6 +467,8 @@ def create_wasm_compiler_rt(libname): | |||
'ashldi3.c', 'fixdfdi.c', 'floatdidf.c', 'lshrdi3.c', 'moddi3.c', | |||
'trunctfdf2.c', 'trunctfsf2.c', 'umoddi3.c', 'fixunsdfdi.c', 'muldi3.c', | |||
'divdi3.c', 'divmoddi4.c', 'udivdi3.c', 'udivmoddi4.c']) | |||
files += files_in_path(path_components=['system', 'lib', 'compiler-rt'], |
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.
Maybe move+rename extras.c
to system/lib/compiler-rt/lib/wasm_extras.c
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.
Yeah.. I thought about giving it a different name. Perhaps moving it up one level to its not in the compiler-rt source directory at all.
The thing is we have libc/extra.c so I thought it would be good to be consistent with that.
[skip ci]
…criptenEHSjLj Previously we were creating weakly defined helper function in each translation unit: - setThrew - setTempRet0 Instead we now assume these will be provided at link time. In emscripten they are provided in compiler-rt: emscripten-core/emscripten#7203 Additionally we previously created three global variable which are also now required to exist at link time instead. - __THREW__ - _threwValue - __tempRet0 Differential Revision: https://reviews.llvm.org/D49208 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343640 91177308-0d34-0410-b5e6-96231b3b80d8
PR emscripten-core#7203 added some functions used for emscripten EH and they are now exported. They can be DCE'd if they are not used but not at -O1.
PR #7203 added some functions used for emscripten EH and they are now exported. They can be DCE'd if they are not used but not at -O1.
…criptenEHSjLj Previously we were creating weakly defined helper function in each translation unit: - setThrew - setTempRet0 Instead we now assume these will be provided at link time. In emscripten they are provided in compiler-rt: emscripten-core/emscripten#7203 Additionally we previously created three global variable which are also now required to exist at link time instead. - __THREW__ - _threwValue - __tempRet0 Differential Revision: https://reviews.llvm.org/D49208 llvm-svn=343640
…library
Previously these have been generated by LLVM during codegen
but this doesn't work once we have separate compilation.
See LLVM change: https://reviews.llvm.org/D49208