tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lang/php5 on m68k problems



Paul Ripke wrote:

>On Tue, Sep 30, 2008 at 05:29:11PM +0000, John Klos wrote:
>>[...]
>> /var/tmp//ccpS22Ph.s: Assembler messages:
>> /var/tmp//ccpS22Ph.s:231: Error: value out of range
>> /var/tmp//ccpS22Ph.s:231: Error: value of -286 too large for field of 1
>> bytes at 535
>> /var/tmp//ccpS22Ph.s:274: Error: value out of range
>> /var/tmp//ccpS22Ph.s:274: Error: value of -286 too large for field of 1
>> bytes at 627
>> /var/tmp//ccpS22Ph.s:352: Error: value out of range
>> /var/tmp//ccpS22Ph.s:352: Error: value of -286 too large for field of 1
>> bytes at 833
>        [...]
>        .set .LI70,.+2
>        move.w .L70-.LI70.b(%pc,%d1.l*2),%d0
>.L147:
>        moveq #6,%d2
>        cmp.l %d1,%d2
>        jbcs .L147
>.L148:
>        jmp %pc@(2,%d0:w)
>        .align  2
>.L70:
>        .word .L63-.L70
>        .word .L64-.L70
>        .word .L65-.L70
>        .word .L66-.L70
>        .word .L67-.L70
>        .word .L68-.L70
>        .word .L69-.L70
>
>and it's tripping up on the move.w. AFAICT, this is part of the
>expansion of a switch statement inside the php_conv_qprint_decode_convert
>function. BTW: that move.w is repeated 3 times in that function, leading
>to the three errors.
>
>Looks like a gcc bug. It *does* compile at -O however (but not -O2).

I can confirm that, and it could also be an assembler bug.
The PC-relative distance to the table at .L70 is calculated three
times via the symbol .LI70, which is always set to the address of
the move.w instruction + 2.

My guess is that the assembler uses the last set-value of .LI70,
when rendering the instruction, instead of the one defined in the
line above. This explains the errors showing three times the same
wrong value of -286!

I am crossposting this to tech-toolchain (or where do compiler/assembler
bugs belong?).


--
Frank Wille


Home | Main Index | Thread Index | Old Index