PowerPC 32 : GOT access not optimized for DSO-scope static variable ?
Alan Modra
amodra@gmail.com
Sat Jun 15 11:16:00 GMT 2013
On Fri, Jun 14, 2013 at 04:37:27PM +0200, yon ar c'hall wrote:
> So is there any possible optimization regarding static DSO scope
> variables access (and variables with visibility=hidden as well) for
> PowerPC ?
It is possible, but gcc -m32 does not implement this sort of
optimisation. gcc -m64 does. eg.
.L.f1:
addis 9,2,static_var@toc@ha
lwz 3,static_var@toc@l(9)
extsw 3,3
blr
vs.
.section ".toc","aw"
.LC0:
.quad global_var
.text
.L.f2:
addis 10,2,.LC0@toc@ha
ld 9,.LC0@toc@l(10)
lwz 3,0(9)
extsw 3,3
blr
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list