[PATCH] D27609: Fix R_AARCH64_MOVW_UABS_G3 relocation

Yichao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 04:00:16 PST 2016


yuyichao added inline comments.


================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:364
     // Immediate goes in bits 20:5 of MOVZ/MOVK instruction
-    *TargetPtr |= Result >> (48 - 5);
+    TargetValue |= ((Result & 0xffff000000000000ULL) >> (48 - 5));
     // Shift must be "lsl #48", in bits 22:21
----------------
Now that the diff is much bigger I should point out that this line is the actual bug fix (adding mask). Other changes are necessary so that the added test can be run without causing trouble on big endian systems.


https://reviews.llvm.org/D27609





More information about the llvm-commits mailing list