From patchwork Sat Jul 10 00:00:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 58444 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]) by ozlabs.org (Postfix) with SMTP id A15F6B6F0C for ; Sat, 10 Jul 2010 10:00:40 +1000 (EST) Received: (qmail 6036 invoked by alias); 10 Jul 2010 00:00:39 -0000 Received: (qmail 6028 invoked by uid 22791); 10 Jul 2010 00:00:38 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Jul 2010 00:00:32 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6A00CuQ013213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 9 Jul 2010 20:00:12 -0400 Received: from greed.delorie.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6A00A3b020054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Jul 2010 20:00:11 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1] (may be forged)) by greed.delorie.com (8.14.3/8.14.3) with ESMTP id o6A0094O000414; Fri, 9 Jul 2010 20:00:09 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.3/8.14.3/Submit) id o6A009KB000411; Fri, 9 Jul 2010 20:00:09 -0400 Date: Fri, 9 Jul 2010 20:00:09 -0400 Message-Id: <201007100000.o6A009KB000411@greed.delorie.com> From: DJ Delorie To: Nathan Froyd CC: gcc-patches@gcc.gnu.org In-reply-to: <20100709232652.GO31369@codesourcery.com> (message from Nathan Froyd on Fri, 9 Jul 2010 16:26:53 -0700) Subject: Re: [patch] make -fstrict-volatile-bitfields the default for m32c, rx, sh, h8 References: <201007092246.o69MkQPf029572@greed.delorie.com> <20100709232652.GO31369@codesourcery.com> X-IsSubscribed: yes 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 Like this? Index: rx.c =================================================================== --- rx.c (revision 162014) +++ rx.c (working copy) @@ -2187,12 +2187,20 @@ rx_set_optimization_options (void) if (saved_allow_rx_fpu != ALLOW_RX_FPU_INSNS) error ("Changing the FPU insns/math optimizations pairing is not supported"); } } +static void +rx_option_override (void) +{ + /* This target defaults to strict volatile bitfields. */ + if (flag_strict_volatile_bitfields < 0) + flag_strict_volatile_bitfields = 1; +} + static bool rx_allocate_stack_slots_for_args (void) { /* Naked functions should not allocate stack slots for arguments. */ return ! is_naked_func (NULL_TREE); @@ -2775,9 +2783,12 @@ rx_memory_move_cost (enum machine_mode m #undef TARGET_CC_MODES_COMPATIBLE #define TARGET_CC_MODES_COMPATIBLE rx_cc_modes_compatible #undef TARGET_MEMORY_MOVE_COST #define TARGET_MEMORY_MOVE_COST rx_memory_move_cost +#undef TARGET_OPTION_OVERRIDE +#define TARGET_OPTION_OVERRIDE rx_option_override + struct gcc_target targetm = TARGET_INITIALIZER; /* #include "gt-rx.h" */