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

ppc: [liftoff] implement conversion from int to float

Change-Id: Ia530c3505e3675f8170900e0c64fea2cdb8e44a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3164907Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76885}
parent 5a7d7de9
......@@ -1101,6 +1101,38 @@ bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode,
case kExprF64ConvertF32:
fmr(dst.fp(), src.fp());
return true;
case kExprF32SConvertI32: {
ConvertIntToFloat(src.gp(), dst.fp());
return true;
}
case kExprF32UConvertI32: {
ConvertUnsignedIntToFloat(src.gp(), dst.fp());
return true;
}
case kExprF64SConvertI32: {
ConvertIntToDouble(src.gp(), dst.fp());
return true;
}
case kExprF64UConvertI32: {
ConvertUnsignedIntToDouble(src.gp(), dst.fp());
return true;
}
case kExprF64SConvertI64: {
ConvertInt64ToDouble(src.gp(), dst.fp());
return true;
}
case kExprF64UConvertI64: {
ConvertUnsignedInt64ToDouble(src.gp(), dst.fp());
return true;
}
case kExprF32SConvertI64: {
ConvertInt64ToFloat(src.gp(), dst.fp());
return true;
}
case kExprF32UConvertI64: {
ConvertUnsignedInt64ToFloat(src.gp(), dst.fp());
return true;
}
default:
break;
}
......
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