Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/test/generate_atomic_spec_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ def bin_statement_lines(template: Template, mem_idx: int, mem_ptr_type: ValueTyp
has_ordering = ordering is not None
has_mem_idx = mem_idx is not None
raw_alignment = int(math.log2(mem_ptr_type.value // 8))
alignment = raw_alignment | (has_ordering << 5) | (has_mem_idx << 6)
alignment = raw_alignment | (has_ordering << 4) | (has_mem_idx << 6)
comment = f"Alignment of {raw_alignment}" \
f'{" with bit 5 set indicating that an ordering immediate follows" if has_ordering else ""}' \
f'{" with bit 4 set indicating that an ordering immediate follows" if has_ordering else ""}' \
f'{" and" if has_ordering and has_mem_idx else ""}' \
f'{" with bit 6 set indicating that a memory index immediate follows" if has_mem_idx else ""}'

Expand Down
4 changes: 2 additions & 2 deletions src/wasm-binary.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ enum BrOnCastFlag {

constexpr uint32_t ExactImport = 1 << 5;

constexpr uint32_t HasBackingArrayMask = 1 << 4;
constexpr uint32_t HasMemoryOrderMask = 1 << 5;
constexpr uint32_t HasMemoryOrderMask = 1 << 4;
constexpr uint32_t HasBackingArrayMask = 1 << 5;
constexpr uint32_t HasMemoryIndexMask = 1 << 6;

constexpr uint8_t HasTableInitializer = 0x40;
Expand Down
Loading
Loading