Commit f2f392fb authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

ppc: [liftoff] implement basic type conversion

Change-Id: I1cfb706a429a67830640ec3274b95dd6ee9cdd56
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3164904Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76883}
parent 96fc2719
......@@ -1085,6 +1085,25 @@ bool LiftoffAssembler::emit_i64_remu(LiftoffRegister dst, LiftoffRegister lhs,
bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode,
LiftoffRegister dst,
LiftoffRegister src, Label* trap) {
switch (opcode) {
case kExprI32ConvertI64:
extsw(dst.gp(), src.gp());
return true;
case kExprI64SConvertI32:
extsw(dst.gp(), src.gp());
return true;
case kExprI64UConvertI32:
ZeroExtWord32(dst.gp(), src.gp());
return true;
case kExprF32ConvertF64:
frsp(dst.fp(), src.fp());
return true;
case kExprF64ConvertF32:
fmr(dst.fp(), src.fp());
return true;
default:
break;
}
bailout(kUnsupportedArchitecture, "emit_type_conversion");
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment