SPARC v9 是否有双字比较和交换指令?

发布于 2024-08-01 13:33:30 字数 218 浏览 2 评论 0原文

所以; 在兼容 v9 的 64 位 SPARC CPU 上,存在我知道的 cas 指令。 这对单字长度值进行操作。

我还在网上看到了对 casx 指令的引用 - 但我找不到更多关于它的信息。

我想知道 - 这是双字比较和交换吗?

如果没有,那么普遍的问题是: 是否有双字比较和交换?

So; on a 64 bit SPARC CPU which is v9 compliant, there exists I know a cas instruction. This operates on single word length values.

I've also seen on the web reference to a casx instruction - but I can't find out anything much more about it.

I'm wondering - is this a double word compare and swap?

And if not, the general question is; IS there a double word compare and swap?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦途 2024-08-08 13:33:30

另请注意,casx 确实存在,但它是 casxa 的合成指令(即简化的助记符)。 请参阅前述 SPARC 架构手册中的表 43:

Synthetic:   casx [regrs1], regrs2, regrd 
Instruction: casxa [regrs1]#ASI_P, regrs2, regrd 
Description: compare and swap extended 

Also note that casx does exist, however it's a synthetic instruction (i.e. a simplified mnemonic) for casxa. See Table 43 in the aforementioned SPARC Architecture Manual:

Synthetic:   casx [regrs1], regrs2, regrd 
Instruction: casxa [regrs1]#ASI_P, regrs2, regrd 
Description: compare and swap extended 
时间你老了 2024-08-08 13:33:30

Sparc64——现代CPU中唯一的——既不实现双宽CAS也不实现LL/SC。 因此,实现无锁代码是有问题的。 有一个解决方案,但它们是针对其他平台上不存在的问题(ABA)的解决方案,因为它们支持 CAS 或 LL/SC。 此外,由于这一限制,一系列无锁算法无法在 Space 上实现。

Sparc64 - alone amongst modern CPUs - implements neither double wide CAS nor LL/SC. As such, implementing lock-free code is problematic. There a solutions, but they are solutions to a problem (ABA) which does not exist on other platforms because of their support for CAS or LL/SC. Furthermore, a range of lock-free algorithms cannot be implemented on Sparce because of this limitation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文