This is the mail archive of the binutils@sourceware.org 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: [RFA] Fix two tc-pdp11 internal errors


On Fri, Jan 14, 2011 at 04:59:19PM -0500, Paul Koning wrote:
> 
> On Jan 14, 2011, at 4:53 PM, Alan Modra wrote:
> 
> > On Fri, Jan 14, 2011 at 12:33:22PM -0500, Paul Koning wrote:
> >> +    case 8:
> >> +      con[0] = (value >> 48) & 0xff;
> >> +      con[1] = (value >> 56) & 0xff;
> >> +      con[2] = (value >> 32) & 0xff;
> >> +      con[3] = (value >> 40) & 0xff;
> >> +      con[4] = (value >> 16) & 0xff;
> >> +      con[5] = (value >> 24) & 0xff;
> >> +      con[6] =  value        & 0xff;
> >> +      con[7] = (value >>  8) & 0xff;
> >> +      break;
> > 
> > I think this will break the build on a 32-bit host (ie. when bfd_vma
> > is 32-bit).
> 
> I'll check.  My host is Mac OS, but I'm not sure if I'm using 32 or 64 bit.
> 
> On a 32 bit host, how are the 64 bit arguments to .quad passed around?

Not very well. :)  If you make it to the code you're patching above,
(eg. forward references) "value" will only be 32 bits.  Large
constants will be stored in expressionS as O_big.  You'll need to
check that read.c:emit_expr handles pdp endian correctly, and use
#ifdef BFD64 above to handle the high 32 bits.

-- 
Alan Modra
Australia Development Lab, IBM


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