From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17726 invoked by alias); 7 May 2003 17:02:54 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 17706 invoked from network); 7 May 2003 17:02:53 -0000 Received: from unknown (HELO faui11.informatik.uni-erlangen.de) (131.188.31.2) by sources.redhat.com with SMTP; 7 May 2003 17:02:53 -0000 Received: (from weigand@localhost) by faui11.informatik.uni-erlangen.de (8.9.1/8.1.4-FAU) id TAA11631; Wed, 7 May 2003 19:02:49 +0200 (MET DST) From: Ulrich Weigand Message-Id: <200305071702.TAA11631@faui11.informatik.uni-erlangen.de> Subject: Re: GCC 3.3 Prelease broken on s390 To: mark@codesourcery.com (Mark Mitchell) Date: Wed, 07 May 2003 17:02:00 -0000 Cc: rth@redhat.com, gcc@gcc.gnu.org In-Reply-To: <1052322820.23765.5.camel@minax.codesourcery.com> from "Mark Mitchell" at May 07, 2003 08:53:40 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00647.txt.bz2 Mark Mitchell wrote: > That seems fine, if it will work. The key criteria are: > > (1) You can do it in such a way that it's obvious it doesn't affect > other platforms. > > (2) You can do it quickly. > > Engineering beauty is not a consideration at all, in this case. I can offer the following patch, which passes bootstrap/regtest on s390-ibm-linux and s390x-ibm-linux and restores both targets to their previous behaviour in all cases, including that Java leaf-function test case. See: http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00428.html http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00429.html It should be obvious that it does not affect other platforms; the hunk in uw_update_context_1 is under #ifdef, and the hunk in uw_init_context_1 does not affect non-s390 platforms because for them uw_update_context_1 will immediately undo that change (never mind that even if it didn't, the change would in fact be correct for other platforms as well). I will continue to work on a cleaner solution, but I cannot guarantee that this will succeed within 24 hours (and I'd also like to ask for Richard's opinion). Do you think we should use the patch below for 3.3? Bye, Ulrich PR other/10650 * unwind-dw2.c (uw_update_context_1): Don't set sp as cfa on s390. (uw_init_context_1): Set initial sp to outer cfa. Index: gcc/unwind-dw2.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/unwind-dw2.c,v retrieving revision 1.22.2.4 diff -c -p -r1.22.2.4 unwind-dw2.c *** gcc/unwind-dw2.c 5 May 2003 16:59:21 -0000 1.22.2.4 --- gcc/unwind-dw2.c 7 May 2003 14:54:10 -0000 *************** uw_update_context_1 (struct _Unwind_Cont *** 1062,1069 **** --- 1062,1071 ---- Given that other unwind mechanisms generally won't work if you try to represent stack pointer saves and restores directly, we don't bother conditionalizing this at all. */ + #ifndef __s390__ tmp_sp = (_Unwind_Ptr) context->cfa; orig_context.reg[__builtin_dwarf_sp_column ()] = &tmp_sp; + #endif /* Compute this frame's CFA. */ switch (fs->cfa_how) *************** uw_init_context_1 (struct _Unwind_Contex *** 1164,1169 **** --- 1166,1172 ---- /* Force the frame state to use the known cfa value. */ context->cfa = outer_cfa; + context->reg[__builtin_dwarf_sp_column ()] = &outer_cfa; fs.cfa_how = CFA_REG_OFFSET; fs.cfa_reg = __builtin_dwarf_sp_column (); fs.cfa_offset = 0; -- Dr. Ulrich Weigand weigand@informatik.uni-erlangen.de