不要在ARM指令LDREX / STREX必须在高速缓存对齐的数据进行操作? [英] Do the ARM instructions ldrex/strex have to operate on cache aligned data?

查看:561
本文介绍了不要在ARM指令LDREX / STREX必须在高速缓存对齐的数据进行操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在英特尔,参数CMPXCHG必须对齐缓存行(因为英特尔使用MESI实现CAS)。

On Intel, the arguments to CMPXCHG must be cache line aligned (since Intel uses MESI to implement CAS).

在ARM,LDREX和STREX独家预订granuales操作。

On ARM, ldrex and strex operate on exclusive reservation granuales.

需要明确的是,这是否意味着随后在ARM上的数据被操作并不一定是高速缓存线对齐?

To be clear, does this then mean on ARM the data being operated upon does not have to be cache line aligned?

推荐答案

它说,在ARM体系结构参考手册A.3.2.1未对齐的数据访问,所以正确的。 LDREX STREX 要求字对齐。这是有道理的,因为不对齐的数据访问可以跨越独家预订颗粒。

It says so right in the ARM Architecture Reference Manual A.3.2.1 "Unaligned data access". LDREX and STREX require word alignment. Which makes sense, because an unaligned data access can span exclusive reservation granules.

这篇关于不要在ARM指令LDREX / STREX必须在高速缓存对齐的数据进行操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆