Issue with current mips-4.4-303 toolchain

Girish Verma girish at circuitsutra.com
Thu Apr 28 09:05:55 UTC 2011


Hi,

I am currently using "mips-4.4-303" downloaded from Codesourcery. I found
two issue regarding the "*ADDU*" instruction in asembler and disassembly (
with objdump -d ), Please see the detail of issue and let know is this a bug
in toolchain or i have missed out something here

[Issue 1]
In my assembly file when i write *"addu $v0,$a4,$v0"* it generate
error "*Error:
illegal operands `addu $v0,$a4,$v0'*",

[Issue 2]
In case i try to assemble "*addu $v0,$t0,$v0*", mips is able to genrate
object code, but when i see the disassembly of same object code generate  I
see the following entry corresponding  to "addu $v0,$t0,$v0" instruction.

=========== objdump output entry ==============
0000000c <test+0xc> 01021021  addu  v0,t0,v0
=============Entry end ====================

As i am getting right instruction  in disassembly but we can see the opcode
is printed wrong as per MIPS instruction spec.

0x01021021 === 0000-0001-0000-0010-0001-0000-0010-0001

R type instruction
    6            5       5      5      5       5
[Opcode] [ Rs ] [Rt] [Rd] [sa] [function]

                 r8=a4
000000 -  01000  - 00010 -  00010 - 00000 - 100001

opcode value denote  r8=>a4 but in disassembly it show t0=>r12

Is this a bug in tool or i have made some wrong interpretation of MIPS
instruction set?

Best Regards
Girish Verma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/mips-gnu-discuss/attachments/20110428/8f82acc0/attachment.html>


More information about the mips-gnu-discuss mailing list