[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MIPS16 GNU Assembler bug
From: |
Shane Nay |
Subject: |
Re: MIPS16 GNU Assembler bug |
Date: |
Wed, 17 Jan 2001 00:40:31 -0800 |
On Tuesday 16 January 2001 10:24, Nick Clifton wrote:
> Hi Shane,
>
> > I was fiddling around with the CVS version of binutils, and noted a
> > bug in one of the macros in gas.
> >
> > .cpload -> s_cpload in binutils/gas/config/tc-mips.c
> > Among other things it maps to a macro_build_lui, (Load upper
> > immediate) which is undefined for MIPS16. Probably needs an if case
> > for MIPS16, and then use another way to build the memory location
> > up. (More ops load register or something ?)
>
> I consulted with a MIPS expert about this. It seems that the .cpload
> directive is only supported by the MIPS32 instruction set, not the
> MIPS16. Really what should happen is that you get an error message
> saying "unrecognised opcode" or some such. What actually happens when
> you run into this problem ?
Yes..., I consulted a MIPS expert and they said about the same thing ;-).
(Said it's too dificult to do the .cpload in MIPS16, which I understand after
looking at the code) The error it gives is probably the _true_ bug :
/tmp/ccefNT2B.s: Assembler messages:
/tmp/ccefNT2B.s:18: Internal error!
Assertion failure in macro_build_lui at ../../src/gas/config/tc-mips.c line
2780.
Please report this bug.
I'm willing to send in a patch against this..., I'll hack it up in a few
hours. The assertion that it blows is that it realizes it's in mips16 mode
at macro_build_lui, but it should have realized this, and blurted out an
error when it first encountered the .cpload macro in the assembler that was
put out by the c compiler.
Thanks,
Shane.