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]

Re: Why pass HAVE_32BIT_GPRS to OPCODE_IS_MEMBER?


Richard Sandiford wrote:
[snip]
> > I don't know how abi=32 code is intended to be run.  if it simply
> > defines calling conventions, and not processor mode, then you need to
> > use 'or' rather than 'addu'.  If it defines processor mode as well,
> > then addu would be sufficient.
> 
> My understanding was that abi=32 should imply processor mode as well.

It can't, since 64bit modes were introduced after 32bit ABI.

> If
> there isn't agreement on that, let me know!  Then I'll go back to using
> forced-gpr-32 mode only if -mgp32 is explicitly given.
> 
> As it stands, many macros will use 32-bit instructions for address
> calculations if abi=32.  These operations would be just as unsafe as an
> "addu" move instruction if registers aren't in canonical form.

This is why the ISA requires sign extension of 32bit addresses.

> I don't think that there's really any reason why "move" should be treated
> specially here.  It seems to be a choice between register size and ABI
> either being linked or being kept seperate.  If people would prefer them
> kept separate (the historical behaviour) then I'm willing to change it back.

IMHO it would be weird to request ABI-conforming code without
ABI-conforming register sizes.


Thiemo


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