[PATCH] D81106: [PowerPC][NFC] Don't need to and instruction with inverse of mask.
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 13:46:35 PDT 2020
sfertile added inline comments.
================
Comment at: lld/ELF/Arch/PPC64.cpp:976
checkAlignment(loc, val, 4, rel);
- write32(loc, (read32(loc) & ~mask) | (val & mask));
+ write32(loc, read32(loc) | (val & mask));
break;
----------------
MaskRay wrote:
> This existing code have one fewer assumption. What's the motivation behind the change?
The motivation is consistency: We don't zero out the bits before writing them in the handling of any of the other relocations, we assume the bits to be relocated already contain zeros.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81106/new/
https://reviews.llvm.org/D81106
More information about the llvm-commits
mailing list