From 4c5a2b12551d5857ac98f9ae4ea181993694e332 Mon Sep 17 00:00:00 2001 From: Junliang Yan Date: Fri, 27 Aug 2021 14:57:58 -0400 Subject: [PATCH] ppc: [liftoff] implement smi_check Change-Id: Ifc75747a179486b6fe173c2d34f72f66c1918d88 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3124813 Reviewed-by: Milad Fa Commit-Queue: Junliang Yan Cr-Commit-Position: refs/heads/main@{#76544} --- src/wasm/baseline/ppc/liftoff-assembler-ppc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wasm/baseline/ppc/liftoff-assembler-ppc.h b/src/wasm/baseline/ppc/liftoff-assembler-ppc.h index 1f913f9343..617e193bd1 100644 --- a/src/wasm/baseline/ppc/liftoff-assembler-ppc.h +++ b/src/wasm/baseline/ppc/liftoff-assembler-ppc.h @@ -1222,7 +1222,9 @@ void LiftoffAssembler::LoadTransform(LiftoffRegister dst, Register src_addr, void LiftoffAssembler::emit_smi_check(Register obj, Label* target, SmiCheckMode mode) { - bailout(kUnsupportedArchitecture, "emit_smi_check"); + TestIfSmi(obj, r0); + Condition condition = mode == kJumpOnSmi ? eq : ne; + b(condition, target, cr0); // branch if SMI } void LiftoffAssembler::LoadLane(LiftoffRegister dst, LiftoffRegister src,