This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Re: PATCH: PR 1013: x86_64 assembler doesn't tak 64bit address


On Fri, Jun 17, 2005 at 07:07:01AM -0600, Jan Beulich wrote:
> >gas/
> >
> >2005-06-16  H.J. Lu  <hongjiu.lu@intel.com>
> >
> >	PR 1013
> >	* config/tc-i386.c (md_assemble): Don't call optimize_disp on
> >	movabs.
> >	(optimize_disp): Optimize only if possible. Don't use 64bit
> >	displacement on non-constants and do same on constants if
> >	possible.
> >
> 
> This seems odd to me. You only do this for constants, and that's perhaps the far less important piece. What I tried and didn't get to work was the more useful case of allowing symbols here, too. And then obviously the exactly same thing should be done for movabs moving immediates (symbol offsets, that is) into a register.
> 

movabs only takes 64bit. mov can take 16, 32 or 64bits. For symbol, we
have to choose a relocation. We use R_X86_64_32S for mov and
R_X86_64_64 for movabs. But for constants, we know how many bits will
be needed and we use the shortest one for mov.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]