[PATCH] [lld][ARM] Add relocations to perform function calls
dprotivensky at accesssoftek.com
Mon Feb 2 23:14:24 PST 2015
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp:35
@@ +34,3 @@
+ return result;
> ruiu wrote:
> > Is this intentional that you used signed integers instead of unsigned integers in this function? I'd use uint16_t when I do bit manipulation.
> Agreed, will update all of these places while merging.
I just looked carefully into the code and realized that using signed integers is a proper way of handling addends, because they may be negative numbers as well.
As for MOV addend of Thumb instruction you mentioned, it's formed from exactly 16 bits, and the value is a signed integer, which may be negative (as the reference says). So using signed integers is perfectly fine for all relocation types.
More information about the llvm-commits