linux-mips
[Top] [All Lists]

Re: Possible bug in gcc for mips?

To: Long Li <long21st@yahoo.com>
Subject: Re: Possible bug in gcc for mips?
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 29 Jan 2003 08:12:56 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <20030129031421.89385.qmail@web40408.mail.yahoo.com>; from long21st@yahoo.com on Tue, Jan 28, 2003 at 07:14:21PM -0800
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030129031421.89385.qmail@web40408.mail.yahoo.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5.1i
On Tue, Jan 28, 2003 at 07:14:21PM -0800, Long Li wrote:

> Subject: Possible bug in gcc for mips?

It's always possible to blame the tools for broken source.

>  asm volatile ("mfc0 %0,$12" :: "r"(status_reg));

Make that:

asm volatile ("mfc0 %0,$12" : "=r"(status_reg));

> Is this a possible bug or a feature for gcc 3.0.4?

Yes.  Broken source in, broken code out :-)

  Ralf

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