Commit 5b4e9103 authored by Liu Yu's avatar Liu Yu Committed by V8 LUCI CQ

[mips] Fix debug build failure

Allow MultiPushMSA and MultiPushMSA to generate simd
instructions in builtins on mips which don't support SIMD;
And implement IsValidFloatParameterRegister on mips.

Change-Id: Iac41930ce4bf39a41dd157e22e4194752df35b8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2882676
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74606}
parent 6fdc3fb0
...@@ -2396,7 +2396,11 @@ void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { ...@@ -2396,7 +2396,11 @@ void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
__ Lbu(a1, MemOperand(a1)); __ Lbu(a1, MemOperand(a1));
__ Branch(&push_doubles, le, a1, Operand(zero_reg)); __ Branch(&push_doubles, le, a1, Operand(zero_reg));
// Save vector registers. // Save vector registers.
__ MultiPushMSA(fp_regs); {
CpuFeatureScope msa_scope(
masm, MIPS_SIMD, CpuFeatureScope::CheckPolicy::kDontCheckSupported);
__ MultiPushMSA(fp_regs);
}
__ Branch(&simd_pushed); __ Branch(&simd_pushed);
__ bind(&push_doubles); __ bind(&push_doubles);
__ MultiPushFPU(fp_regs); __ MultiPushFPU(fp_regs);
...@@ -2420,7 +2424,11 @@ void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { ...@@ -2420,7 +2424,11 @@ void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
__ Lbu(a1, MemOperand(a1)); __ Lbu(a1, MemOperand(a1));
__ Branch(&pop_doubles, le, a1, Operand(zero_reg)); __ Branch(&pop_doubles, le, a1, Operand(zero_reg));
// Pop vector registers. // Pop vector registers.
__ MultiPopMSA(fp_regs); {
CpuFeatureScope msa_scope(
masm, MIPS_SIMD, CpuFeatureScope::CheckPolicy::kDontCheckSupported);
__ MultiPopMSA(fp_regs);
}
__ Branch(&simd_popped); __ Branch(&simd_popped);
__ bind(&pop_doubles); __ bind(&pop_doubles);
__ Daddu(sp, sp, base::bits::CountPopulation(fp_regs) * kDoubleSize); __ Daddu(sp, sp, base::bits::CountPopulation(fp_regs) * kDoubleSize);
......
...@@ -117,11 +117,13 @@ const char* CallInterfaceDescriptor::DebugName() const { ...@@ -117,11 +117,13 @@ const char* CallInterfaceDescriptor::DebugName() const {
return ""; return "";
} }
#if !defined(V8_TARGET_ARCH_MIPS) && !defined(V8_TARGET_ARCH_MIPS64)
bool CallInterfaceDescriptor::IsValidFloatParameterRegister(Register reg) { bool CallInterfaceDescriptor::IsValidFloatParameterRegister(Register reg) {
#if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64)
return reg.code() % 2 == 0;
#else
return true; return true;
}
#endif #endif
}
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
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