From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IVgDL-0005IV-TS for qemu-devel@nongnu.org; Thu, 13 Sep 2007 00:22:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IVgDJ-0005I6-Gg for qemu-devel@nongnu.org; Thu, 13 Sep 2007 00:22:02 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVgDJ-0005I3-9l for qemu-devel@nongnu.org; Thu, 13 Sep 2007 00:22:01 -0400 Received: from phoenix.bawue.net ([193.7.176.60] helo=mail.bawue.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IVgDJ-0007zK-0N for qemu-devel@nongnu.org; Thu, 13 Sep 2007 00:22:01 -0400 Date: Thu, 13 Sep 2007 05:21:58 +0100 From: Thiemo Seufer Subject: Re: [Qemu-devel] [PATCH] S/390 host fixed Message-ID: <20070913042158.GE15247@networkno.de> References: <200707301349.26745.uli@suse.de> <200707301605.47719.uli@suse.de> <20070731235915.GL26960@networkno.de> <200708011544.43401.uli@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708011544.43401.uli@suse.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ulrich Hecht Cc: qemu-devel@nongnu.org Ulrich Hecht wrote: [snip] > > > +#ifdef __s390__ > > > + retaddr = (void*)((unsigned long)retaddr & 0x7fffffffUL); > > > +#endif > > > > All of those look weird. Is this a null-extension vs. sign-extension > > issue? > > S/390 has a 31 (thirty-one) bit address space; the MSB of the PSW is not > part of the address and must be masked out. This is simply part of the > architecture, there's no way around it. It looks like the retaddr value is always acquired via the GETPC macro, which does a __builtin_return_address(0). Could you check that - Gcc's __builtin_return_address isn't just broken - If the compiler is ok, test if twiddling the bit in the GETPC macro works for s390. I suspect this catches more instances of the problem and might even explain the odd breakage you saw. > > > +#ifdef __s390__ > > > + func = NULL; /* does not work on S/390 for unknown > > > reasons */ +#else > > > func = gen_jcc_sub[s->cc_op - CC_OP_SUBB][jcc_op]; > > > +#endif > > > > Hum. It wold be good to know what happens here. > > Indeed. :) Thiemo