From owner-freebsd-ppc@freebsd.org Mon Feb 1 00:41:14 2016 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2616A74C6D for ; Mon, 1 Feb 2016 00:41:14 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-1.reflexion.net [208.70.210.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 584E6938 for ; Mon, 1 Feb 2016 00:41:13 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 27054 invoked from network); 1 Feb 2016 00:41:11 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 1 Feb 2016 00:41:11 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Sun, 31 Jan 2016 19:41:07 -0500 (EST) Received: (qmail 24110 invoked from network); 1 Feb 2016 00:41:07 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 1 Feb 2016 00:41:07 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id E9A6C1C42A3; Sun, 31 Jan 2016 16:41:06 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: 3 quick questions about stack alignment for powerpc (32-bit) signal handlers From: Mark Millard In-Reply-To: <20160131140807.GA83147@vlakno.cz> Date: Sun, 31 Jan 2016 16:41:11 -0800 Cc: Nathan Whitehorn , Justin Hibbits , FreeBSD Toolchain , FreeBSD PowerPC ML Content-Transfer-Encoding: quoted-printable Message-Id: <0716BE3E-B7D1-4A10-B011-C1F0245296E7@dsl-only.net> References: <517B7923-5166-42D0-8FA8-52C05F956F06@dsl-only.net> <20160131140807.GA83147@vlakno.cz> To: Roman Divacky X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2016 00:41:14 -0000 I have submitted Bug 206810 for this 11.0-CURRENT/clang380-import stack = alignment problem for TARGET_ARCH=3Dpowerpc signal delivery. =3D=3D=3D Mark Millard markmi at dsl-only.net On 2016-Jan-31, at 6:08 AM, Roman Divacky wrote: Fwiw, LLVM expect 16B aligned stack on PowerPC. On Sun, Jan 31, 2016 at 05:55:20AM -0800, Mark Millard wrote: > 3 quick FreeBSD for powerpc (32-bit) questions: >=20 >=20 > A) For PowerPC (32-bit) what is the stack alignment requirement by the = ABI(s) that FreeBSD targets? >=20 > B) Are signal handlers supposed to be given that alignment? >=20 >=20 > I ask because signal handlers are at times begin given just 4-byte = alignment but clang 3.8.0 powerpc's code generation can depend on the = alignment being more than 4. >=20 > clang 3.8.0 can calculate addresses by, for example, masking in a 0x4 = relative to what would need to be an aligned address with alignment 8 or = more instead of adding 0x4 to a more arbitrary address. >=20 > So far I've only seen less than 8 byte stack alignment via signal = handler activity. >=20 >=20 > C) Which should be blamed for problems here: clang's code generation, = FreeBSD's stack alignment handling for signals, or both? >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > _______________________________________________ > freebsd-toolchain@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > To unsubscribe, send any mail to = "freebsd-toolchain-unsubscribe@freebsd.org"