This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Backend extension for S390


actually I try to put Linux onto an older S390 machine with a smaller
command set. So I have to modifiy the gcc S390 backend. I added a option
"-mvintage" which forces the backend into the new mode.

The first version of that new backend (cross compiler on i586) is already
able to compile the kernel with or without "-mvintage". That kernel seems to
be o.k.

Now I wanted to compile glibc, but got a problem. While compiling
gconv_conf.c with option "-mvintage", cc1 aborts with a segmentation fault
in varasm.c/compare_constant_rtx().
I tried to analyze the problem, here is what I think I have found:
The constant hash list (const_rtx_hash_table[2]) is wrong. It becomes
confused by switching the "saveable_obstack" to a new one with
push_obstack(), allocating a constant_descriptor on that new stack and
putting it to the hash list (hash value 2). Now the stack is switched back
to the old one (with pop_obstack()) and the memory of the new stack is
reassigned and overwritten. The next search in this hash list crashes.
Why does cc1 crash with "-mvintage" only ? One possible explanation: the
code for our older S390 variant contains much more pool constants than the
code generated for the newer S390.

Could you please help me find the problem ? What items will be needed to
analyze the bug ? Should I write a 'normalī bug report ?

Thank you,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]