linux-mips
[Top] [All Lists]

Re: [Patch] / 0 should send SIGFPE not SIGTRAP...

To: cgd@broadcom.com
Subject: Re: [Patch] / 0 should send SIGFPE not SIGTRAP...
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Fri, 11 Jun 2004 21:50:35 +0200 (CEST)
Cc: David Daney <ddaney@avtrex.com>, Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, binutils@sources.redhat.com
In-reply-to: <yov57juduc7q.fsf@ldt-sj3-010.sj.broadcom.com>
Organization: Technical University of Gdansk
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <40C9F5A4.2050606@avtrex.com> <40C9F5FE.8030607@avtrex.com> <40C9F7F0.50501@avtrex.com> <Pine.LNX.4.55.0406112039040.13062@jurand.ds.pg.gda.pl> <mailpost.1086981251.16853@news-sj1-1> <yov57juduc7q.fsf@ldt-sj3-010.sj.broadcom.com>
Sender: linux-mips-bounce@linux-mips.org
On Fri, 11 Jun 2004 cgd@broadcom.com wrote:

> > 2. Gas should definitely use the codes consistently.  And it's a pity the
> > ABI got broken -- I think another mnemonic should have been chosen for the
> > correct implementation of "break", available to any ISA.
> 
> in retrospect, the 'B' variation probably wasn't the greatest idea.

 I guess it may be useful for something to have 20-bit codes available.  
Though except these few special cases, breaks tend to be inserted at the
run time, so it's the interested software that decides how to interpret
them, not gas.

> It may be very confusing to people who expect that the break code will
> translate into the instruction in an obvious way, and obviously it
> would mess up use of 20-bit codes, but i don't know how prevalent that
> is.

 I was surprised at first, too.

> Unfortunately, at this point, Linux should probably accept the
> divide-by-zero code in both locations.

 I think that's not a big trouble for Linux -- the path is rare and not
critical for performance.

> (Really, from day one, assemblers probably should have accepted a
> 20-bit code.  I just checked my copy of the Kane r2000/r3000 book, and
> it was 20-bit all the way back then.  If i had to guess, i'd guess
> that gas was copying a non-gnu assembler's behaviour.  In any case,
> water under the bridge.)

 Definitely they should have.  It's bug-compatibility with the original
MIPS assembler, I'm told.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

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