mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 14:55:25 +00:00
wasm: implement shl for big integers
This commit is contained in:
parent
b93fa9833e
commit
55a260c968
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user