Closed
Bug 1322450
Opened 9 years ago
Closed 9 years ago
Wasm baseline: x86 byte stores do not always select byte register
Categories
(Core :: JavaScript Engine: JIT, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla53
| Tracking | Status | |
|---|---|---|
| firefox53 | --- | fixed |
People
(Reporter: lth, Assigned: lth)
References
Details
Attachments
(1 file)
|
2.19 KB,
patch
|
bbouvier
:
review+
|
Details | Diff | Splinter Review |
Test case is github.com/lars-t-hansen/embenchen/, see asm_v_wasm/wasm_box2d.js. When storing 8 bytes from an i64 value the baseline compiler does properly consider whether the low register of the 64-bit pair has a byte personality.
| Assignee | ||
Comment 1•9 years ago
|
||
No TC included, as I still hope to land the embenchen tests (with suitably low runtime) as test cases.
Attachment #8817342 -
Flags: review?(bbouvier)
| Assignee | ||
Updated•9 years ago
|
Priority: -- → P1
Comment 2•9 years ago
|
||
Here's a test case for you:
(module
(memory 1)
(func $run (param i64) (param i32) (param i32)
get_local 1
get_local 2
i32.add
get_local 1
get_local 2
i32.add
i32.const 0
get_local 0
i64.store8
drop
drop
)
(export "run" $run)
)
Comment 3•9 years ago
|
||
Comment on attachment 8817342 [details] [diff] [review]
bug1322450-byte-reg.patch
Review of attachment 8817342 [details] [diff] [review]:
-----------------------------------------------------------------
Indeed. Thanks!
::: js/src/wasm/WasmBaselineCompile.cpp
@@ +3451,5 @@
> masm.wasmStoreI64(access, src.i64(), dstAddr);
> } else {
> AnyRegister value;
> if (src.tag == AnyReg::I64) {
> + if (access.byteSize() == 1 && !singleByteRegs_.has(src.i64().low)) {
Could the code be rearranged so that there's only check that access.byteSize() == 1 and !singleByteRegs_.has(input)? This small duplication is a bit ugly here, but factoring out might introduce overhead, and any way works here, but asking just in case...
Attachment #8817342 -
Flags: review?(bbouvier) → review+
Comment 4•9 years ago
|
||
(to be clear, I'd like that you embed the test in comment 2 in your patch, as part of the regression suite now, please)
| Assignee | ||
Comment 5•9 years ago
|
||
| Assignee | ||
Comment 6•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5291363eea76e7f75ac30d09119e911c4d3bfe56
Bug 1322450 - wasm baseline, use byte-capable register when storing one byte from 64-bit register. r=bbouvier
Comment 7•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•