From owner-freebsd-toolchain@freebsd.org Sun Jan 31 14:10:31 2016 Return-Path: Delivered-To: freebsd-toolchain@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 38908A73DE8; Sun, 31 Jan 2016 14:10:31 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (mail.vlakno.cz [91.217.96.224]) by mx1.freebsd.org (Postfix) with ESMTP id 029F31AAC; Sun, 31 Jan 2016 14:10:30 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: by vlakno.cz (Postfix, from userid 1002) id E84331E207B7; Sun, 31 Jan 2016 15:08:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=vlakno.cz; s=mail; t=1454249287; bh=SWIR1MdPAqCmM/oXpYaw2DvdH9SyBCH8ut/N2i3vWmE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=HfYWyUxkUCve4qPlMrmRyg+25XUtJWDZGSR1PPhbRuCxs5DmThmrXksw09FRQSvK7 9MhUaXeCeWegdATiFNpwF0XzMFuRfF1fzjT+0WZRElZ9yOS/ED3gwcm538Rw7TdStz fCbCQMruTIoa7zF1zaH7io+ohCHP/kLMMRmxl9HU= Date: Sun, 31 Jan 2016 15:08:07 +0100 From: Roman Divacky To: Mark Millard Cc: Nathan Whitehorn , Justin Hibbits , FreeBSD Toolchain , FreeBSD PowerPC ML Subject: Re: 3 quick questions about stack alignment for powerpc (32-bit) signal handlers Message-ID: <20160131140807.GA83147@vlakno.cz> References: <517B7923-5166-42D0-8FA8-52C05F956F06@dsl-only.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <517B7923-5166-42D0-8FA8-52C05F956F06@dsl-only.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 14:10:31 -0000 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: > > > A) For PowerPC (32-bit) what is the stack alignment requirement by the ABI(s) that FreeBSD targets? > > B) Are signal handlers supposed to be given that alignment? > > > 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. > > 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. > > So far I've only seen less than 8 byte stack alignment via signal handler activity. > > > C) Which should be blamed for problems here: clang's code generation, FreeBSD's stack alignment handling for signals, or both? > > === > Mark Millard > markmi at dsl-only.net > > _______________________________________________ > 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"