This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: MIPS R3900 'bgt' with gcc 3.0/binutils 2.11.2


Ian Lance Taylor wrote:
> 
> Jonathan Larmour <jlarmour@redhat.com> writes:
> 
> > No, but in that case, why is (for example) bgtu okay in MIPS 1, but bgtul
> > is only in MIPS 2? Perhaps opcodes should allow bgtul for the R3900 after
> > all. I'm not a compiler person, and don't know (read: try to avoid knowing)
> > the complexities of MIPS ISAs and their relevance to particular CPUs :-).
> 
> bgtu is a macro.  The assembler converts
>     bgtu $2,5,label
> into something like
>     sltiu $1,$2,6
>     beq $1,$0,label
> 
> bgtu is OK in MIPS 1 because the above instructions are OK in MIPS I.
> bgtul is only OK in MIPS II because the macro expansion requires beql,
> which is only available in MIPS II.
> 
> Actually, I see that in opcodes/mips-opc.c, beql with two register
> arguments is listed as supported on the 3900.  That implies that bgtul
> with two register arguments should also be supported on the 3900, but
> it is not so marked.  In fact, none of branch likely macros are listed
> as supported on the 3900.  That appears to be a longstanding bug in
> the MIPS opcode table.

Thanks. That's the type of info I was looking for - so it's an opcodes
issue, not a gcc one. I'll follow up with a patch on the binutils list
only.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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