Repository navigation
Commit a1b4772
committed
[JSC] Six-operand
https://bugs.webkit.org/show_bug.cgi?id=327768
Reviewed by Yusuke Suzuki.
The six-operand form of MoveConditionallyTest64 declared its two test operands
as U:G:32, while the five-operand form declares them as U:G:64. On x86-64 the
register allocator turns `Move %a, %b` into Move32 when every use of %b is
32-bit, so a 64-bit value used only by this instruction lost its upper half,
and Select picked the wrong arm when the low 32 bits were zero.
Move32 %rdi, %rax
MoveConditionallyTest64 NonZero, %rax, %rax, %rsi, %rdx, %rax
ARM64 has the same declaration but generates correct code, since only x86-64
narrows Move based on the use width, and spill slots are sized by the larger of
the use and def widths.
This patch declares them as U:G:64.
Tests: JSTests/wasm/stress/omg-select-i64-test-high-bits.js
Source/JavaScriptCore/b3/testb3_1.cpp
Source/JavaScriptCore/b3/testb3_6.cpp
* JSTests/wasm/stress/omg-select-i64-test-high-bits.js: Added.
(m.call):
* Source/JavaScriptCore/b3/air/AirOpcode.opcodes:
* Source/JavaScriptCore/b3/testb3.h:
* Source/JavaScriptCore/b3/testb3_1.cpp:
(run):
* Source/JavaScriptCore/b3/testb3_6.cpp:
(testSelectTestHighBits):
Canonical link: https://commits.webkit.org/323931@mainMoveConditionallyTest64 should declare its test operands as 64-bit1 parent 21f32b5 commit a1b4772
5 files changed
Lines changed: 54 additions & 1 deletion
File tree
- JSTests/wasm/stress
- Source/JavaScriptCore/b3
- air
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1723 | 1723 | | |
1724 | 1724 | | |
1725 | 1725 | | |
1726 | | - | |
| 1726 | + | |
1727 | 1727 | | |
1728 | 1728 | | |
1729 | 1729 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
612 | 613 | | |
613 | 614 | | |
614 | 615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
| 1002 | + | |
1002 | 1003 | | |
1003 | 1004 | | |
1004 | 1005 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
95 | 116 | | |
96 | 117 | | |
97 | 118 | | |
| |||
0 commit comments