检查一个数字是否落在32/位范围内的添加操作是ARM

发布于 2025-01-17 10:26:41 字数 141 浏览 2 评论 0原文

如何检查运算后NBC数字是否在32位范围内 ADD RO,RO,R1, LSL#1

我读到它可以用 C 标志进行测试,该标志确定此类操作中是否存在溢出,但我不完全确定如何设置“if”条件,例如如果有已经溢出,我应该从寄存器中删除该值并在其中写入其他内容。

How can I check whether the NBC number falls within 32-bit range after an operation
ADD RO,RO,R1, LSL#1

I have read that it can be tested with a C flag which determines whether there is an overflow in such operation but I am not entirely sure how to set the "if" condition, e.g. if there has been overflow I should remove the value from the register and write something else inside it.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文