[mips-gnu-discuss] Issue with current mips-4.4-303 toolchain

Girish Verma girish at circuitsutra.com
Thu Apr 28 10:22:26 UTC 2011


Hi Jean Baptiste,

Thank for your prompt reply, I got confuse as i was referring new abi reg
name but objdump generate output in old abi ( detect  from object file) with
the use of -Mreg-names=n32, I can see correct output.

Thank for your time

Best Regards
Giirsh Verma


On Thu, Apr 28, 2011 at 3:07 PM, Jean-Baptiste Note <jbnote at gmail.com>wrote:

> Hi,
>
> As far as I know, the correct syntax would be more like
> addu $0, $1, $2
>
> You can shortcut by defining macros like:
> #define a0      $4
> #define a1      $5
> #define a2      $6
> #define a3      $7
>
> which yields
>
> addu a0, a1, a3
>
> Don't know what the assembler interprets if you mix letters in there.
>
> JB
>
> On Thu, Apr 28, 2011 at 11:05 AM, Girish Verma <girish at circuitsutra.com>
> wrote:
> > 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
> >
> >
> >
>
>
>
> --
> Jean-Baptiste Note
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/mips-gnu-discuss/attachments/20110428/9f19086f/attachment.html>


More information about the mips-gnu-discuss mailing list