Closed
Bug 1434843
Opened 6 years ago
Closed 6 years ago
[MIPS] Cleanup integer <-> floating point conversions
Categories
(Core :: JavaScript Engine: JIT, enhancement, P5)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: dragan.mladjenovic, Assigned: dragan.mladjenovic)
References
Details
Attachments
(6 files, 10 obsolete files)
11.17 KB,
patch
|
dragan.mladjenovic
:
review+
|
Details | Diff | Splinter Review |
43.37 KB,
patch
|
dragan.mladjenovic
:
review+
|
Details | Diff | Splinter Review |
5.21 KB,
patch
|
dragan.mladjenovic
:
review+
|
Details | Diff | Splinter Review |
5.07 KB,
patch
|
dragan.mladjenovic
:
review+
|
Details | Diff | Splinter Review |
6.24 KB,
patch
|
dragan.mladjenovic
:
review+
|
Details | Diff | Splinter Review |
5.71 KB,
patch
|
lth
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36
Assignee | ||
Comment 1•6 years ago
|
||
Attachment #8947386 -
Flags: review?(yuyin-hf)
Assignee | ||
Comment 2•6 years ago
|
||
Attachment #8947387 -
Flags: review?(yuyin-hf)
Assignee | ||
Comment 3•6 years ago
|
||
Attachment #8947388 -
Flags: review?(yuyin-hf)
Assignee | ||
Comment 4•6 years ago
|
||
Attachment #8947389 -
Flags: review?(yuyin-hf)
Assignee | ||
Comment 5•6 years ago
|
||
Attachment #8947390 -
Flags: review?(yuyin-hf)
Attachment #8947386 -
Flags: review?(yuyin-hf) → review+
Attachment #8947387 -
Flags: review?(yuyin-hf) → review+
Comment on attachment 8947388 [details] [diff] [review] bug1434843_maybe.patch Review of attachment 8947388 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit/mips64/MacroAssembler-mips64-inl.h @@ +741,5 @@ > + moveFromDouble(ScratchDoubleReg, dest); > + ma_ext(ScratchRegister, ScratchRegister, Assembler::CauseV, 1); > + ma_b(ScratchRegister, Imm32(0), fail, Assembler::NotEqual); > + > + as_sll(dest, dest, 0); sign extend? @@ +753,5 @@ > + moveFromDouble(ScratchDoubleReg, dest); > + ma_ext(ScratchRegister, ScratchRegister, Assembler::CauseV, 1); > + ma_b(ScratchRegister, Imm32(0), fail, Assembler::NotEqual); > + > + as_sll(dest, dest, 0); sorry, I am not quite understand the code, but I just check arm64 & x64, they are zero extend?
Attachment #8947389 -
Flags: review?(yuyin-hf) → review+
Attachment #8947390 -
Flags: review?(yuyin-hf) → review+
Assignee | ||
Comment 7•6 years ago
|
||
(In reply to yuyin from comment #6) > Comment on attachment 8947388 [details] [diff] [review] > bug1434843_maybe.patch > > Review of attachment 8947388 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: js/src/jit/mips64/MacroAssembler-mips64-inl.h > @@ +741,5 @@ > > + moveFromDouble(ScratchDoubleReg, dest); > > + ma_ext(ScratchRegister, ScratchRegister, Assembler::CauseV, 1); > > + ma_b(ScratchRegister, Imm32(0), fail, Assembler::NotEqual); > > + > > + as_sll(dest, dest, 0); > > sign extend? > > @@ +753,5 @@ > > + moveFromDouble(ScratchDoubleReg, dest); > > + ma_ext(ScratchRegister, ScratchRegister, Assembler::CauseV, 1); > > + ma_b(ScratchRegister, Imm32(0), fail, Assembler::NotEqual); > > + > > + as_sll(dest, dest, 0); > > sorry, I am not quite understand the code, but I just check arm64 & x64, > they are zero extend? Thank you for your review. The comments state that this operation can be implemented as by doing conversion to int64 and then mod 2**32 which is effectively acts as zero extension, but because int32 result has to be sign extended for mips64 we are doing the sign extension here. I'll put the comments for that.
Attachment #8947388 -
Flags: review?(yuyin-hf) → review+
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Assignee | ||
Comment 8•6 years ago
|
||
Attachment #8947386 -
Attachment is obsolete: true
Attachment #8949435 -
Flags: review+
Assignee | ||
Comment 9•6 years ago
|
||
Attachment #8947387 -
Attachment is obsolete: true
Attachment #8949436 -
Flags: review+
Assignee | ||
Comment 10•6 years ago
|
||
Attachment #8947388 -
Attachment is obsolete: true
Attachment #8949438 -
Flags: review+
Assignee | ||
Comment 11•6 years ago
|
||
Attachment #8947389 -
Attachment is obsolete: true
Attachment #8949439 -
Flags: review+
Assignee | ||
Comment 12•6 years ago
|
||
Attachment #8947390 -
Attachment is obsolete: true
Attachment #8949440 -
Flags: review+
Assignee | ||
Comment 13•6 years ago
|
||
Attachment #8949435 -
Attachment is obsolete: true
Attachment #8953028 -
Flags: review+
Assignee | ||
Comment 14•6 years ago
|
||
Attachment #8949436 -
Attachment is obsolete: true
Attachment #8953029 -
Flags: review+
Assignee | ||
Comment 15•6 years ago
|
||
Attachment #8949438 -
Attachment is obsolete: true
Attachment #8953030 -
Flags: review+
Assignee | ||
Comment 16•6 years ago
|
||
Attachment #8949439 -
Attachment is obsolete: true
Attachment #8953031 -
Flags: review+
Assignee | ||
Comment 17•6 years ago
|
||
Attachment #8949440 -
Attachment is obsolete: true
Attachment #8953032 -
Flags: review+
Assignee | ||
Comment 18•6 years ago
|
||
Attachment #8953033 -
Flags: review?(lhansen)
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed,
leave-open
Comment 19•6 years ago
|
||
Comment on attachment 8953033 [details] [diff] [review] bug1434843_emu.patch Review of attachment 8953033 [details] [diff] [review]: ----------------------------------------------------------------- If you say so :) Looks plausible to me, though.
Attachment #8953033 -
Flags: review?(lhansen) → review+
Assignee | ||
Updated•6 years ago
|
Keywords: leave-open
Comment 20•6 years ago
|
||
Pushed by dluca@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ef2229b002f9 [MIPS] Remove SecondScratchDoubleReg; r=yuyin https://hg.mozilla.org/integration/mozilla-inbound/rev/1214c83e6724 [MIPS] Cleanup wasm truncate ; r=yuyin https://hg.mozilla.org/integration/mozilla-inbound/rev/57b5316a4c11 [MIPS] Cleanup MacroAssembler::branchTruncate*MaybeModUint32 ; r=yuyin https://hg.mozilla.org/integration/mozilla-inbound/rev/c9de0227411a [MIPS] Make clampDoubleToUint8 less branchy; r=yuyin https://hg.mozilla.org/integration/mozilla-inbound/rev/19eff992b4bb [MIPS] Use FCSR to detect inexact conversion to integer; r=yuyin https://hg.mozilla.org/integration/mozilla-inbound/rev/93b63582b679 [MIPS] Emulate FCRS Cause bits; r=
Keywords: checkin-needed
Comment 21•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ef2229b002f9 https://hg.mozilla.org/mozilla-central/rev/1214c83e6724 https://hg.mozilla.org/mozilla-central/rev/57b5316a4c11 https://hg.mozilla.org/mozilla-central/rev/c9de0227411a https://hg.mozilla.org/mozilla-central/rev/19eff992b4bb https://hg.mozilla.org/mozilla-central/rev/93b63582b679
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•6 years ago
|
Assignee: nobody → dragan.mladjenovic
You need to log in
before you can comment on or make changes to this bug.
Description
•