From patchwork Tue Nov 19 11:56:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Huber X-Patchwork-Id: 292361 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 CE51C2C00BA for ; Tue, 19 Nov 2013 22:57:23 +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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=K3zE5SBT0QJiMBWQc Wg7hHsLOF6e08P6cYxmCGySpPW9t0U7jTQnaeTsRVBAoAeOyLSCR0rZCP9j1ZXHa nSffpRDTluItIdWbJAlBhFZL3bOev+Xo5bHbXWHl10q1+nNon7oZ5MDyPwyPetST LXSiMnUFsRhxd6sZyGdsfVEyz4= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=nqbhQ4mKcP66POAK04LdRY1 EvMw=; b=EUeT6QqTZwfMtZPntBXrxcZrIRXMV4d2vtKfYiLWTpir7cYDeKtrFJQ VPExpOyP8VFrDU1Um3YvDtK8xUg9EO/I0Kc25u8DifUjEBoVTRBJWxArverHkJtx foBUcBGIBJTRovGQY/3b79qGdOJjfatiZQmzhAc5zt1paJdtP51M= Received: (qmail 8859 invoked by alias); 19 Nov 2013 11:57:12 -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 8848 invoked by uid 89); 19 Nov 2013 11:57:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.0 required=5.0 tests=AWL, BAYES_99, RDNS_NONE, T_FILL_THIS_FORM_SHORT, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail.embedded-brains.de Received: from Unknown (HELO mail.embedded-brains.de) (82.135.62.35) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Nov 2013 11:57:07 +0000 Received: by mail.embedded-brains.de (Postfix, from userid 65534) id 00334652CF6; Tue, 19 Nov 2013 12:56:55 +0100 (CET) Received: from [192.168.100.11] (unknown [192.168.100.11]) by mail.embedded-brains.de (Postfix) with ESMTP id 12CDC65253A; Tue, 19 Nov 2013 12:56:52 +0100 (CET) Message-ID: <528B51FF.1070204@embedded-brains.de> Date: Tue, 19 Nov 2013 12:56:47 +0100 From: Sebastian Huber User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: Eric Botcazou , Daniel Hellstrom , Joel Sherrill Subject: Re: [PATCH] RTEMS: Add LEON3/SPARC multilibs References: <1377774243-32474-1-git-send-email-sebastian.huber@embedded-brains.de> <5239E4CB.4080406@gcc.gnu.org> <523AA0BB.8050007@embedded-brains.de> <40580064.C2LFxsjqbk@polaris> In-Reply-To: <40580064.C2LFxsjqbk@polaris> X-IsSubscribed: yes Hello Eric, On 2013-09-19 09:23, Eric Botcazou wrote: >> I don't expect that this will be back ported to GCC 4.8. You also need >> >Binutils 2.24 for this. >>From a SPARC maintainership viewpoint, I'd think that this is backportable for > the upcoming 4.8.2 release, and the patches are essentially SPARC-specific, > but perhaps the RMs are of a different opinion here. I back ported your list of changes from mainline to GCC 4.8. See the attached patches. In addition to your proposed changes I had to add 2013-04-10 Steven Bosscher * config/sparc/sparc.c: Include tree-pass.h. (TARGET_MACHINE_DEPENDENT_REORG): Do not redefine. (sparc_reorg): Rename to sparc_do_work_around_errata. Move to head of file. Change return type. Split off gate function. (sparc_gate_work_around_errata): New function. (pass_work_around_errata): New pass definition. (insert_pass_work_around_errata) New pass insert definition to insert pass_work_around_errata just after delayed-branch scheduling. (sparc_option_override): Insert the pass. * config/sparc/t-sparc (sparc.o): Add TREE_PASS_H dependence. This was necessary for 2013-07-22 Eric Botcazou * config.gcc (sparc*-*-*): Accept leon3 processor. (sparc-leon*-*): Merge with sparc*-*-* and add leon3 support. * doc/invoke.texi (SPARC Options): Adjust -mfix-ut699 entry. * config/sparc/sparc-opts.h (enum processor_type): Add PROCESSOR_LEON3. * config/sparc/sparc.opt (enum processor_type): Add leon3. (mfix-ut699): Adjust comment. * config/sparc/sparc.h (TARGET_CPU_leon3): New define. (CPP_CPU32_DEFAULT_SPEC): Add leon3 support. (CPP_CPU_SPEC): Likewise. (ASM_CPU_SPEC): Likewise. * config/sparc/sparc.c (leon3_cost): New constant. (sparc_option_override): Add leon3 support. (mem_ref): New function. (sparc_gate_work_around_errata): Return true if -mfix-ut699 is enabled. (sparc_do_work_around_errata): Look into the instruction in the delay slot and adjust accordingly. Add fix for the data cache nullify issues of the UT699. Change insertion position for the NOP. * config/sparc/leon.md (leon_fpalu, leon_fpmds, write_buf): Delete. (leon3_load): New reservation. (leon_store): Bump latency to 2. (grfpu): New automaton. (grfpu_alu): New unit. (grfpu_ds): Likewise. (leon_fp_alu): Adjust. (leon_fp_mult): Delete. (leon_fp_div): Split into leon_fp_divs and leon_fp_divd. (leon_fp_sqrt): Split into leon_fp_sqrts and leon_fp_sqrtd. * config/sparc/sparc.md (cpu): Add leon3. * config/sparc/sync.md (atomic_exchangesi): Disable if -mfix-ut699. (swapsi): Likewise. (atomic_test_and_set): Likewise. (ldstub): Likewise. I cannot judge if this was good or bad. I can only perform mechanical changes since I don't know how the compiler works. I run the GCC test suite on the GDB SIS with RTEMS, but its hard for me to interpret the results. I think there are no new test failures due to the back ports. From cdce11fa563813f7229840aa0038162c229f597b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 19 Nov 2013 09:53:26 +0100 Subject: [PATCH 6/6] SPARC, GCC 4.8: Add LEON3 multilibs for RTEMS gcc/ChangeLog 2013-11-18 Sebastian Huber Backport from mainline 2013-09-17 Sebastian Huber * config/sparc/t-rtems: Add leon3 multilibs. --- gcc/config/sparc/t-rtems | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/sparc/t-rtems b/gcc/config/sparc/t-rtems index 63d0217..f1a3d84 100644 --- a/gcc/config/sparc/t-rtems +++ b/gcc/config/sparc/t-rtems @@ -17,6 +17,6 @@ # . # -MULTILIB_OPTIONS = msoft-float mcpu=v8 -MULTILIB_DIRNAMES = soft v8 +MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3 +MULTILIB_DIRNAMES = soft v8 leon3 MULTILIB_MATCHES = msoft-float=mno-fpu -- 1.7.7