From patchwork Wed Jun 11 21:07:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 358889 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id ED677140080 for ; Thu, 12 Jun 2014 07:07:40 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject; q=dns; s=default; b=u/vDPzhJZMQgAQk EABJhVOKfLmzOS4HdH8mgn/+K+A4J0k1Np4rIphqRH4SEpUCyfO8njYP7SEVl37x ftoMTlRL/0PjxK4km/LbFWzCu2jL87ReF/Scw9LMSNJ1ANwxfgw/vWHLGYpoQoma YrRjvBXJy6HZtinVg55zO8YJYGZA= 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:date :message-id:from:to:subject; s=default; bh=mm/00gDBpSmnPOoEQVrMY 6zmqGk=; b=FaaBfmZ1AWc674pnVcWs5UcrImhz0Gp2q5bKJG0T9bQQfkMaIUDfA +dWc3xX63SpBI2ZaOcVGHx8iyu5X5V/Qt7M8UuZAZsGkq8glkqf2LFyk9WdgnLq1 CNsxsuKTCupjoHHK2uwJbOdeMMkkOCY5e9u6vS3iup+4vPKyF9sVE8= Received: (qmail 9839 invoked by alias); 11 Jun 2014 21:07:33 -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 9828 invoked by uid 89); 11 Jun 2014 21:07:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Jun 2014 21:07:31 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5BL7UoG007769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 11 Jun 2014 17:07:30 -0400 Received: from greed.delorie.com ([10.3.113.17]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5BL7Th2009144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 11 Jun 2014 17:07:30 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.14.4/8.14.4) with ESMTP id s5BL7SfP029237 for ; Wed, 11 Jun 2014 17:07:29 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.4/8.14.4/Submit) id s5BL7SoE029236; Wed, 11 Jun 2014 17:07:28 -0400 Date: Wed, 11 Jun 2014 17:07:28 -0400 Message-Id: <201406112107.s5BL7SoE029236@greed.delorie.com> From: DJ Delorie To: gcc-patches@gcc.gnu.org Subject: [rx] adjust alignments for RX100/200 families X-IsSubscribed: yes The RX100/200 families have 4 byte cache lines, vs 8 bytes for the RX600 family. Applied. * config/rx/rx.h (FUNCTION_BOUNDARY): Adjust for RX100/200 4-byte cache lines. * config/rx/rx.c (rx_option_override): Likewise. (rx_align_for_label): Likewise. Index: config/rx/rx.h =================================================================== --- config/rx/rx.h (revision 211479) +++ config/rx/rx.h (working copy) @@ -139,13 +139,13 @@ #endif #define DEFAULT_SIGNED_CHAR 0 /* RX load/store instructions can handle unaligned addresses. */ #define STRICT_ALIGNMENT 0 -#define FUNCTION_BOUNDARY 8 +#define FUNCTION_BOUNDARY ((rx_cpu_type == RX100 || rx_cpu_type == RX200) ? 4 : 8) #define BIGGEST_ALIGNMENT 32 #define STACK_BOUNDARY 32 #define PARM_BOUNDARY 8 #define STACK_GROWS_DOWNWARD 1 #define FRAME_GROWS_DOWNWARD 0 Index: config/rx/rx.c =================================================================== --- config/rx/rx.c (revision 211480) +++ config/rx/rx.c (working copy) @@ -2789,17 +2789,17 @@ rx_option_override (void) if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2)) flag_strict_volatile_bitfields = 1; rx_override_options_after_change (); if (align_jumps == 0 && ! optimize_size) - align_jumps = 3; + align_jumps = ((rx_cpu_type == RX100 || rx_cpu_type == RX200) ? 2 : 3); if (align_loops == 0 && ! optimize_size) - align_loops = 3; + align_loops = ((rx_cpu_type == RX100 || rx_cpu_type == RX200) ? 2 : 3); if (align_labels == 0 && ! optimize_size) - align_labels = 3; + align_labels = ((rx_cpu_type == RX100 || rx_cpu_type == RX200) ? 2 : 3); } static bool rx_allocate_stack_slots_for_args (void) { @@ -3198,13 +3198,17 @@ rx_align_for_label (rtx lab, int uses_th because the delay due to the inserted NOPs would be greater than the delay due to the misaligned branch. If uses_threshold is zero then the alignment is always useful. */ if (LABEL_P (lab) && LABEL_NUSES (lab) < uses_threshold) return 0; - return optimize_size ? 1 : 3; + if (optimize_size) + return 0; + if (rx_cpu_type == RX100 || rx_cpu_type == RX200) + return 2; + return 2; } static int rx_max_skip_for_label (rtx lab) { int opsize;