From owner-freebsd-ppc@freebsd.org Mon Feb 1 00:42:27 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 4332FA74DAF; Mon, 1 Feb 2016 00:42:27 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-oi0-x232.google.com (mail-oi0-x232.google.com [IPv6:2607:f8b0:4003:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1985AADB; Mon, 1 Feb 2016 00:42:27 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-oi0-x232.google.com with SMTP id p187so79748145oia.2; Sun, 31 Jan 2016 16:42:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=As1DNuZwlFGm66RwQLoKvCyvk+Fpx4BcQGjg1b5HLHw=; b=DCqGhs2FK27x85vyZSvDyHnvcFi9BDyXoDBo2d9CUNljuIRjrDBN9Zku2wrJFjTJSI /ueLNsDhXwPxg5Nod8phjdG6nu5ZhyhZJulbDdUHEh+DOsHno9UQI5SolIhvOdjrCbYK wl4YOSYLBysMEBF3GKJ+5S6grRnmcR2uBWPeuL4Ps8Dc8ww7X6Z1dz4lfeMib6HRqA5g VNmJdhoX8btKsByQJXqHWsVzYVir0jxCboxqBJFT1qE6RllMQXtYtFZG2Z8qyb+p7nUk ZD1Gl8Yqqg8ZYVS8idkRO55y5+FjbTbGoffp+TdbJUR53fxOvaNAg6+ukDs8bR7TdYIA sg8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=As1DNuZwlFGm66RwQLoKvCyvk+Fpx4BcQGjg1b5HLHw=; b=V20M/mKe0rcSSpO1GJ3iEOqhQPdw0PnjVMK+yLy4nEMnNJ0QvJ9IoT7VgOU9sBFG52 oHqH+Dnfj4vN9cfp4Yq0kFtW0AhV9/0J47kfc8pVWgtH7K//hzrPHx4Dvfnj2dCmx++m DZymVY7w0zAiSyGdNwNq4jgSRqbZ/w2uFTiAajRNg/7jorzy9ryn1A3V10EcVf38k/Ch yqDgN+ErpDw5+D4SOKGrzhFPQfm2uBysZQfchT1nyvdlX0rlq0ROZCQ9+1ZIqqtmz8eJ Ln/+Doicu1kVBpys7LOjF/nyh5wnKP82nJ0Q5Rgl4WWEjfP8UZenL90jJH5K8+Ga0Rcv 8ACg== X-Gm-Message-State: AG10YOR8xjRS4mYRajf6C+VBA/NOp+n/EOVBe9N5m+XHRkjXfWhGsKiBWrCu6LZprPse3VREzTs3bOLZnDedLw== MIME-Version: 1.0 X-Received: by 10.202.85.139 with SMTP id j133mr9476280oib.4.1454287345651; Sun, 31 Jan 2016 16:42:25 -0800 (PST) Received: by 10.182.74.101 with HTTP; Sun, 31 Jan 2016 16:42:25 -0800 (PST) Received: by 10.182.74.101 with HTTP; Sun, 31 Jan 2016 16:42:25 -0800 (PST) In-Reply-To: <0716BE3E-B7D1-4A10-B011-C1F0245296E7@dsl-only.net> References: <517B7923-5166-42D0-8FA8-52C05F956F06@dsl-only.net> <20160131140807.GA83147@vlakno.cz> <0716BE3E-B7D1-4A10-B011-C1F0245296E7@dsl-only.net> Date: Sun, 31 Jan 2016 18:42:25 -0600 Message-ID: Subject: Re: 3 quick questions about stack alignment for powerpc (32-bit) signal handlers From: Justin Hibbits To: Mark Millard Cc: freebsd-toolchain@freebsd.org, Nathan Whitehorn , Roman Divacky , FreeBSD PowerPC ML Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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:42:27 -0000 I'll take a look at the signal code in the kernel this evening. -Justin On Jan 31, 2016 18:41, "Mark Millard" wrote: > I have submitted Bug 206810 for this 11.0-CURRENT/clang380-import stack > alignment problem for TARGET_ARCH=powerpc signal delivery. > > === > 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: > > > > > > 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" > >