Implement some missing maths-related intrinsics#4095
Implement some missing maths-related intrinsics#4095kripken merged 1 commit intoemscripten-core:incomingfrom
Conversation
| llvm_log_f64: 'Math_log', | ||
| llvm_exp_f32: 'Math_exp', | ||
| llvm_exp_f64: 'Math_exp', | ||
| llvm_trunc_f64: 'Math_trunc', |
There was a problem hiding this comment.
Are there such things as llvm_trunc_f32 and llvm_floor_f32? If so, could add those as well?
|
Is |
|
@juj Oh I didn't realize these functions were part of an asm.js standard library. I just looked at a reference for the standard javascript |
|
It also looks like |
|
Emscripten side makes sense for things that are not asm.js builtins (then other projects can use them too). See e.g. For things that are asm.js builtins, adding them to library.js makes them work, but to make them fast we'd need them in the asm.js backend in LLVM. (But that can be done later, if needed.) |
|
I don't think we should reuse anything from |
|
Yes, that does look out of date. @lukewagner, do you know what the correct list is? |
|
Looks like |
| @@ -1764,6 +1764,7 @@ var Math_imul = Math.imul; | |||
| var Math_fround = Math.fround; | |||
| var Math_min = Math.min; | |||
| var Math_clz32 = Math.clz32; | |||
There was a problem hiding this comment.
since trunc is fairly new in ES6, we should have a pollyfill.
|
Ok, given the optimization discussion, this looks good to go aside from needing a |
|
What's the status here? Anything I can do to help? |
|
Sorry, I was taken by the release of Vulkan. It should be good now. |
|
Thanks, merged! This uncovered a backend bug with |
These intrinsics are used by the Rust compiler.