This is an archive of the discontinued LLVM Phabricator instance.

ELF/AArch64: Fix R_AARCH64_LDST16_ABS_LO12_NC mask
ClosedPublic

Authored by zatrazz on Dec 1 2016, 10:06 AM.

Details

Summary

The relocation R_AARCH64_LDST16_ABS_LO12_NC should set a ld/st
immediate value to bits [11:1] not [11:2]. This patches fixes it
and adds a testcase for regression.

With this fix all the faulty tests on test-suite (clavm, lencod,
and trimaran) pass.

Diff Detail

Repository
rL LLVM

Event Timeline

zatrazz updated this revision to Diff 79940.Dec 1 2016, 10:06 AM
zatrazz retitled this revision from to ELF/AArch64: Fix R_AARCH64_LDST16_ABS_LO12_NC mask.
zatrazz updated this object.
zatrazz added reviewers: ruiu, rafael, rengolin.
zatrazz set the repository for this revision to rL LLVM.
zatrazz added a project: lld.
zatrazz added a subscriber: llvm-commits.

LGTM. It is constant with my understanding of: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0056b/IHI0056B_aaelf64.pdf

In looking at the surrounding similar relocations, shouldn't R_AARCH64_LDST128_ABS_LO12_NC be 0xFF0?

ruiu accepted this revision.Dec 2 2016, 11:04 AM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Dec 2 2016, 11:04 AM

LGTM. It is constant with my understanding of: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0056b/IHI0056B_aaelf64.pdf

In looking at the surrounding similar relocations, shouldn't R_AARCH64_LDST128_ABS_LO12_NC be 0xFF0?

Yes, this is on my list. I am struggling to create a testcase that triggers an issue with correct invalid mask.

zatrazz closed this revision.Dec 5 2016, 8:20 AM