This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [MIPS] fix CRT_CALL_STATIC_FUNCTION macro


> This is a follow-up to a change [1] in glibc. It fixes the issue [2]
> when jal can not reach a target in different region.
> 
> It has been tested with DejaGnu for mips32/o32, mips64/n32 and
> mips64/n64.
> 
> Let me know what you think.

So to confirm, the issue is non-pic crt calling an init routine beyond
the current 256 MB region?

Otherwise for PIC the issue is dealt with by the assembler with the
JAL <sym> being expanded to a load from the got and indirect call through
t9. Previously t9 would not have been set up for the callee if the code
was built non-pic (as it would just use a JAL). That would have made
the setup of gp somewhat pointless in the CRT_CALL_STATIC_FUNCTION
code. I am therefore a little confused by the existing code that sets
up GP but then it seemingly is not used unless built for PIC.

I need a little time to consider this further. Catherine may comment in
the meantime.

Thanks,
Matthew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]