linux-mips
[Top] [All Lists]

Re: GAS 4kc question...

To: "Zajerko-McKee, Nick" <nmckee@telogy.com>
Subject: Re: GAS 4kc question...
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Wed, 31 Jul 2002 02:31:40 +0200
Cc: "Linux-Mips (E-mail)" <linux-mips@oss.sgi.com>
In-reply-to: <37A3C2F21006D611995100B0D0F9B73CBFE213@tnint11.telogy.design.ti.com>; from nmckee@telogy.com on Tue, Jul 30, 2002 at 06:28:32PM -0400
References: <37A3C2F21006D611995100B0D0F9B73CBFE213@tnint11.telogy.design.ti.com>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5.1i
On Tue, Jul 30, 2002 at 06:28:32PM -0400, Zajerko-McKee, Nick wrote:

> I'm trying to write some inline assembler code that needs the madd and mulu
> op codes found on the 4KC processor.  I've tried setting the cpu to 4650,
> but it failed to recognize the mulu instruction.  Can someone give me the
> magic incantation?  I'm running right now GCC 2.95.3 from Montavista.  I
> guess one way I can attack it for now is to build the op code by hand, but
> that is quite dirty, IMHO...

That's an inconsistence in the MIPS instruction set.  The old two operand
multiply instruction exists as both signed and unsigned (mult / multu)
but the new-style signed multiply only in an unsigned flavour.  In other
words, there is no mulu instruction.

I guess the reason was that this instruction is mainly used for DSP-style
stuff which need signed arithmetics while burning valuable space in the
instruction set for a mulu instruction wasn't considered worth the
instruction space.

  Ralf


<Prev in Thread] Current Thread [Next in Thread>