Skip to content

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

Merged
merged 3 commits into from
Oct 2, 2018

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Sep 28, 2018

…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

…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
Copy link
Contributor

@jgravelle-google jgravelle-google left a 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

}

void getTempRet0(int value) {
__tempRet0 = value;
Copy link
Contributor

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'],
Copy link
Contributor

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

Copy link
Collaborator Author

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.

@sbc100 sbc100 merged commit dbb62d2 into incoming Oct 2, 2018
@sbc100 sbc100 deleted the sjlj_helpers branch October 2, 2018 21:46
earl pushed a commit to earl/llvm-mirror that referenced this pull request Oct 2, 2018
…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
aheejin added a commit to aheejin/emscripten that referenced this pull request Oct 10, 2018
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.
aheejin added a commit that referenced this pull request Oct 11, 2018
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.
llvm-git-migration pushed a commit to llvm-git-prototype/llvm that referenced this pull request Nov 6, 2018
…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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants