[Bug target/35788] MIPS stack overflow caused by addui instruction
rsandifo at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Apr 30 21:13:00 GMT 2008
------- Comment #9 from rsandifo at gcc dot gnu dot org 2008-04-30 21:12 -------
Sorry, I don't understand what you think the bug is. You say:
> For some reason the compiler allocates
> memory on the stack by issuing a Addui sp,sp with some negative number, however
> the negative number is only sixteen bits and therefore because the instruction
> is an add unsigned immediate this negative number gets treated like a positve
> number.
But you seem to misunderstand how the MIPS addiu instruction works.
The 16-bit immediate operand is sign-extended.
Do you actually get an execution failure?
Richard
--
rsandifo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsandifo at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35788
More information about the Gcc-bugs
mailing list