From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81402 invoked by alias); 16 Jan 2018 10:20:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 81380 invoked by uid 89); 16 Jan 2018 10:20:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=mentions X-HELO: mail-wr0-f170.google.com Received: from mail-wr0-f170.google.com (HELO mail-wr0-f170.google.com) (209.85.128.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Jan 2018 10:19:58 +0000 Received: by mail-wr0-f170.google.com with SMTP id 16so14595991wry.12 for ; Tue, 16 Jan 2018 02:19:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pKGfXM/0S1CrjevU+3ciHppuynvdIbX6rwZYAeiQ3Zk=; b=azK5I34NhWLFYE77YYnqJoTveqwcipjmFqe3ChEipEJP1ZF11N/TRNnrbZtdvvFyv7 W1bexAHYhqlTMac+toFZ1WkaBSU02TdDxasTotFmgPQedYVGXKcyXVoumRo+8tC3420f 1bGyqDU3UEBLCySB74NsUjdj7dWkKkDpZbsTeJ6zxrj2Ubz94Xnfcu6yDaKJyLvFESfk ixyHLWgBF48/6WbpiXj12mcH3jCccK6OPsbxU179iWilnIUA3RXuXLI5whdzonPbJcMV dqWK8AFcKge15CuMCf2jVhLrZ60E2EDRlrl60B/wJ4bHpeGFfve40KOmryinncXdQV3D zVOw== X-Gm-Message-State: AKwxytfzNm5WPekQK5Ao2x3Hvd1ZbFpgQ9vduuO5ncPemagiVg9DpYjr AwMmebycwk4mUV5u0roaaYokFhLx X-Google-Smtp-Source: ACJfBouB2ZbIevruRBhMkCTki8BbY07Qde6FF+JX8HuQYTmpqugTUdhGppckZypacZKhmK4CAY/KvQ== X-Received: by 10.223.208.201 with SMTP id z9mr16910690wrh.194.1516097995909; Tue, 16 Jan 2018 02:19:55 -0800 (PST) Received: from localhost ([194.153.2.136]) by smtp.gmail.com with ESMTPSA id v72sm2133513wmd.12.2018.01.16.02.19.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jan 2018 02:19:55 -0800 (PST) Date: Tue, 16 Jan 2018 10:20:00 -0000 From: Andrew Burgess To: Claudiu Zissulescu Cc: gcc-patches@gcc.gnu.org, Francois.Bedard@synopsys.com Subject: Re: [PATCH 1/6] [ARC] Add JLI support. Message-ID: <20180116101953.GH2676@embecosm.com> References: <1509625835-22344-1-git-send-email-claziss@synopsys.com> <1509625835-22344-2-git-send-email-claziss@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1509625835-22344-2-git-send-email-claziss@synopsys.com> X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.1 (2017-09-22) X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg01419.txt.bz2 * Claudiu Zissulescu [2017-11-02 13:30:30 +0100]: > The ARCv2 ISA provides the JLI instruction, which is two-byte instructions > that can be used to reduce code size in an application. To make use of it, > we provide two new function attributes 'jli_always' and 'jli_fixed' which > will force the compiler to call the indicated function using a jli_s > instruction. The compiler also generates the entries in the JLI table for > the case when we use 'jli_always' attribute. In the case of 'jli_fixed' > the compiler assumes a fixed position of the function into JLI > table. Thus, the user needs to provide an assembly file with the JLI table > for the final link. This is usefully when we want to have a table in ROM > and a second table in the RAM memory. > > The jli instruction usage can be also forced without the need to annotate > the source code via '-mjli-always' command. > > gcc/ > 2017-02-10 Claudiu Zissulescu > John Eric Martin > > * config/arc/arc-protos.h: Add arc_is_jli_call_p proto. > * config/arc/arc.c (_arc_jli_section): New struct. > (arc_jli_section): New type. > (rc_jli_sections): New static variable. > (arc_handle_jli_attribute): New function. > (arc_attribute_table): Add jli_always and jli_fixed attribute. > (arc_file_end): New function. > (TARGET_ASM_FILE_END): Define. > (arc_print_operand): Reuse 'S' letter for JLI output instruction. > (arc_add_jli_section): New function. > (jli_call_scan): Likewise. > (arc_reorg): Call jli_call_scan. > (arc_output_addsi): Remove 'S' from printing asm operand. > (arc_is_jli_call_p): New function. > * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm > operand. > (movhi_insn): Likewise. > (movsi_insn): Likewise. > (movsi_set_cc_insn): Likewise. > (loadqi_update): Likewise. > (load_zeroextendqisi_update): Likewise. > (load_signextendqisi_update): Likewise. > (loadhi_update): Likewise. > (load_zeroextendhisi_update): Likewise. > (load_signextendhisi_update): Likewise. > (loadsi_update): Likewise. > (loadsf_update): Likewise. > (movsicc_insn): Likewise. > (bset_insn): Likewise. > (bxor_insn): Likewise. > (bclr_insn): Likewise. > (bmsk_insn): Likewise. > (bicsi3_insn): Likewise. > (cmpsi_cc_c_insn): Likewise. > (movsi_ne): Likewise. > (movsi_cond_exec): Likewise. > (clrsbsi2): Likewise. > (norm_f): Likewise. > (normw): Likewise. > (swap): Likewise. > (divaw): Likewise. > (flag): Likewise. > (sr): Likewise. > (kflag): Likewise. > (ffs): Likewise. > (ffs_f): Likewise. > (fls): Likewise. > (call_i): Remove 'S' asm letter, add jli instruction. > (call_value_i): Likewise. > * config/arc/arc.op (mjli-always): New option. > * config/arc/constraints.md (Cji): New constraint. > * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm > operand. > (subsf3_fpx): Likewise. > (mulsf3_fpx): Likewise. > * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing > asm operand. > * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed' > function attrbutes. > * doc/invoke.texi (ARC): Document mjli-always option. > > gcc/testsuite > 2017-02-10 Claudiu Zissulescu > > * gcc.target/arc/jli-1.c: New file. > * gcc.target/arc/jli-2.c: Likewise. This looks fine, but I wonder if there should be some documentation that mentions the new .jlitab section added? There's one whitespace issue I also spotted... > @@ -5026,6 +5062,36 @@ static void arc_file_start (void) > fprintf (asm_out_file, "\t.cpu %s\n", arc_cpu_string); > } > > +/* Implement `TARGET_ASM_FILE_END'. */ > +/* Outputs to the stdio stream FILE jli related text. */ > + > +void arc_file_end (void) > +{ > + arc_jli_section *sec = arc_jli_sections; > + > + while (sec != NULL) > + { I think the '{' is not indented correctly. Thanks, Andrew