diff options
author | David Sehr <sehr@google.com> | 2012-12-05 21:01:27 +0000 |
---|---|---|
committer | David Sehr <sehr@google.com> | 2012-12-05 21:01:27 +0000 |
commit | f2a1c83c86ceefb9a241aa728d1d1239a64b894e (patch) | |
tree | adf9dec3608f0462147f05c82962a7472d5abd08 /lib | |
parent | fa8de2403078353fe3c7ae160bec22fa23d4d315 (diff) | |
download | external_llvm-f2a1c83c86ceefb9a241aa728d1d1239a64b894e.zip external_llvm-f2a1c83c86ceefb9a241aa728d1d1239a64b894e.tar.gz external_llvm-f2a1c83c86ceefb9a241aa728d1d1239a64b894e.tar.bz2 |
Correct ARM NOP encoding
The encoding of NOP in ARMAsmBackend.cpp is missing a trailing zero, which
causes the emission of a coprocessor instruction rather than "mov r0, r0"
as indicated in the comment. The test also checks for the wrong encoding.
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121203/157919.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp index 3fe23bb..6aab0a0 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp @@ -220,7 +220,7 @@ 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 + const uint32_t ARMv4_NopEncoding = 0xe1a00000; // using MOV r0,r0 const uint32_t ARMv6T2_NopEncoding = 0xe320f000; // NOP if (isThumb()) { const uint16_t nopEncoding = hasNOP() ? Thumb2_16bitNopEncoding |