Commit 65ff0dbe authored by Zhao Jiazhong's avatar Zhao Jiazhong Committed by Commit Bot

[mips][wasm] Refactor AtomicWait implementation

Port 7ad6b04e
https://crrev.com/c/2080362

Change-Id: Iac305bf76c5a602bd238310fed0828e5ea95cd0c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2084323Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66609}
parent b09fc849
......@@ -31,19 +31,34 @@ bool CallInterfaceDescriptor::IsValidFloatParameterRegister(Register reg) {
return reg.code() % 2 == 0;
}
void WasmI32AtomicWaitDescriptor::InitializePlatformSpecific(
void WasmI32AtomicWait32Descriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
/* Register t4 correspond to f12 FPU register. */
const Register default_stub_registers[] = {a0, a1, t4};
const Register default_stub_registers[] = {a0, a1, a2, a3};
CHECK_EQ(static_cast<size_t>(kParameterCount),
arraysize(default_stub_registers));
data->InitializePlatformSpecific(kParameterCount, default_stub_registers);
}
void WasmI64AtomicWaitDescriptor::InitializePlatformSpecific(
void WasmI32AtomicWait64Descriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
/* Register t4 correspond to f12 FPU register. */
const Register default_stub_registers[] = {a0, a1, a2, t4};
const Register default_stub_registers[] = {a0, a1, a2};
CHECK_EQ(static_cast<size_t>(kParameterCount),
arraysize(default_stub_registers));
data->InitializePlatformSpecific(kParameterCount, default_stub_registers);
}
void WasmI64AtomicWait32Descriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
const Register default_stub_registers[] = {a0, a1, a2, a3, t0};
CHECK_EQ(static_cast<size_t>(kParameterCount - kStackArgumentsCount),
arraysize(default_stub_registers));
data->InitializePlatformSpecific(kParameterCount - kStackArgumentsCount,
default_stub_registers);
}
void WasmI64AtomicWait64Descriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
const Register default_stub_registers[] = {a0, a1, a2};
CHECK_EQ(static_cast<size_t>(kParameterCount),
arraysize(default_stub_registers));
data->InitializePlatformSpecific(kParameterCount, default_stub_registers);
......
......@@ -31,19 +31,34 @@ bool CallInterfaceDescriptor::IsValidFloatParameterRegister(Register reg) {
return reg.code() % 2 == 0;
}
void WasmI32AtomicWaitDescriptor::InitializePlatformSpecific(
void WasmI32AtomicWait32Descriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
/* Register t0 correspond to f12 FPU register. */
const Register default_stub_registers[] = {a0, a1, t0};
const Register default_stub_registers[] = {a0, a1, a2, a3};
CHECK_EQ(static_cast<size_t>(kParameterCount),
arraysize(default_stub_registers));
data->InitializePlatformSpecific(kParameterCount, default_stub_registers);
}
void WasmI64AtomicWaitDescriptor::InitializePlatformSpecific(
void WasmI32AtomicWait64Descriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
/* Register t0 correspond to f12 FPU register. */
const Register default_stub_registers[] = {a0, a1, a2, t0};
const Register default_stub_registers[] = {a0, a1, a2};
CHECK_EQ(static_cast<size_t>(kParameterCount),
arraysize(default_stub_registers));
data->InitializePlatformSpecific(kParameterCount, default_stub_registers);
}
void WasmI64AtomicWait32Descriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
const Register default_stub_registers[] = {a0, a1, a2, a3, a4};
CHECK_EQ(static_cast<size_t>(kParameterCount - kStackArgumentsCount),
arraysize(default_stub_registers));
data->InitializePlatformSpecific(kParameterCount - kStackArgumentsCount,
default_stub_registers);
}
void WasmI64AtomicWait64Descriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
const Register default_stub_registers[] = {a0, a1, a2};
CHECK_EQ(static_cast<size_t>(kParameterCount),
arraysize(default_stub_registers));
data->InitializePlatformSpecific(kParameterCount, default_stub_registers);
......
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