From patchwork Tue Nov 12 21:11:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Stump X-Patchwork-Id: 290776 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A999A2C00AD for ; Wed, 13 Nov 2013 08:11:26 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; q=dns; s=default; b=PtdkCtIlb8ZchcZuxFq3aJ5gIx VvMDyk5k1tneoGffX/63gxU1VbQEu6TimLwEzF5PpT0BP4rmRYOH4jMMQd55sviD /j1ynp08UdUI0spsFaVSz5PGJxwqskigDceFaVdGYmeJOMfndK9XSdrluz1ABlfU 4n8FY5rQ6/aOX3NPk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; s=default; bh=9psnO+Dy52fq0jAGTL/0R6EBKqI=; b= LMIHfB2tHkzoyUaPWiuhtQyG/Ez17NFKwOgUBozPsIpuoMbDwFXQlWQhe85j+1ve 8ZFYzG7CVopWq7XaGbqU1PH7kagpH0onHt6qLti2cGQgrjf0kTG8OILrtizdH2tf 5wxAmWO3I85GiRhY0NYPzmaj8B3BGHRfvkGf7njpesI= Received: (qmail 29730 invoked by alias); 12 Nov 2013 21:11:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 29717 invoked by uid 89); 12 Nov 2013 21:11:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RDNS_NONE, SPF_PASS autolearn=no version=3.3.2 X-HELO: qmta08.emeryville.ca.mail.comcast.net Received: from Unknown (HELO qmta08.emeryville.ca.mail.comcast.net) (76.96.30.80) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2013 21:11:12 +0000 Received: from omta03.emeryville.ca.mail.comcast.net ([76.96.30.27]) by qmta08.emeryville.ca.mail.comcast.net with comcast id oiir1m0010b6N64A8lB5ll; Tue, 12 Nov 2013 21:11:05 +0000 Received: from up.mrs.kithrup.com ([24.4.193.8]) by omta03.emeryville.ca.mail.comcast.net with comcast id olB41m00P0BKwT48PlB5o4; Tue, 12 Nov 2013 21:11:05 +0000 From: Mike Stump Subject: not too big an alignment Message-Id: <29224C40-B124-4C42-BB57-F0E7604A9BF7@comcast.net> Date: Tue, 12 Nov 2013 13:11:04 -0800 To: "gcc-patches@gcc.gnu.org Patches" Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-IsSubscribed: yes Alignments are stored in a byte, large alignments don't actually work nicely. This caps the alignment to 128, as most ports would define BIGGEST_ALIGNMENT to be smaller than this. The competing change would to be to make it a short, but, I'd be happy to punt that until such time as someone actually needs that. Ports break down this way currently: 12 #define BIGGEST_ALIGNMENT 64 10 #define BIGGEST_ALIGNMENT 32 6 #define BIGGEST_ALIGNMENT 128 3 #define BIGGEST_ALIGNMENT 8 8 #define BIGGEST_ALIGNMENT 16 Ok? diff --git a/gcc/genmodes.c b/gcc/genmodes.c index b4dc0d2..8f4980c 100644 --- a/gcc/genmodes.c +++ b/gcc/genmodes.c @@ -1178,7 +1178,7 @@ emit_mode_base_align (void) alignment); for_all_modes (c, m) - tagged_printf ("%u", m->alignment, m->name); + tagged_printf ("%u", m->alignment > 128 ? 128 : m->alignment, m->name); print_closer (); }