aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
diff options
context:
space:
mode:
authorDavid Sehr <sehr@chromium.org>2012-12-04 10:20:15 -0800
committerDavid Sehr <sehr@chromium.org>2012-12-04 10:20:15 -0800
commit411e665e7c7b288760015c670177c8493ccd3e0c (patch)
tree299fd93eb6bcdb1cb4527d7f1445f55c785fa8d4 /lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
parent66d7c5b124f7d2bca98460d73fbb10096321eaac (diff)
Fix NOP encoding
The constant used by upstream decodes as a different instruction than the mov r0, r0 it claims to be. Make the encoding consistent with the comment. BUG=none Review URL: https://codereview.chromium.org/11299309
Diffstat (limited to 'lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp')
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
index 27c1bc76fd..b99dd7a850 100644
--- a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+++ b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
@@ -221,7 +221,10 @@ void ARMAsmBackend::relaxInstruction(const MCInst &Inst, MCInst &Res) const {
bool ARMAsmBackend::writeNopData(uint64_t Count, MCObjectWriter *OW) const {
const uint16_t Thumb1_16bitNopEncoding = 0x46c0; // using MOV r8,r8
const uint16_t Thumb2_16bitNopEncoding = 0xbf00; // NOP
- const uint32_t ARMv4_NopEncoding = 0xe1a0000; // using MOV r0,r0
+ // @LOCALMOD-BEGIN
+ // The upstream operation for this encoding is not what it says it is.
+ const uint32_t ARMv4_NopEncoding = 0xe1a00000; // using MOV r0,r0
+ // @LOCALMOD-END
const uint32_t ARMv6T2_NopEncoding = 0xe320f000; // NOP
if (isThumb()) {
const uint16_t nopEncoding = hasNOP() ? Thumb2_16bitNopEncoding