linux-mips
[Top] [All Lists]

GCC 3.4.5 and mftc0

To: <linux-mips@linux-mips.org>
Subject: GCC 3.4.5 and mftc0
From: "Mikael Starvik" <mikael.starvik@axis.com>
Date: Fri, 14 Dec 2007 10:49:40 +0100
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Thread-index: Acg+NqUmOqkfWFBVTzaV/6B9jRu56Q==
Thread-topic: GCC 3.4.5 and mftc0
mftc0() is implemented as
 
 .word ...
  move %0, $1

With at least gcc 3.4.5 the move is implemented as an addu %0, $1, $0.
But in the MIPS sumulator this fails and %0 gets the value 0xffffffff.
Implementing this as a or %0, $1, $0 instead gives the expected result.

Any suggestions where the problem is and what the correct solution is?

After fixing this my next problem is that IPIs doesn't reach all TCs
correctly (it seams like the code doesn't detect IXMT status correctly,
but I am still investigating). It is likely that it is caused by
something similar to the problem above.

Regards
/Mikael

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