This is an archive of the discontinued LLVM Phabricator instance.

[ELF/AARCH64] - Implemented R_AARCH64_CONDBR19 relocation.
ClosedPublic

Authored by grimar on Dec 29 2015, 7:45 AM.

Details

Summary

R_AARCH64_CONDBR19 is calculated as S+A-P,
Set the immediate field of a conditional branch instruction to bits [20:2] of X; check -2^20 ≤ X< 2^20.

Afaik there is no document for AARCH64 instruction encoding from official for unknown reason, so
I used gold source code and next link as a reference for implementation: http://kitoslab-eng.blogspot.ru/2012/10/armv8-aarch64-instruction-encoding.html. From which is clear that immediate field of a conditional branch instruction is 5 bits off. That is prooved by output which is is equal to gold/bfd now.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 43736.Dec 29 2015, 7:45 AM
grimar retitled this revision from to [ELF/AARCH64] - Implemented R_AARCH64_CONDBR19 relocation..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.
emaste added a subscriber: emaste.Dec 29 2015, 8:16 AM
grimar updated this revision to Diff 43783.Dec 30 2015, 4:42 AM
  • Added support for DSO case.
ruiu accepted this revision.Jan 5 2016, 9:13 AM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 5 2016, 9:13 AM
This revision was automatically updated to reflect the committed changes.