-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[wasm] f32.min/max interpreter and inline support #659
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
Conversation
|
Hi @commonlisp, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! The agreement was validated by Microsoft and real humans are currently evaluating your PR. TTYL, MSBOT; |
|
Hi @commonlisp, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! The agreement was validated by Microsoft and real humans are currently evaluating your PR. TTYL, MSBOT; |
| break; | ||
|
|
||
| case Js::OpCodeAsmJs::Min_Flt: | ||
| instr = IR::Instr::New(Js::OpCode::InlineMathMin, dstOpnd, src1Opnd, src2Opnd, m_func); |
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 took a look and lowering codepath also needs to be changed, i.e. LowerMDShared.cpp around line 9200 we need a case for float32.
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.
if you want to wait and implement in another checkin that is ok, but I would like if we have explicit failure here. Otherwise if someone tries to JIT this it might lead to confusing failure (crash will not happen until lowering or maybe even further)
|
Any update on this PR? |
|
This PR is unfortunately blocked on #831 for now. |
|
@commonlisp Is this still blocked? |
16cda77 to
d92bb2a
Compare
|
@MikeHolman @Cellule Please take a look when you have a chance. |
|
Could you remove the Reviewed 13 of 16 files at r1, 1 of 4 files at r2, 1 of 3 files at r3, 13 of 13 files at r4. lib/Backend/LowerMDShared.cpp, line 9292 [r4] (raw file):
Could you update this comment to reflect the changes you made lib/Backend/LowerMDShared.cpp, line 9333 [r4] (raw file):
You should call lib/Backend/LowerMDShared.cpp, line 9418 [r4] (raw file):
I think it would be worth to rewrite the NaN implementation here instead of a helper call. lib/Runtime/ByteCode/OpCodes.h, line 759 [r4] (raw file):
nit: follow alignment of the file lib/Runtime/Library/JavascriptNumber.h, line 51 [r4] (raw file):
No need to change this. lib/Runtime/Math/AsmJsMath.inl, line 9 [r4] (raw file):
We are using test/wasm/f32.js, line 6 [r4] (raw file):
nit: trailing whitespaces test/wasm/rlexe.xml, line 45 [r4] (raw file):
Why have a version without Comments from Reviewable |
cc9ed18 to
63f72d1
Compare
|
Review status: 8 of 18 files reviewed at latest revision, 8 unresolved discussions. lib/Runtime/Library/JavascriptNumber.h, line 51 [r4] (raw file):
|
|
Reviewed 10 of 20 files at r5. Comments from Reviewable |
lib/Backend/IRBuilderAsmJs.cpp
Outdated
| break; | ||
|
|
||
| case Js::OpCodeAsmJs::Min_Flt: | ||
| instr = IR::Instr::New(Js::OpCode::MinNaN, dstOpnd, src1Opnd, src2Opnd, m_func); |
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 don't really like calling this MinNaN. IMO would rather call this something like WasmMin, or not create new opcode and in lowering check to see if the function is a wasm 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.
Ok.
63f72d1 to
a5962dc
Compare
a5962dc to
5e24b88
Compare
|
|
…pport Merge pull request #659 from commonlisp:wasm_f32minmax f32 min max codegen
Working on supporting missing f32 opcodes in wasm
This change is