什么是ARM指令LDRLE办? [英] What does the ARM LDRLE instruction do?

查看:447
本文介绍了什么是ARM指令LDRLE办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与LDRE指令dissassembly检查一番。例如:

  LDRLE R3,#0×1234

我无法在指令列表中找到这一点。所以我的问题是,什么是LDRLE指令呢?

我的猜测,如果该指令被重新$ P $用C code psented:

  // LDRLE R3,#0×1234
R3 = R3<为0x1234? R3:为0x1234


解决方案

LDRLE 指令是真正的LDR(从内存中加载寄存器)指令,与条件执行限定符LE(小于或等于)。

条件LE,是真时,N标志和V标志是不同的,这也是事实,当Z位被置(Z,N和V是4个标志位3在PSR) 。您可以从ARM找到您的处理器的PSR布局信息。

所以,换句话说,这个 LDR 指令只当LE的条件是每在PSR目前的标志真正执行。这些标志可以通过执行的到你的 LDRLE 指令的指令的影响。换句话说,对LE条件进行评价的基础上的效果的 previous 的指示,在电流的指令(在这种情况下,操作数的不值 LDRLE 指令)。

最后,什么是指令,如果执行的时候做的(条件LE是真的每当前PSR标志)?它加载(立即)价值为0x1234到寄存器R3。

I am inspecting some dissassembly with an LDRE instruction. e.g:

LDRLE R3, #0x1234

I can't find this in the instruction list. So my question is, what does the LDRLE instruction do?

My guess, if the instruction were represented by c code:

// LDRLE R3, #0x1234
R3 = R3 <= 0x1234 ? R3 : 0x1234

解决方案

The LDRLE instruction is really the LDR (load register from memory) instruction, with the conditional execution qualifer "LE" (less than or equal to).

The condition "LE" is "true" when the N flag and the V flag are different, and it's also true when the Z bit is set (Z, N and V are 3 of the 4 flag bits in the PSR). You can find information from ARM on your processor's PSR layout.

So in other words, this LDR instruction is only executed when the "LE" condition is true per the current flags in the PSR. These flags can be affected by instructions that execute prior to your LDRLE instruction. In other words, the LE condition is evaluated based on the effects of previous instructions, not the values of the operands of the current instruction (in this case, the LDRLE instruction).

Finally, what does the instruction do if it is executed (condition LE is true per current PSR flags)? It loads the (immediate) value 0x1234 into register R3.

这篇关于什么是ARM指令LDRLE办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆