MIPS gas problems

ian@cygnus.com ian@cygnus.com
Tue Nov 18 17:20:00 GMT 1997


>1) There is a -4010 switch which is supposed to provide support for 
>the LSI Logic CW4010 core. It accepts all the 4010 special 
>instructions except MAX and MIN. These are in the LSI Logic manual as 
>valid instructions, so why were they left out? The release notes for 
>the latest FSF release I have say they were implemented by LSI Logic, 
>and provides a list of what they added. Sure enough, they list all 
>the instructions except these two.

The 4010 support was contributed by Jeff Spiegel <jeffs@lsil.com>.  I
have no documentation on the 4010, so I just trusted what he gave me.

>2) The latest binary I got from Cygnus via my customer has a -mips16 
>switch, but I can't get it to accept any MIPS16 instructions. It 
>always complains about bad operands, regardless of the form in whcih 
>they are specified. Example "or rx,ry" is the form for MIPS16. It 
>doesn't like "or $0,$0", "or 0, 0", "or r0,r0" ... so what does it 
>want? It also doesn't like "jr ra" which is supposed to be legal for 
>MIPS16. This should not be a register name to register number 
>translation problem, since MIPS16 does not include ra as one of its 
>registers. I.e., in the MIPS16 ISA, ra is a literal, not the name of 
>a register for which a number is to be substituted. Thus, the 
>assembler ought to be able to deal with it.

Regardless of what the MIPS16 ISA may say, gas requires you to say jr
$31.  I've never seen anything indicating that jr ra should work.  I
believe that jr $ra will work.

Using $0 doesn't work because the MIPS16 doesn't support $0.  You'll
have better luck if you use a register which exists on the MIPS16: $2
through $7, or $16 and $17.  Other registers are available for
specific instructions.

Ian



More information about the crossgcc mailing list