在 2022/7/19 下午10:29, Xi Ruoyao 写道:
The change seems too large. It would be better to split it into
multiple commits (for example, just 3 commits for 1,2,3 below).
On Tue, 2022-07-19 at 21:08 +0800, Lulu Cheng wrote:
1. The original LA macro instruction is split into two instructions to
obtain the address of the symbol if enable '-mexplicit-relocs'.
It's better to add some test cases (with dg-final scan-assembler) for
this. The test case will also show humans the intended behavior after
the change.
I'm sorry, I'll add the test cases as soon as possible.
3. Modify the method that calls global functions. From 'la.global + jirl'
to 'bl'.
Why? Does it means we'll rely on the assembler to emit the correct
sequence for -fno-plt? Then it would be better to use a pseudo mnemonic
like "call" instead of "bl" (because it's not a single "bl"
instruction).
I have not described the behavior of noplt, but I will do so in the next
submission.