You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to implement Binaryen backend for QEMU (see WebAssembly/binaryen#1494), I got a crash because of the function llvm_returnaddress is not defined. From the documentation, looks like it is quite safe to make it always return 0.
As I understand, I cannot implement it in C, because it will get a _ prefix in its name. On the other hand, implementing it in JS seems to be not efficient (though, when I manually patched the generated .js file to make the llvm_returnaddress return 0, QEMU started correctly).
The text was updated successfully, but these errors were encountered:
atrosinenko
changed the title
Implement llvm.returnaddress intrinsic
Implement dummy llvm.returnaddress intrinsic
Dec 9, 2018
Defining it in src/library.js, as llvm_returnaddress: function() { return 0 },, should work ok (the prefix etc. will be handled for you) for testing purposes and proof of concept.
If it turns out it's called many times and speed is an issue, we can implement it in the backend in theory. However, first we should see if QEMU actually works with that function returning 0 all the time.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
When trying to implement Binaryen backend for QEMU (see WebAssembly/binaryen#1494), I got a crash because of the function
llvm_returnaddress
is not defined. From the documentation, looks like it is quite safe to make it always return0
.As I understand, I cannot implement it in C, because it will get a
_
prefix in its name. On the other hand, implementing it in JS seems to be not efficient (though, when I manually patched the generated .js file to make thellvm_returnaddress
return0
, QEMU started correctly).The text was updated successfully, but these errors were encountered: