6.4 Classes of Serialization Instructions

<< Click to Display Table of Contents >>

Navigation:  ASA-EMulatR Reference Guide > Introduction > Architecture Overview > Chapter 6 - Serialization and Stall Model >

6.4 Classes of Serialization Instructions

Alpha defines several serialization primitives, each with a specific scope and distinct release conditions:

 

MB (0x4000) — Full memory barrier. Orders all loads and stores.

WMB (0x4400) — Write-only barrier. Orders stores only; loads may bypass.

EXCB (0x0400) — Exception barrier. Ensures precise exception state.

TRAPB (0x0000) — Trap barrier. Ensures precise arithmetic trap state.

CALL_PAL — Privileged serialization. Serializes mode transition.

 

Ordering strength (strongest to weakest): PAL > MB/MB2 > EXCB > WMB > TRAPB > cache hints

 


 

MemoryBarrierKind Enumeration

 

The full set of barrier and cache hint operations is defined in MemoryBarrierKind (MemoryBarrierKind_enum.h). All are encoded as opcode 0x18 function codes:

 

enum class MemoryBarrierKind : quint16 {

 TRAPB = 0x0000, // Trap Barrier - sync arithmetic trap delivery

 LOADLOAD = 0x0001, // Load-load ordering primitive

 STOSTO = 0x0002, // Store-store ordering primitive

 STOLOAD = 0x0003, // Store-load ordering primitive

 EXCB = 0x0400, // Exception Barrier - sync exception state

 MB = 0x4000, // Memory Barrier - full fence (loads + stores)

 WMB = 0x4400, // Write Memory Barrier - store-store ordering

 FETCH = 0x8000, // Prefetch data - cache hint (read intent)

 MB2 = 0x8400, // Memory Barrier - full fence (alternate encoding)

 FETCH_M = 0xA000, // Prefetch data - cache hint (modify intent)

 RS = 0xC000, // Read and Set - mark cache line (VAX legacy)

 ECB = 0xE800, // Evict Cache Block - cache hint (flush line)

 PAL = 0xFFFF // PAL serialization - strongest (MB+EXCB+flush)

};

 

Note: FETCH, FETCH_M, RS, and ECB are cache hints with no architectural ordering guarantees. They are performance optimizations only.

 


 

SerializationType Enumeration

 

The pipeline tracks the barrier class of a stalled slot via SerializationType (cBox_core.h), which maps to the CBox release logic:

 

enum class SerializationType {

 Barrier_MB, // MB - full memory fence

 Barrier_TRAP, // TRAPB - arithmetic trap fence

 Barrier_WRITE, // WMB - store-store fence

 Barrier_EXC, // EXCB - exception fence

 Barrier_NONE // No serialization pending

};

 

See Also: coreLib/MemoryBarrierKind_enum.h; CBoxLib/cBox_core.h.