search for: _g2

Displaying 2 results from an estimated 2 matches for "_g2".

Did you mean: _2
2014 Mar 14
3
[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
>> Any thoughs? > > I'm now struggling to see how GCC justifies it. What if a different > translation-unit declared those variables in a different order? I also > can't get the same behaviour here, do you have a more complete > command-line? Ah, I see; the translation-unit that does the optimisation needs to have them as a definition (i.e. "= {0}") rather
2014 Mar 14
2
[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
....LCPI0_1: .long g0(GOTOFF) For ARM, codegen already keeps tracks of offset so it can implement the constant islands, so it should be able to see that the two globals are close enough that offset between them fits an immediate. Nick, will this work on MachO or can ld64 move _g0, _g1 and _g2 too far apart? BTW, what will gcc produce for void init(void *); extern int g0[100] __attribute__((visibility("hidden"))); extern int g1[100] __attribute__((visibility("hidden"))); extern int g2[100] __attribute__((visibility("hidden"))); void foo() { init(&g0)...