This is the mail archive of the
mailing list for the binutils project.
mips16 gas 'move' instruction question
- From: Jeff Kuskin <jsk at atheros dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 6 Aug 2002 16:18:23 -0700
- Subject: mips16 gas 'move' instruction question
I'm sure I'm just being clueless here, but how does one use the mips16
'move' instruction in gas?
In particular, the move instruction can transfer a mips16 register to a
mips32 register or the reverse and I don't see how to distinguish the two
uses since they both appear to make use of the same 'move' assembler
Two specific questions:
(1) I'm having trouble with the following code:
% cat t2.s
My intention is to move the contents of MIPS16 register $0 into MIPS32
register $12. I believe this would be the equivalent of the MIPS32
because the MIPS16 $0 register is the same physical entity as the MIPS32
$16 register. It should assemble into the MOV32R variant of the MIPS16
move instruction, with the hex value of 0x6588.
However, the 2002/07/10 snapshot of gas generates the following error
% as-new --version
GNU assembler 020710 20020710
% as-new -mips16 -ggdb -O -G 0 -non_shared -o t2.o t2.s
t2.s: Assembler messages:
t2.s:3: Error: illegal operands `move'
(2) In general, if the MOVR32 and MOV32R variants of the MIPS16 move
instruction both use the 'move' mnemonic, how can gas unambiguously
interpret a MIPS16 assembler instruction such as:
This could mean 'move the contents of MIPS16 register $4 into MIPS32
register $2' or it could mean 'move the contents of MIPS32 register $4
into MIPS16 register $2'. The former use requires the MOV32R variant
of the instruction while the latter requires the MOVR32 variant.
Thanks for any clarifications.
Jeffrey Kuskin Tel: +1-408-773-5256
Senior System Engineer Fax: +1-408-773-9940
Atheros Communications http://www.atheros.com