[Liftoff] Inline EmitI32UnOpWithCFallback
The function has a single call only, so inline it there. R=jkummerow@chromium.org Change-Id: I7beeefa6e54aa2a85389fd5df33c08b8a5126de6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1895563 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#64754}
This commit is contained in:
parent
99c9e63546
commit
4cd0748555
@ -670,19 +670,6 @@ class LiftoffCompiler {
|
||||
__ PushRegister(result_type, dst);
|
||||
}
|
||||
|
||||
void EmitI32UnOpWithCFallback(bool (LiftoffAssembler::*emit_fn)(Register,
|
||||
Register),
|
||||
ExternalReference (*fallback_fn)()) {
|
||||
auto emit_with_c_fallback = [=](LiftoffRegister dst, LiftoffRegister src) {
|
||||
if (emit_fn && (asm_.*emit_fn)(dst.gp(), src.gp())) return;
|
||||
ExternalReference ext_ref = fallback_fn();
|
||||
ValueType sig_i_i_reps[] = {kWasmI32, kWasmI32};
|
||||
FunctionSig sig_i_i(1, 1, sig_i_i_reps);
|
||||
GenerateCCall(&dst, &sig_i_i, kWasmStmt, &src, ext_ref);
|
||||
};
|
||||
EmitUnOp<kWasmI32, kWasmI32>(emit_with_c_fallback);
|
||||
}
|
||||
|
||||
template <ValueType type>
|
||||
void EmitFloatUnOpWithCFallback(
|
||||
bool (LiftoffAssembler::*emit_fn)(DoubleRegister, DoubleRegister),
|
||||
@ -842,8 +829,14 @@ class LiftoffCompiler {
|
||||
});
|
||||
break;
|
||||
case kExprI32Popcnt:
|
||||
EmitI32UnOpWithCFallback(&LiftoffAssembler::emit_i32_popcnt,
|
||||
&ExternalReference::wasm_word32_popcnt);
|
||||
EmitUnOp<kWasmI32, kWasmI32>(
|
||||
[=](LiftoffRegister dst, LiftoffRegister src) {
|
||||
if (__ emit_i32_popcnt(dst.gp(), src.gp())) return;
|
||||
ValueType sig_i_i_reps[] = {kWasmI32, kWasmI32};
|
||||
FunctionSig sig_i_i(1, 1, sig_i_i_reps);
|
||||
GenerateCCall(&dst, &sig_i_i, kWasmStmt, &src,
|
||||
ExternalReference::wasm_word32_popcnt());
|
||||
});
|
||||
break;
|
||||
case kExprI64Popcnt:
|
||||
return unsupported(decoder, kComplexOperation,
|
||||
|
Loading…
Reference in New Issue
Block a user