3 ms·
In GCC 4.9 EBX register is reserved for global offset table (GOT) address [...] In GCC 5.0 EBX is returned to an allocation making all 7 registers available. B
by jomar 11y ago
In GCC 4.9 EBX register is reserved for global offset table (GOT) address [...] In GCC 5.0 EBX is returned to an allocation making all 7 registers available.
But there's no explanation of why we don't need a GOT any more.
Possibly this is "Reuse of the PIC hard register" noted in https://gcc.gnu.org/gcc-5/changes.html https://gcc.gnu.org/gcc-5/changes.html ..?
- ahomescu1 11y ago> But there's no explanation of why we don't need a GOT any more. I think it's related to this: https://news.ycombinator.com/item?id=9378861 https://news.ycombinator.com/item?id=9378861
- makomk 11y agoPresumably they've fixed it so that the GOT only has to be in a register whilst code is actually using it, and can be spilled to the stack at other times. Tight loops probably aren't going to be accessing the GOT in the inner loop - ideally they'll obtain a pointer to any global data they use at the start and use that, so it makes sense to move the GOT pointer elsewhere for the duration of the loop.