This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Assembler Error: orerand out of rage (145 not between -128 and 127) for m32r target
Mike Stump wrote:
On Jul 25, 2006, at 11:19 PM, Kazuhiro Inaoka wrote:
10: 24 46 24 46 st r4,@r6 -> st r4,@r6
14: 24 46 24 46 st r4,@r6 -> st r4,@r6
18: 24 46 24 46 st r4,@r6 -> st r4,@r6
1c: 24 46 24 46 st r4,@r6 -> st r4,@r6
20: 24 46 24 46 st r4,@r6 -> st r4,@r6
I'd assume that these are being estimated at 1-3 bytes instead of at 4
(or more bytes)? If so, I'd say, the hacky fix would be to estimate
ld/st instructions as 4 bytes instead?
Compiling with -g (DWARF debug option) creates debug local labels.
But compiler don't know need to alignment code (pnop)
at local labels on assember.
In the following case, sample 2byte instruction is "st".
The same problem happen using the other 2byte instruction.
Compiler with -g:
st r4, @r6 2byte
.LM4:
st r4, @r6 2nyte
.LM5:
st r4, @r6 2byte
.LM6:
Assembler with -g:
st r4, @r6 || pnop 4byte
.LM4:
st r4, @r6 || pnop 4byte
.LM5:
st r4, @r6 || pnop 4byte
.LM6:
Compiler without -g:
st r4, @r6 2byte
st r4, @r6 2nyte
st r4, @r6 2byte
Assembler without -g:
st r4, @r6 2byte
st r4, @r6 2nyte
st r4, @r6 2byte
The point of problem is how to treat the location debug labels.
(It's contained whether the alingment code is really necessary.)
Regards,
Kazuhiro Inaoka