wasm: implement shl for big integers

This commit is contained in:
Luuk de Gram 2023-05-17 20:31:18 +02:00
parent b93fa9833e
commit 55a260c968
No known key found for this signature in database
GPG Key ID: A8CFE58E4DC7D664
2 changed files with 1 additions and 1 deletions

View File

@ -2604,6 +2604,7 @@ fn binOpBigInt(func: *CodeGen, lhs: WValue, rhs: WValue, ty: Type, op: Op) Inner
switch (op) {
.mul => return func.callIntrinsic("__multi3", &.{ ty, ty }, ty, &.{ lhs, rhs }),
.shr => return func.callIntrinsic("__lshrti3", &.{ ty, Type.i32 }, ty, &.{ lhs, rhs }),
.shl => return func.callIntrinsic("__ashlti3", &.{ ty, Type.i32 }, ty, &.{ lhs, rhs }),
.xor => {
const result = try func.allocStack(ty);
try func.emitWValue(result);

View File

@ -87,7 +87,6 @@ test "truncate int128" {
}
test "shift int128" {
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO