-
Notifications
You must be signed in to change notification settings - Fork 58
Conversation
Overall in a good direction (and IMHO the direction everyone should have taken in the first place), thanks! A few suggestions though: Some of the field names can be a bit hard to understand, consider Plus, currently it's implied that a particular relocation type is somehow bound to a specific instruction, that's being used by the reference implementation (binutils) for the type today. This could change though, as future instructions emerge with similar or identical format. I have drafted my scheme back in November 2021, which I posted here a while ago; the approach is extremely similar (IMO there's only one possible way to implement the more traditional scheme), but my version has adopted the operand slot naming scheme of loongarch-opcodes (which I'll be submitting to this repo shortly) and the more direct |
(In an additional note, the reason why I didn't particularly like the |
@yetist @SixWeining Please review this. |
(Context: I have major contributions to lld's aarch64,powerpc64,x86-32,x86-64 ports and am the main author of powerpc32/riscv ports.)
Unsigned overflow checking is unusual. Re-think whether it is needed. Instead of the somewhat vague Is there an Why do local-exec TLS relocation types have the
The 64-bit counterpart is very useful in metadata.
If not used, don't add it now. Note: A too-long relocation type name may have problems in the default (non-wide) output of |
And, wait a minute: how could "lowest 12-bit" cause a "12-bit unsigned overflow"? This just does not make sense to me. Is this a typo or the intention is just "without overflow check"? |
For example, aarch64 uses a pair of HI21/LO12_NC (NC for "no check") to encode a value which is representable in 33 bits. |
|
Should we continue to review this or just close it as superseded by #57? This does not contain those "PCALA" relocs and it seems the binutils patches under review are using PCALA relocs. |
I agree with you. |
This pr should be closed @lixing-star , Please go to #57. |
Add more relocation type for LoongArch