eieio,sync,isync区别

官方英文解释:

The eieio, sync and isync are context-synchronizing instructions. Term “context-synchronizing” means the following: the processor core consists of several independent execution units, so it is able to execute several instructions in parallel and out-of-order. The context-synchronizing instructions are used to force strict order of instructions, where required. eieio means "Enforce In-Order execution of I/O". During execution, Load/Store Unit waits for previous accesses to terminate before beginning accesses associated with load/store instructions after eieio. The purpose of eieio is to prevent loads and stores from executing speculatively when appropriate. This might be desirable for FIFO, where performing a read or write changes the FIFO's data. isync means "Instruction sync". This instruction waits for all instructions to complete and discards any prefetched instructions, causing subsequent instructions to be refetched from memory. The isync instruction is context synchronizing, which guarantees that all of effects of previous instructions are in place and any instructions in the instruction queue are flushed (which means all instructions that were in the instruction queue need to be refetched). sync is a memory synchronization instruction. It delays execution of subsequent instructions until previous instructions have completed to the point that they can no longer cause an exception and until all previous memory accesses are performed globally; the sync operation is not broadcast onto the bus interface. Additionally, all load and store cache/bus activities initiated by prior instructions are completed.

翻译:

eieio, sync 和isync 是上下文同步指令。“上下文同步”指的是:处理器内核包含着多个独立的执行单元,所以它能够并行的执行多个指令并且是乱序的。上下文同步指令用于需要严格秩序的地方,进行强制严格的指令顺序。eieio代表“强制按顺序执行IO”。在执行过程中,加载/存储单元等待前一个访问结束之后再开始运行加载/存储指令。eieio的目的就是为了防止执行过程中的随意加载和存储。在执行FIFO数据的读写变化时这可能是可取的。isync代表“指令同步”。这个指令等待所有的指令完成并放弃预读取指令,导致后续的指令需要从内存中重新读取。isync是上下文同步,它保证所有先前指令都到位并且刷新指令序列(这意味着指令序列中的所有指令需要被重新读取)。sync代表着内存同步指令。它延迟所有后续指令的执行直到先前指令完成,并且不会再产生异常以及直到先前的内存访问完全执行完毕;sync操作不会广播到总线接口。此外,先前指令发起的所有加载和存储高速缓存/总线活动完成。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值