[PATCH] D37335: [MIPS] Initial support of microMIPS code linking
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 5 15:12:58 PDT 2017
ruiu added inline comments.
================
Comment at: ELF/Arch/Mips.cpp:288
+ if (isMicroMips<ELFT>()) {
+ memset(Buf, 0, PltEntrySize);
+ if (isMipsR6<ELFT>()) {
----------------
ruiu wrote:
> Do you need this?
Is this needed?
================
Comment at: ELF/Arch/Mips.cpp:181-184
+ if (E == support::little) {
+ uint16_t *Words = (uint16_t *)&V;
+ std::swap(Words[0], Words[1]);
+ }
----------------
I don't believe this is correct as I seems to be violating the strict aliasing rule. I'd do
return (V << 16) | (V >> 16);
Repository:
rL LLVM
https://reviews.llvm.org/D37335
More information about the llvm-commits
mailing list