[Patch]: Re: gas 2.10.91 from 20000920 cvs is broken under hpux

John David Anglin dave@hiauly1.hia.nrc.ca
Tue Sep 26 20:54:00 GMT 2000


> > A possible fix is attached below.  Note there is another small fix
> > to pa_align as well.
> 
> Thanks.  Your analysis looks correct.
> 
> Hmm, let's see
> 
> #define nonzero_dibits(x) \
>   ((x) | (((x) & 0x55555555) << 1) | (((x) & 0xAAAAAAAA) >> 1))
> #define arg_reloc_stub_needed(CALLER, CALLEE) \
>   (((CALLER) ^ (CALLEE)) & nonzero_dibits (CALLER) & nonzero_dibits (CALLEE))
> 
> should work too.

Pretty tricky.  I used a function rather than a macro because of the function
evaluation needed for the caller symbol_arg_reloc_info (fixP->fx_addsy).
However, I didn't look at optimized code so maybe the optimizer will
eliminate the multiple calls.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


More information about the Binutils mailing list