Commit fd50badb authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/AIX: Support Wasm atomic ops on big endian within turbofan

Currently atomic ops on TF are using machine native byte order
and cannot be used by Wasm calls.

This Cl adds support for Little Endian enforced Wasm atomic ops
to PPC/AIX by reversing bytes where needed.

Change-Id: I4080f318022eedd2058e51d09595753eab385441
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3327721Reviewed-by: 's avatarVasili Skurydzin <vasili.skurydzin@ibm.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78339}
parent ef0b2aab
...@@ -3605,7 +3605,7 @@ void TurboAssembler::ByteReverseU32(Register dst, Register val, ...@@ -3605,7 +3605,7 @@ void TurboAssembler::ByteReverseU32(Register dst, Register val,
ZeroExtWord32(dst, scratch); ZeroExtWord32(dst, scratch);
} }
void TurboAssembler::ByteReverseU64(Register dst, Register val) { void TurboAssembler::ByteReverseU64(Register dst, Register val, Register) {
if (CpuFeatures::IsSupported(PPC_10_PLUS)) { if (CpuFeatures::IsSupported(PPC_10_PLUS)) {
brd(dst, val); brd(dst, val);
return; return;
......
...@@ -614,7 +614,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { ...@@ -614,7 +614,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void ByteReverseU16(Register dst, Register val, Register scratch); void ByteReverseU16(Register dst, Register val, Register scratch);
void ByteReverseU32(Register dst, Register val, Register scratch); void ByteReverseU32(Register dst, Register val, Register scratch);
void ByteReverseU64(Register dst, Register val); void ByteReverseU64(Register dst, Register val, Register = r0);
// Before calling a C-function from generated code, align arguments on stack. // Before calling a C-function from generated code, align arguments on stack.
// After aligning the frame, non-register arguments must be stored in // After aligning the frame, non-register arguments must be stored in
......
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