Port-amiga archive

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

Re: Xamiga segfaults with 16 bit on CV64



Hi,

I'm crossposting to port-m68k, because gcc4 compiler bugs may be interesting
for all 68k ports.

Here are some more information about my Xserver crash.

Stack frame backtrace:

#0  0x00091be2 in cfb16FillBoxTile32sCopy ()
#1  0x0008a8b0 in cfb16FillBoxTileOdd ()
#2  0x00088222 in cfb16PaintWindow ()
#3  0x0010ed34 in miWindowExposures ()
#4  0x00025fc0 in MapWindow ()
#5  0x00026106 in InitRootWindow ()
#6  0x0000686a in main ()
#7  0x00005de4 in __start ()

The registers:

d0             0x0      0
d1             0x2      2
d2             0x1      1
d3             0x178500 1541376
d4             0x5      5
d5             0xdffecb4        234876084
d6             0x60dec  396780
d7             0x2037c  131964
a0             0x0      0x0
a1             0x178500 0x178500
a2             0x178500 0x178500
a3             0xdffebe0        0xdffebe0
a4             0x0      0x0
a5             0x0      0x0
fp             0xdffeb08        0xdffeb08
sp             0xdffea9c        0xdffea9c
ps             0x4      0x4
pc             0x91be2  0x91be2
fpcontrol      0x0      0x0
fpstatus       0x8      0x8
fpiaddr        0x81b60ce        0x81b60ce

Disassembly of the crash location:
[...]
0x91bd4 <cfb16FillBoxTile32sCopy+56>:   moveal %a1@(16),%a0
0x91bd8 <cfb16FillBoxTile32sCopy+60>:   movel %a1,%sp@-
0x91bda <cfb16FillBoxTile32sCopy+62>:   moveal %a0@(372),%a0
0x91bde <cfb16FillBoxTile32sCopy+66>:   jsr %a0@
0x91be0 <cfb16FillBoxTile32sCopy+68>:   addql #4,%sp
0x91be2 <cfb16FillBoxTile32sCopy+70>:   movel %a0@(32),%fp@(-24)  <-- HERE
[...]

The code looks to me like a compiler bug (unless the sub-routine is meant to
return a result in a0). Register a0 is reused for deferencing after a sub-
routine call, although it is definitely a volatile register (and zero after
returning from the sub-routine). Additionally it was already overwritten with
a function pointer before.

While compiling Gnome and SDL for NetBSD/amiga in the last three weeks I had
several compiler bugs and internal compiler errors in gcc4. Some files could
only be compiled without optimization.

Seems we cannot trust gcc4 for 68k code generation... :|
I'm not a fan of gcc4 anyway.


My original posting:
> Hi,
> 
> either it's me having done something stupid, or the Xamiga of 4.0 no
> longer supports 16 bit screen depths. This is what I did:
> 
> ---8<---
> frank@phoenix grfconfig /dev/grf5
> 1: 800x600x8   57.0kHz @ 92Hz flags: +hsync +vsync
> 2: 800x600x16  57.8kHz @ 90Hz flags: +hsync +vsync
> 3: 1024x768x8  72.8kHz @ 92Hz flags: default
> 4: 1024x768x16 67.2kHz @ 83Hz flags: default
> 5: 1152x900x8  68.9kHz @ 74Hz flags: default
> 6: 1152x900x16 62.1kHz @ 66Hz flags: default
> Console: 640x480 (80x60)        31.2kHz @ 59Hz flags: default
> frank@phoenix cat .xserverrc 
> X -dev /dev/grf5 -mode 2
> 
> frank@phoenix startx
> 
> The XKEYBOARD keymap compiler (xkbcomp) reports:
>> Error:            Can't find file "amiga" for symbols include
>>                   Exiting
>>                   Abandoning symbols file "usa1"
> Errors from xkbcomp are not fatal to the X server Could not init font path
> element /usr/X11R6/lib/X11/fonts/CID/, removing from list! X connection to
> :0.0 broken (explicit kill or server shutdown). [1] Segmentation fault X
> -dev /dev/grf5... ---8<---
> 
> Further experiments have shown that it segfaults for mode 2, 4 and 6, but
> works with mode 1, 3 and 5, i.e. 8-bit works, 16-bit doesn't.
> 
> Has anobody made the same observations?
[...]

-- 
    _  Frank Wille (frank%phoenix.owl.de@localhost)
 _ //  http://sun.hasenbraten.de/~frank/
 \X/   Phx @ #AmigaGer




Home | Main Index | Thread Index | Old Index