egcs-1.1.1 bootstrap-failure on i386-next-nextstep3
Eric Norum
eric@skatter.usask.ca
Fri Dec 11 08:13:00 GMT 1998
I've discovered what's going wrong with egcs-1.1.1 on OPENSTEP/Intel.
Symptoms
========
The gencheck program compiled with stage1/xgcc does not run
(Segmentation fault).
Investigation
=============
A little poking with gdb shows that the program is dying on line 53:
53 for (i = 0; tree_codes[i]; i++)
Disassembling the instructions shows:
0x291e <main+34>: addl $0x04,%esp
0x2921 <main+37>: cmpl $0x00,tree_codes
0x2928 <main+44>: je 0x00002957
0x292a <main+46>: movl $tree_codes,%ebx
0x292f <main+51>: addb %cl,0x68505003(%ebx) <<=== ???
0x2935 <main+57>: pushal
0x2936 <main+58>: aas
Total garbage!
Identification
==============
Looking at the assembler code generated by the stage 1 compiler reveals:
.stabd 68,0,53
addl $4,%esp
cmpl $0,_tree_codes
je L95
movl $_tree_codes,%ebx
.align 2 <<<<<======= !!!!!!!!!!!
L97:
.stabd 68,0,55
movl (%ebx),%eax
pushl %eax
pushl %eax
What's an `align' doing in the middle of an instruction
sequence??!!! It's forcing an extra byte between the end of the
`movl $_tree_codes,%ebx' instruction and the beginning of the `movl
(%ebx),%eax' instruction. This, of course, completely messes up the
instructions seen by the processor.
The solution
============
This I don't have :-(
Perhaps an egcs expert out there can figure out what needs to be done.
---
Eric Norum eric@skatter.usask.ca
Saskatchewan Accelerator Laboratory Phone: (306) 966-6308
University of Saskatchewan FAX: (306) 966-6058
Saskatoon, Canada.
More information about the Gcc-bugs
mailing list