This is the mail archive of the gcc-help@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] |
In other words, the compiler has assumed that the global data object "a" will be linked in the first 4GB of the address space.
double a[DIM][DIM];
movl $a, %eax
The register 'eax' ( 'rax' actualy ) is used later in the code as the base for an address.
Questions:
1. Why 'movl' and not 'movq' is used? ( It seems that compilers assumes that the size of the address of the symbol 'a' is 32 bits only )
2. How to force the compiler to generate 'movq'?I know you can use -fPIC when compiling code for .so files to turn off some of the compile time assumptions about link time operations. I assume you're not compiling a .so, so -fPIC is probably drastic (if not flat out incorrect) for your purposes.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |