Messages in this thread | | | Date | Tue, 31 Dec 2019 20:25:00 -0800 | From | Paul Burton <> | Subject | Re: [PATCH] mips: vdso: conditionalize 32-bit time functions on COMPAT_32BIT_TIME |
| |
Hi Jason,
On Tue, Dec 31, 2019 at 08:10:56PM -0800, Paul Burton wrote: > I'm still not quite sure *why* this happens; perhaps GCC just decides it > doesn't need to save & restore $gp/$28 when it spots that it's being > "used" for __current_thread_info (even though that's never actually > referenced in the VDSO)?
Ah:
> After defining a global register variable, for the current compilation > unit: > > - If the register is a call-saved register, call ABI is affected: the > register will not be restored in function epilogue sequences after > the variable has been assigned. Therefore, functions cannot safely > return to callers that assume standard ABI.
https://gcc.gnu.org/onlinedocs/gcc/Global-Register-Variables.html
That makes sense then. What doesn't make sense is how this ever worked. A question for another day...
Thanks, Paul
| |