[Top] [All Lists]

Re: Strange instruction

To: "Kevin D. Kissell" <>
Subject: Re: Strange instruction
From: Thiemo Seufer <>
Date: Thu, 14 Oct 2004 14:12:42 +0200
Cc: Dmitriy Tochansky <>,
In-reply-to: <01d901c4b1c8$996b7b30$10eca8c0@grendel>
Original-recipient: rfc822;
References: <> <01d901c4b1c8$996b7b30$10eca8c0@grendel>
User-agent: Mutt/1.5.6i
Kevin D. Kissell wrote:
> That's a 64-bit add, which is actually being used as a 64-bit move
> of the "sp" register to k1.  Try "objdump -m mips:isa64" (or whatever
> variant gives your version of objdump the right to disassemble the
> MIPS III+/MIPS64 instructions.
> One might suspect that your board monitor ROM was built for a 64-bit CPU.
> This illustrates why, if one want to write portable assembler code for MIPS,
> one should implement "move" operations as OR Target,$0,Source rather than
> using an ADDU or DADDU...

GNU as has "move" as builtin macro which is expanded differently for
32 and 64 bit mode. This simplifies the task of writing code for both
models. Unfortunately the expansion was broken for a while and
generated always the 64 bit version if the toolchain was 64bit
_capable_. IIRC this was fixed in the early 2.14 timeframe.


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