mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Issue #3049 - Add LoongArch minimal JIT multiply support
This commit is contained in:
parent
02eaa0dbc6
commit
3faf2d1249
2 changed files with 47 additions and 3 deletions
|
|
@ -80,6 +80,14 @@ function unsignedRightShift(a, b) {
|
|||
return a >>> b;
|
||||
}
|
||||
|
||||
function multiply(a, b) {
|
||||
return a * b;
|
||||
}
|
||||
|
||||
function multiplyZero(a) {
|
||||
return a * 0;
|
||||
}
|
||||
|
||||
function assignArg(a, b) {
|
||||
a = a < b;
|
||||
return a;
|
||||
|
|
@ -150,6 +158,11 @@ assertEq(leftShift(1, 33), 2);
|
|||
assertEq(rightShift(-8, 1), -4);
|
||||
assertEq(unsignedRightShift(-1, 1), 2147483647);
|
||||
assertEq(unsignedRightShift(-1, 0), 4294967295);
|
||||
assertEq(multiply(6, 7), 42);
|
||||
assertEq(multiply(-3, 7), -21);
|
||||
assertEq(multiply(1073741824, 4), 4294967296);
|
||||
assertEq(multiplyZero(3), 0);
|
||||
assertEq(1 / multiplyZero(-3), -Infinity);
|
||||
assertEq(assignArg(2, 3), true);
|
||||
assertEq(assignArg(3, 2), false);
|
||||
assertEq(boolToNumeric(2, 3), 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue