diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-08-29 20:42:03 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-08-29 20:42:03 +0000 |
commit | ef72107a490b26b59a0edd78c971b4ccdbcc7967 (patch) | |
tree | 6638bb5923a1254e5834e0a077504161928ecb8c /llvm/lib/ExecutionEngine | |
parent | ed9abbea865c6a790733792da6b00f4ea7c66a5b (diff) | |
download | bcm5719-llvm-ef72107a490b26b59a0edd78c971b4ccdbcc7967.tar.gz bcm5719-llvm-ef72107a490b26b59a0edd78c971b4ccdbcc7967.zip |
ExecutionEngine: fix a bug in the movt/movw relocator
According to the arm arm specifications, 4 bytes are needed for a shift instead
of 8, this was causing the movt instruction to write to a different register
sometimes.
Patch by Walter Erquinigo!
llvm-svn: 280005
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h index 91fdd936d7d..570c928cbce 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h @@ -225,7 +225,7 @@ public: Bytes[0] |= ((Immediate & 0xf000) >> 12); Bytes[1] |= ((Immediate & 0x0800) >> 11); Bytes[2] |= ((Immediate & 0x00ff) >> 0); - Bytes[3] |= ((Immediate & 0x0700) >> 8); + Bytes[3] |= (((Immediate & 0x0700) >> 8) << 4); }; EncodeImmediate(&Target[0], static_cast<uint32_t>(Result) >> 00); |