我如何存储寄存器的内容,一个由内存中的变量指定的地址吗?
How do I store the contents of a register, to an address specified by a variable in memory?
机器语言中的一条典型的指令可能是10010 1100 1011,意思是将存储寄存器a的内容加到存储寄存器b的内容中。
A typical instruction in a machine language might read 10010 1100 1011 and mean add the contents of storage register a to the contents of storage register B.
例如,编译器为了优化一个循环索引变量,可能会选择把它存储到一个寄存器中,或者缓存会延迟到一个更适合的时间,才把一个新的变量值存入主存。
For example, a compiler may choose to optimize a loop index variable by storing it in a register, or the cache may delay flushing a new value of a variable to main memory until a more opportune time.
如果您以前从未用汇编语言编过程,寄存器就是处理器为计算值所使用的临时存储。
If you've never programmed assembly language before, registers are the temporary storage that processors use for computing values.
在寄存器加上一个常量是为了计算用于加载或存储的地址。
The constant gets added to the register to compute the address to use for loading or storing.
所以该指令会将链接寄存器(存有返回地址)存储到调用函数堆栈框架的恰当位置。
So this instruction stores the link register (which holds the return address) into the proper location in the calling function's stack frame.
请记住链接寄存器存储在调用函数的堆栈框架内,而非函数自身的堆栈框架。
Remember that the link register is stored in the calling function's stack frame, not the function's own stack frame.
专用寄存器是一些保留字,用于指定编译器生成的存储区域。
Special registers are reserved words that name storage areas generated by the compiler.
剩余的空间用来保存寄存器和存储本地变量。
The remaining space is used for saving registers and storing local variables.
由于未调用任何函数,也未使用任何本地存储,所以您根本无需堆栈框架,并可通过链接寄存器退出。
Since you did not call any functions or use any local storage, you did not need a stack frame at all, so you can now just exit through the link register.
要加载跨越16字节边界的值会十分困难,因为必须要将其存储到两个寄存器,进行移位然后再对它们进行掩码和组合。
To load a value which crosses a 16-byte boundary is even more difficult, as you would actually have to load it into two registers, shift them, and then mask and combine them.
由于SPU有128个寄存器,所以它可以存储大量临时值和中间值,而无需像其他架构一样,必须加载和向内存转存。
Since the SPU has 128 registers, it can keep a lot of temporary and intermediate values around without having to load and store back into memory like other architectures.
现有JMM 表明易失性的读和写是直接和主存打交道的,这样避免了把值存储到寄存器或者绕过处理器特定的缓存。
The existing JMM says that volatile reads and writes are to go directly to main memory, prohibiting caching values in registers and bypassing processor-specific caches.
大多数指令都遵循类似的格式,结果存储在第一个操作数内指定的寄存器中。
Most instructions follow a similar format, with the register that holds the result specified in the first operand.
本地变量空间用作该函数的通用存储空间,寄存器保存区用于保存函数所使用的非可变寄存器的值。
The local variable space is used as a general storage area for the function, and the register save area is used to save the values of non-volatile registers that the function USES.
存储过程需要将寄存器EXPLSNAP设置为ALL或YES,用以收集存取方案。
The stored procedure needs to set the EXPLSNAP register to ALL or YES in order to collect the access plans.
函数必须假设对于自己的前8个参数,它们只会通过寄存器传递,但是如果需要在程序中对参数进行存储,就仍然需要一个可用的保存区。
Functions must assume that for the first eight parameters, they are only passed by register, but they will still have a save area available if they need to be stored by the program.
可以看到test1()中每次加法都需要读取和存储全局变量errs,而在test2()中,localerrs分配在寄存器上,只需要一条指令。
Note that test1 must load and store the global errs value each time it is incremented, whereas test2 stores localerrs in a register and needs only a single instruction.
dsirr(数据存储中断原因寄存器)表示发生的页面错误的类型。
The dsirr (Data Storage Interrupt reason Register) indicates the type of page fault that has occurred.
dsisr(数据存储中断状态寄存器)表示页面错误无法解决的原因。
The dsisr (Data Storage Interrupt Status Register) indicates why the page fault could not be resolved.
setup_arch还需要对闪存存储库、系统寄存器和其它特定设备执行内存映射。
The setup_arch also needs to perform any memory mappings for flash Banks, system registers, and other specific devices.
尽管寄存器可以存储多个值(在本例中,4个32位值),但当参数传递给函数时,每个参数值都会在其自己的寄存器内被传递。
Although registers can hold multiple values (in this case, four 32-bit values), when passing parameters to a function, each parameter value is passed in its own register.
使用其他模式无法进行的内存访问(地址可以通过其他方式进行计算,并存储到寄存器中,然后就使用这个值来访问内存)。
Any memory access that is not available by other modes (the address can be calculated by other means and stored in the register, which is then used for the access).
它将第二个操作数内的寄存器与第三个操作数内的常量加在一起,并将结果存储在第一个操作数内指定的寄存器中。
It adds together the register in the second operand with the constant in the third operand, and stores the result in the register specified in the first operand.
PPE用载入和存储指令访问主存储器(有效地址空间),可以在主存储器与内容可以缓存的私有寄存器文件之间移动数据。
The PPE accesses main storage (the effective-address space) with load and store instructions that move data between main storage and a private register file, the contents of which may be cached.
但,如果是SPU,结果会存储在一种通用的寄存器内 —— 在本例中就是寄存器4。
However, with the SPU, the results are stored in a general-purpose register -- register 4 in this case.
所以编译器不会将全局变量存储在寄存器中,那样会带来额外的、不必要的负担和存储空间。
Hence, the compiler cannot cache the value of a global variable in a register, resulting in extra (often unnecessary) loads and stores when globals are used.
因此,在POWER 5中引入了PUR寄存器,用于存储各个虚拟处理器实际使用的周期。
Hence, the PUR register, introduced in POWER5, stores the actual cycles consumed by each virtual processor.
因此,在POWER 5中引入了PUR寄存器,用于存储各个虚拟处理器实际使用的周期。
Hence, the PUR register, introduced in POWER5, stores the actual cycles consumed by each virtual processor.
应用推荐