[acqrel] Added acqrel load and store instructions [v8/v8 : main]

0 views
Skip to first unread message

Rezvan Mahdavi Hezaveh (Gerrit)

unread,
Nov 18, 2025, 5:17:34 PM (15 hours ago) Nov 18
to Deepti Gandluri, v8-re...@googlegroups.com, was...@google.com

Rezvan Mahdavi Hezaveh added 4 comments

File src/wasm/baseline/liftoff-compiler.cc
Line 5940, Patchset 2 (Latest): void AtomicStoreReleaseMem(FullDecoder* decoder, StoreType type,
Rezvan Mahdavi Hezaveh . unresolved

Two questions here:
1) Is this the right place to check for the bit 6 of the memarg? If no, where is the right place?
2) How we actually check the bit 6? What is another instructions that works with memarg bits to look as an example?

File src/wasm/wasm-feature-flags.h
Line 46, Patchset 2 (Latest): V(acquire_release, "acquire_release memory ordering", false) \
Rezvan Mahdavi Hezaveh . unresolved

How and where wasm feature flags are being used? For example, I cannot see any usage of `v8_flags.shared` in the code base, even though the implementation of shared-everything thread has been started.

File src/wasm/wasm-opcodes.h
Line 734, Patchset 2 (Latest): V(I32AtomicLoadAcquire, 0xfe50, i_i, "i32.atomic.load_acq", i_l) \
Rezvan Mahdavi Hezaveh . unresolved

I understand the `i_i` (i32 as input and i32 as output) in the signature but what is the `i_l` for?

File test/cctest/wasm/test-wasm-acq-rel-instructions.cc
Line 5, Patchset 2 (Latest):// Tests should be added here
Rezvan Mahdavi Hezaveh . unresolved

tes/cctest/wasm/ vs test/mjsunit/wasm/?
Looks like the first one tested instructions and the second one is for js interop?

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ibe5b293ec5dfe64f1fab7ceec745f84c7765dad9
Gerrit-Change-Number: 7164383
Gerrit-PatchSet: 2
Gerrit-Owner: Rezvan Mahdavi Hezaveh <rez...@chromium.org>
Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
Gerrit-Comment-Date: Tue, 18 Nov 2025 22:17:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Deepti Gandluri (Gerrit)

unread,
1:23 AM (7 hours ago) 1:23 AM
to Rezvan Mahdavi Hezaveh, v8-re...@googlegroups.com, was...@google.com
Attention needed from Rezvan Mahdavi Hezaveh

Deepti Gandluri added 4 comments

File src/wasm/baseline/liftoff-compiler.cc
Line 5940, Patchset 2 (Latest): void AtomicStoreReleaseMem(FullDecoder* decoder, StoreType type,
Rezvan Mahdavi Hezaveh . unresolved

Two questions here:
1) Is this the right place to check for the bit 6 of the memarg? If no, where is the right place?
2) How we actually check the bit 6? What is another instructions that works with memarg bits to look as an example?

Deepti Gandluri

I'm not sure I fully understand the question, I'm probably missing something - what should bit 6 have a check for? Any loads/Stores or memory operations will have a memarg - it is an immediate parameter to memory instructions. Decoding of memarg though, we should go into tomorrow.

File src/wasm/wasm-feature-flags.h
Line 46, Patchset 2 (Latest): V(acquire_release, "acquire_release memory ordering", false) \
Rezvan Mahdavi Hezaveh . unresolved

How and where wasm feature flags are being used? For example, I cannot see any usage of `v8_flags.shared` in the code base, even though the implementation of shared-everything thread has been started.

Deepti Gandluri

Wasm feature flags are treated slightly differently, take a look at https://source.chromium.org/chromium/chromium/src/+/main:v8/src/wasm/wasm-feature-flags.h, expressed in macros makes it hard to find in chrome search.

File src/wasm/wasm-opcodes.h
Line 734, Patchset 2 (Latest): V(I32AtomicLoadAcquire, 0xfe50, i_i, "i32.atomic.load_acq", i_l) \
Rezvan Mahdavi Hezaveh . unresolved

I understand the `i_i` (i32 as input and i32 as output) in the signature but what is the `i_l` for?

Deepti Gandluri

The format for the signature is <output_type>_<input1_type, input2_type,...>. The l here stands for long, for the offset into memory that needs to be loaded. It's possible the documentation may be outdates to not reflect that Wasm has 64-bit pointers now.

File test/cctest/wasm/test-wasm-acq-rel-instructions.cc
Line 5, Patchset 2 (Latest):// Tests should be added here
Rezvan Mahdavi Hezaveh . unresolved

tes/cctest/wasm/ vs test/mjsunit/wasm/?
Looks like the first one tested instructions and the second one is for js interop?

Deepti Gandluri

Yes, also a couple of other distinctions cctest are easier to debug because the wasm cctest framework is lightweight, and if you were writing unit tests for the compiler itself, they're easier to do as cctests. js tests test the whole pipeline - decoding, compilation, instantiation and execution.

Open in Gerrit

Related details

Attention is currently required from:
  • Rezvan Mahdavi Hezaveh
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ibe5b293ec5dfe64f1fab7ceec745f84c7765dad9
Gerrit-Change-Number: 7164383
Gerrit-PatchSet: 2
Gerrit-Owner: Rezvan Mahdavi Hezaveh <rez...@chromium.org>
Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
Gerrit-Attention: Rezvan Mahdavi Hezaveh <rez...@chromium.org>
Gerrit-Comment-Date: Wed, 19 Nov 2025 06:23:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Rezvan Mahdavi Hezaveh <rez...@chromium.org>
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages