SB

Speculation Barrier is a barrier that controls speculation.

The semantics of the Speculation Barrier are that the execution, until the barrier completes, of any instruction that appears later in the program order than the barrier:

In particular, any instruction that appears later in the program order than the barrier cannot cause a speculative allocation into any caching structure where the allocation of that entry could be indicative of any data value present in memory or in the registers.

The SB instruction:

When the prediction of the instruction stream is not informed by data taken from the register outputs of the speculative execution of instructions appearing in program order after an uncompleted SB instruction, the SB instruction has no effect on the use of prediction resources to predict the instruction stream that is being fetched.

313029282726252423222120191817161514131211109876543210
11010101000000110011(0)(0)(0)(0)11111111
CRmopc

System

SB

MemBarrierOp op; MBReqDomain domain; MBReqTypes types; case opc of when '00' op = MemBarrierOp_DSB; when '01' op = MemBarrierOp_DMB; when '10' op = MemBarrierOp_ISB; otherwise if HaveSBExt() && CRm<3:0> == '0000' then op = MemBarrierOp_SB; else UNDEFINED; case CRm<3:2> of when '00' domain = MBReqDomain_OuterShareable; when '01' domain = MBReqDomain_Nonshareable; when '10' domain = MBReqDomain_InnerShareable; when '11' domain = MBReqDomain_FullSystem; case CRm<1:0> of when '01' types = MBReqTypes_Reads; when '10' types = MBReqTypes_Writes; when '11' types = MBReqTypes_All; otherwise if CRm<3:2> == '01' then op = MemBarrierOp_PSSBB; elsif CRm<3:2> == '00' && opc == '00' then op = MemBarrierOp_SSBB; elsif HaveSBExt() && CRm<3:2> == '00' && opc == '11' then op = MemBarrierOp_SB; else types = MBReqTypes_All; domain = MBReqDomain_FullSystem;

Operation

case op of when MemBarrierOp_DSB DataSynchronizationBarrier(domain, types); when MemBarrierOp_DMB DataMemoryBarrier(domain, types); when MemBarrierOp_ISB InstructionSynchronizationBarrier(); when MemBarrierOp_SSBB SpeculativeStoreBypassBarrierToVA(); when MemBarrierOp_PSSBB SpeculativeStoreBypassBarrierToPA(); when MemBarrierOp_SB SpeculationBarrier();


Internal version only: isa v30.3, AdvSIMD v27.04, pseudocode v85-xml-00bet9_rc1_1, sve v8.5-00bet9_rc1 ; Build timestamp: 2018-12-12T11:50

Copyright © 2010-2018 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.