在理解ARM的load-store架构时,我在百度上搜索了很长时间,但是始终找不到一篇像样的中文文章。最后,在用谷歌搜索的英文网站上终于找到了一些蛛丝马迹。让我们先看一下一篇英文资料。

Processor design is strongly tied to the instruction set design.  There were many diverse computer designs and hence many different instruction set designs in the past.  However, as the technology progress, the analysis of the work load, the actual running programs, which affect the instruction set selection, lead to the converge of instruction set.  The most common type of instruction set architecture today belong to three classes :

  • Load-Store architecture
  • Register-Memory architecture
  • Register-plus-Memory architecture

Load-Store architecture has 3-address format and mostly 32 bit instruction size.  This is the most popular among the current microprocessor design, including : HP PA-RISC, IBM RS/6000, SUN Sparc, MIPS R4000, DEC Alpha etc.  All data to/from memory must load/store through a register first.  The execution (operation) takes operands from registers and the result stored back to a register.  This instruction format simplifies the decoding and implementation.

Register-Memory architecture has 2-address format and has 16/32/64 bit instruction size.  An instruction can operate both on registers and with one of the operand in the memory.  This is the 'classical' ISA and is used by one of the longest lived ISA of today IBM S/360 and Intel x86 family of processors.

Register-plus-Memory architecture is the most flexible in the use of operands.  Operands and be register or memory and has byte-variable instruction size.  This flexibility comes with a prize, the complexity in implementation.  This type of architecture is typified by VAX family of computer in the era that there was the drive to provide the high level language semantic for the instruction set, so called 'close the gap' between high level language and machine language.

翻译成中文的意思大概是这样的。

Load-Store architecture CPU只允许用load/store指令来与memory(Flash、RAM)交互,而CPU的运算全部都是在寄存器中完成。也就是说,CPU运算的操作数只能全部来自寄存器,而且结构也只能保存在寄存器中。所以,倘若要把RAM两个数据相加,结果还保存到内存中,就需要先将内存中的数据通过load指令将内存数据加载到寄存器中,计算结束后,再将保存结果寄存器的内容通过store指令存储在RAM中。举一个ARM指令的例子如下。

ADD R0,R1,R2

Register-Memory architecture   CPU的运算操作数可以全部都是寄存器,也允许其中的一个操作数在memory中。所以,CPU可以通过其他指令来与memeory交互,这种架构的指令集相对复杂。举一个X86指令的例子如下。

add mem,reg

Register-plus-Memory architecture CPU的运算操作数可以全部都是寄存器,也可以全部都是memory,还可以两者都有。而且,寄存器、memory的size是可变的,可以是单字节、两个字节、四个字节。所以,CPU和memeory的交互比"Register-Memory architecture"更灵活。这种架构的指令集非常复杂,在译码过程中效率很低。举一个VAX指令的例子如下。

XORL3  (R3)+,(R4)+,(R5)+

附上一个各种ISA(Instruction Set Architecture)的结构图:

参考网站:http://en.wikipedia.org/wiki/Load/store_architectureLoad-Store architecture

http://en.wikipedia.org/wiki/Register_memory_architecture(Register-Memory architecture )

http://www.cp.eng.chula.ac.th/~piak/teaching/ca/arch-description.htm   (Instruction Set Architecture  )

load-store/register-memory/register-plus-memory比较的更多相关文章

  1. Load store action in vulkan & ogles 的解决方案

    metal的带宽之前的blog有讲 这篇主要是vulkan 和ogles的解决方案 https://www.khronos.org/registry/vulkan/specs/1.1-extensio ...

  2. Unordered load/store queue

    A method and processor for providing full load/store queue functionality to an unordered load/store  ...

  3. Load store and memoryless

    metal https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/MTLBestPractice ...

  4. MEMORY Storage Engine MEMORY Tables TEMPORARY TABLE max_heap_table_size

    http://dev.mysql.com/doc/refman/5.7/en/create-table.html You can use the TEMPORARY keyword when crea ...

  5. Arcgis map export or print Error: Cannot map metafile into memory. Not enough memory

      Arcgis map export or print Error: Cannot map metafile into memory. Not enough memory Link: https:/ ...

  6. Java 堆内存与栈内存异同(Java Heap Memory vs Stack Memory Difference)

    --reference Java Heap Memory vs Stack Memory Difference 在数据结构中,堆和栈可以说是两种最基础的数据结构,而Java中的栈内存空间和堆内存空间有 ...

  7. 批量Load/Store指令的寻址方式

    批量Load/Store指令用于实现在一组寄存器和一块连续的内存单元之间传输数据.也称为多寄存器寻址方式,即一条指令可以完成多个寄存器值的传送.这种寻址方式可以用一条指令最多完成传送16个通用寄存器的 ...

  8. Diagnosing out of memory errors and memory leaks 内存泄露实例 C Java JavaScript 内存泄露

    小结: 1. 数据库连接池. JDBC语句和结果对象必须显式地关闭. 2. 电梯到目标楼层后地址是否被释放 When a button is pressed: Get some memory, whi ...

  9. #define barrier() __asm__ __volatile__("": : :"memory") 中的memory是gcc的东西

    gcc内嵌汇编简介 在内嵌汇编中,可以将C语言表达式指定为汇编指令的操作数,而且不用去管如何将C语言表达式的值读入哪个寄存器,以及如何将计算结果写回C 变量,你只要告诉程序中C语言表达式与汇编指令操作 ...

  10. 每个内存大小:sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Size:"

    CPU: 型号:grep "model name" /proc/cpuinfo |awk -F ':' '{print $NF}' 数量:lscpu |grep "CPU ...

随机推荐

  1. UVA 10714 Ants 蚂蚁 贪心+模拟 水题

    题意:蚂蚁在木棍上爬,速度1cm/s,给出木棍长度和每只蚂蚁的位置,问蚂蚁全部下木棍的最长时间和最短时间. 模拟一下,发现其实灰常水的贪心... 不能直接求最大和最小的= =.只要求出每只蚂蚁都走长路 ...

  2. C#数据库读取数据后转换为INT32后计算的小技巧

    这有什么难的,不管是什么数据库, 首先分别读出userinfo中usermoney的值 存入s1,card中extramoney的值s2 读出字段数据你应该会吧! 再用userinfo中字段userm ...

  3. 关于调用系统照相机Activity被销毁问题解决

    <activity                  android:name=".visitplan_finish"                  android:co ...

  4. mysql内存使用情况

    可以直接使用top命令后,查看%MEM的内容.可以选择按进程查看或者按用户查看,如想查看oracle用户的进程内存使用情况的话可以使用如下的命令: (1)top top命令是Linux下常用的性能分析 ...

  5. 隐藏/显示&nbsp;我的电脑盘符驱动…

    组策略里更改即可:点击"开始"→"运行",输入"gpedit.msc",打开组策略.在窗口左侧的"本地计算机策略"中依次 ...

  6. JLabel跟label

  7. java log日志的输出。

    在Spring框架中添加日志功能: pom.xml <dependency> <groupId>log4j</groupId> <artifactId> ...

  8. 经典SQL语句大全(绝对的经典)

    ”,start为起始位置,length为字符串长度,实际应用中以len(expression)取得其长度3,right(char_expr,int_expr) 返回字符串右边第int_expr个字符, ...

  9. 球面墨卡托(Spherical Mercator)

    地理信息描述空间位置相关的信息,在空间位置的表达中,需要基于空间参照系来保证数据精度以及不同数据源之间的相互叠加/空间分析操作.自Google Maps与2005年发布以来,电子地图服务与普通民众的日 ...

  10. [转]SQL语句:Group By总结

    1. Group By 语句简介: Group By语句从英文的字面意义上理解就是“根据(by)一定的规则进行分组(Group)”.它的作用是通过一定的规则将一个数据集划分成若干个小的区域,然后针对若 ...