On 06/21/2013 01:00 PM, Andreas Krebbel wrote: > On 20/06/13 02:00, Vladimir Makarov wrote: >> I hope the following patch fixes >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57604 >> >> Although I have no specific hardware to check this. >> >> The patch also adds a comment about one recent change as it was done in >> the same function. >> >> The patch was successfully bootstrapped and tested on x86/x86-64 and >> s390x (including building java). > > With your patch I can successfully bootstrap GCC on s390x with ada and java > enabled. Thanks! > > However, the ESA mode (31bit) bootstrap seems to have some issues. > With 31bit addressing we cannot make the load address instruction available > like a normal add in the > backend since GCC then would try to use it for non-address calculations. This > would be wrong since > the highest bit would be ignored then. > > The addptr optab proposed by Richard looks like a good solution to me. It > could perhaps default to > a normal add for targets where it does not make a difference.
FWIW I have such a patch, made for a machine with segmented pointers. It adds a ptr_plus rtx code and a padd optab. I could try to dig it out if there's interest (it's against 4.5 though). I didn't realize that there are existing ports with similar problems. Bernd