gpt4 book ai didi

assembly - 应该在 PowerPC 中求和有效地址 'wrap' 吗?如果是这样,如何?

转载 作者:行者123 更新时间:2023-12-04 06:25:29 26 4
gpt4 key购买 nike

例如,PowerPC book I 的第 3.3.2 节定义了 lbz指令为:

Let the effective address (EA) be the sum (RA|0)+ D. The byte in storage addressed by EA is loaded into RT56:63. RT0:55 are set to 0.



以下两种情况我该怎么办?
  • 我应该在 (RA) + D > memory_capacity 时包裹或做些什么?
  • 我应该在 (RA) + D > 4294967295 时包裹或做些什么?

  • 换句话说,有效地址就是 (RA) + D的总和, 或者计算完成 mod memory_capacitymod 2^32-1 ?

    相关实用资料:每一行设置 var EAthis script .

    最佳答案

    来自 Power ISA 2.06 一书的第 1.9.3 节有效地址计算

    In 32-bit mode, the low-order 32 bits of the 64-bit result, preceded by 32 0 bits, comprise the 64-bit effective address for the purpose of addressing storage. [...] As used to address storage, the effective address arithmetic appears to wrap around from the maximum address, 232-1, to address 0, except that if the current instruction is at effective address 232-4 the effective address of the next sequential instruction is undefined.

    关于assembly - 应该在 PowerPC 中求和有效地址 'wrap' 吗?如果是这样,如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6087305/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com