This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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] modify crt0.S for 64-bit address targets


Paul Koning <pkoning@equallogic.com> writes:

>  Eric> Assuredly this is the case. I think the problem might be from
>  Eric> using the ori instead of addi for the address. ori zero extends
>  Eric> the constant, addi sign extends. IIRC all addresses should be
>  Eric> sign extended and as such we should be using addi here yes? I
>  Eric> seem to recall that we changed this a while back because the
>  Eric> ori was some small amount faster.
> 
> Faster?  On a RISC machine?  Seems odd.

I think Eric is reversed, actually.  There was a MIPS processor which
had two add units but only one logical unit.  Therefore, on average,
on that processor, add was faster.  That fact led to this change:

Tue Jul 11 11:49:49 1995  Ian Lance Taylor  <ian@cygnus.com>

	* mips-opc.c (mips_opcodes): For the move pseudo-op, prefer daddu
	if ISA 3 and addu otherwise, replacing or, since some MIPS chips
	have multiple add units but only a single logical unit.

Ian


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