Subject: Re: EGCS enabled on mips
To: Warner Losh <>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: current-users
Date: 10/31/1998 12:38:42
warner losh writes:
>I've seen on other lists that haifa on mips helps a little bit too
>much and generates code that violates the MIPS ABI.  However, this is
>considered to be a bug in the ABI which binutils can easily work
>around.  I don't recall the specifics, but it was in the Linux/MIPS
>mailing list.  Might be something to look out for when you use th
>haifa enabled compile.  Specifically, it would generate multiple %hi
>references w/o a corresponding %lo and binutils didn't quite know how
>to deal with that.

you mean HI16 and LO16 relocs, right, not the mulhi and mullo

>I'd be very interested to see what you come up with in this area.

Thanks for the info (and the confidence). 

My informed opinion is that backing out the -mdebuga, and using 'la'
templats to load 32-bit constants in one swell foop, would almost
certainly avoid this. (poorer code, but since its done by the
assembler its invisible to haifa, and so it'll work with the tools we
have).  If I run into the problem, I'll try it and let you know.

I'm mildly suprised nobody reported trying it, in fact.

Do you know if binutils  dies, or silently messses up the code?