【问题标题】:Is the raspberry pi 3 memory byte addressible or word addressable and if it is word addressable what is the word size树莓派 3 内存字节是可寻址的还是字可寻址的,如果它是字可寻址的,字长是多少
【发布时间】:2017-05-20 14:27:05
【问题描述】:

我是树莓派3的新手,想问一个树莓派3的内存架构相关的问题我的问题如下

树莓派 3 内存字节是可寻址的还是字可寻址的,如果是字可寻址的,字大小是多少(以字节为单位)

【问题讨论】:

  • 你问的是内存对齐吗?

标签: arm raspberry-pi3 cpu-architecture addressing-mode


【解决方案1】:

除非您在谈论 GPU,否则 Raspberry pi 与此无关。它只是另一只手臂。在 arm 等主流处理器中,您知道多少字可寻址指令集?支持操作系统(linux、bsd 等)的操作系统处理器,例如 arm?

arms 对单词大小的定义在 arm 文档中。

void fun ( unsigned char *p, unsigned char x, unsigned int z )
{
    unsigned int ra;
    for(ra=0;ra<z;ra++) p[ra]=x;
}

00000000 <fun>:
   0:   e3520000    cmp r2, #0
   4:   012fff1e    bxeq    lr
   8:   e0802002    add r2, r0, r2
   c:   e4c01001    strb    r1, [r0], #1
  10:   e1500002    cmp r0, r2
  14:   1afffffc    bne c <fun+0xc>
  18:   e12fff1e    bx  lr

这就是你的答案,它是使用字寻址来填充数组还是基于字节?

【讨论】:

    猜你喜欢
    • 2013-08-28
    • 2011-02-13
    • 1970-01-01
    • 1970-01-01
    • 2019-11-05
    • 1970-01-01
    • 2018-07-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多