Commit 250b9cf8 authored by sreten.kovacevic's avatar sreten.kovacevic Committed by Commit Bot

[Liftoff][mips] Implement f32 and f64 unops

Implement f32 and f64 abs, neg and sqrt unops.

Bug: v8:6600
Change-Id: If2c9b0fa488c83ee53afe6debc990fffcd08894a
Reviewed-on: https://chromium-review.googlesource.com/970826Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52107}
parent a3991ed4
...@@ -458,28 +458,28 @@ UNIMPLEMENTED_I64_SHIFTOP(shr) ...@@ -458,28 +458,28 @@ UNIMPLEMENTED_I64_SHIFTOP(shr)
DoubleRegister rhs) { \ DoubleRegister rhs) { \
instruction(dst, lhs, rhs); \ instruction(dst, lhs, rhs); \
} }
#define UNIMPLEMENTED_FP_UNOP(name) \ #define FP_UNOP(name, instruction) \
void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister src) { \ void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister src) { \
BAILOUT("fp unop"); \ instruction(dst, src); \
} }
FP_BINOP(f32_add, add_s) FP_BINOP(f32_add, add_s)
FP_BINOP(f32_sub, sub_s) FP_BINOP(f32_sub, sub_s)
FP_BINOP(f32_mul, mul_s) FP_BINOP(f32_mul, mul_s)
FP_BINOP(f32_div, div_s) FP_BINOP(f32_div, div_s)
UNIMPLEMENTED_FP_UNOP(f32_abs) FP_UNOP(f32_abs, abs_s)
UNIMPLEMENTED_FP_UNOP(f32_neg) FP_UNOP(f32_neg, neg_s)
UNIMPLEMENTED_FP_UNOP(f32_sqrt) FP_UNOP(f32_sqrt, sqrt_s)
FP_BINOP(f64_add, add_d) FP_BINOP(f64_add, add_d)
FP_BINOP(f64_sub, sub_d) FP_BINOP(f64_sub, sub_d)
FP_BINOP(f64_mul, mul_d) FP_BINOP(f64_mul, mul_d)
FP_BINOP(f64_div, div_d) FP_BINOP(f64_div, div_d)
UNIMPLEMENTED_FP_UNOP(f64_abs) FP_UNOP(f64_abs, abs_d)
UNIMPLEMENTED_FP_UNOP(f64_neg) FP_UNOP(f64_neg, neg_d)
UNIMPLEMENTED_FP_UNOP(f64_sqrt) FP_UNOP(f64_sqrt, sqrt_d)
#undef FP_BINOP #undef FP_BINOP
#undef UNIMPLEMENTED_FP_BINOP #undef FP_UNOP
bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode, bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode,
LiftoffRegister dst, LiftoffRegister dst,
......
...@@ -405,28 +405,28 @@ UNIMPLEMENTED_I64_SHIFTOP(shr) ...@@ -405,28 +405,28 @@ UNIMPLEMENTED_I64_SHIFTOP(shr)
DoubleRegister rhs) { \ DoubleRegister rhs) { \
instruction(dst, lhs, rhs); \ instruction(dst, lhs, rhs); \
} }
#define UNIMPLEMENTED_FP_UNOP(name) \ #define FP_UNOP(name, instruction) \
void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister src) { \ void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister src) { \
BAILOUT("fp unop"); \ instruction(dst, src); \
} }
FP_BINOP(f32_add, add_s) FP_BINOP(f32_add, add_s)
FP_BINOP(f32_sub, sub_s) FP_BINOP(f32_sub, sub_s)
FP_BINOP(f32_mul, mul_s) FP_BINOP(f32_mul, mul_s)
FP_BINOP(f32_div, div_s) FP_BINOP(f32_div, div_s)
UNIMPLEMENTED_FP_UNOP(f32_abs) FP_UNOP(f32_abs, abs_s)
UNIMPLEMENTED_FP_UNOP(f32_neg) FP_UNOP(f32_neg, neg_s)
UNIMPLEMENTED_FP_UNOP(f32_sqrt) FP_UNOP(f32_sqrt, sqrt_s)
FP_BINOP(f64_add, add_d) FP_BINOP(f64_add, add_d)
FP_BINOP(f64_sub, sub_d) FP_BINOP(f64_sub, sub_d)
FP_BINOP(f64_mul, mul_d) FP_BINOP(f64_mul, mul_d)
FP_BINOP(f64_div, div_d) FP_BINOP(f64_div, div_d)
UNIMPLEMENTED_FP_UNOP(f64_abs) FP_UNOP(f64_abs, abs_d)
UNIMPLEMENTED_FP_UNOP(f64_neg) FP_UNOP(f64_neg, neg_d)
UNIMPLEMENTED_FP_UNOP(f64_sqrt) FP_UNOP(f64_sqrt, sqrt_d)
#undef FP_BINOP #undef FP_BINOP
#undef UNIMPLEMENTED_FP_BINOP #undef FP_UNOP
bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode, bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode,
LiftoffRegister dst, LiftoffRegister dst,
......
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