Repository navigation
Commit fad9c39
committed
[JSC] B3 LowerToAir's xor-and-rotate match should require a logical right shift and mask shift amounts
https://bugs.webkit.org/show_bug.cgi?id=328171
rdar://190502335
Reviewed by Tadeu Zagallo.
We are returning int8_t without masking the constant shift amount with
63. As a result, large number exceeding int8_t (like 200) gets truncated
into int8_t. For example, `VectorShl(x, 200)` will be seen as
`VectorShl(x, -56)`, and it is the same to `VectorShr(x, 56)`. But the
actual value was `VectorShl(x, 8)` as we take 200 & 63 (and that's the
right behavior).
Tests: Source/JavaScriptCore/b3/testb3_1.cpp
Source/JavaScriptCore/b3/testb3_7.cpp
* Source/JavaScriptCore/b3/B3LowerToAir.cpp:
* Source/JavaScriptCore/b3/testb3.h:
* Source/JavaScriptCore/b3/testb3_1.cpp:
(run):
* Source/JavaScriptCore/b3/testb3_7.cpp:
(testVectorXorRotateRight64ShiftKindAndAmount):
Canonical link: https://commits.webkit.org/324256@main1 parent ae823d5 commit fad9c39
4 files changed
Lines changed: 83 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5547 | 5547 | | |
5548 | 5548 | | |
5549 | 5549 | | |
5550 | | - | |
5551 | | - | |
5552 | | - | |
5553 | | - | |
| 5550 | + | |
| 5551 | + | |
| 5552 | + | |
| 5553 | + | |
5554 | 5554 | | |
5555 | 5555 | | |
5556 | 5556 | | |
5557 | 5557 | | |
5558 | 5558 | | |
5559 | | - | |
5560 | | - | |
5561 | | - | |
5562 | | - | |
5563 | | - | |
5564 | | - | |
5565 | | - | |
5566 | 5559 | | |
5567 | 5560 | | |
5568 | 5561 | | |
5569 | 5562 | | |
5570 | 5563 | | |
5571 | 5564 | | |
| 5565 | + | |
5572 | 5566 | | |
5573 | | - | |
| 5567 | + | |
5574 | 5568 | | |
5575 | | - | |
5576 | | - | |
| 5569 | + | |
| 5570 | + | |
5577 | 5571 | | |
5578 | 5572 | | |
5579 | 5573 | | |
| |||
5645 | 5639 | | |
5646 | 5640 | | |
5647 | 5641 | | |
5648 | | - | |
5649 | | - | |
| 5642 | + | |
| 5643 | + | |
5650 | 5644 | | |
5651 | 5645 | | |
5652 | 5646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
| 1571 | + | |
1571 | 1572 | | |
1572 | 1573 | | |
1573 | 1574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1567 | 1567 | | |
1568 | 1568 | | |
1569 | 1569 | | |
| 1570 | + | |
1570 | 1571 | | |
1571 | 1572 | | |
1572 | 1573 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3946 | 3946 | | |
3947 | 3947 | | |
3948 | 3948 | | |
3949 | | - | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
| 3956 | + | |
| 3957 | + | |
| 3958 | + | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
| 3966 | + | |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
| 3974 | + | |
| 3975 | + | |
| 3976 | + | |
| 3977 | + | |
| 3978 | + | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + | |
| 3993 | + | |
| 3994 | + | |
| 3995 | + | |
| 3996 | + | |
| 3997 | + | |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
| 4004 | + | |
| 4005 | + | |
| 4006 | + | |
| 4007 | + | |
| 4008 | + | |
| 4009 | + | |
| 4010 | + | |
| 4011 | + | |
| 4012 | + | |
| 4013 | + | |
| 4014 | + | |
| 4015 | + | |
| 4016 | + | |
| 4017 | + | |
| 4018 | + | |
| 4019 | + | |
3950 | 4020 | | |
3951 | 4021 | | |
3952 | 4022 | | |
| |||
0 commit comments