[{"id":1839875,"web_url":"http://patchwork.ozlabs.org/comment/1839875/","msgid":"<20180116101953.GH2676@embecosm.com>","list_archive_url":null,"date":"2018-01-16T10:19:54","subject":"Re: [PATCH 1/6] [ARC] Add JLI support.","submitter":{"id":65155,"url":"http://patchwork.ozlabs.org/api/people/65155/","name":"Andrew Burgess","email":"andrew.burgess@embecosm.com"},"content":"* Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com> [2017-11-02 13:30:30 +0100]:\n\n> The ARCv2 ISA provides the JLI instruction, which is two-byte instructions\n> that can be used to reduce code size in an application. To make use of it,\n> we provide two new function attributes 'jli_always' and 'jli_fixed' which\n> will force the compiler to call the indicated function using a jli_s\n> instruction. The compiler also generates the entries in the JLI table for\n> the case when we use 'jli_always' attribute. In the case of 'jli_fixed'\n> the compiler assumes a fixed position of the function into JLI\n> table. Thus, the user needs to provide an assembly file with the JLI table\n> for the final link. This is usefully when we want to have a table in ROM\n> and a second table in the RAM memory.\n> \n> The jli instruction usage can be also forced without the need to annotate\n> the source code via '-mjli-always' command.\n> \n> gcc/\n> 2017-02-10  Claudiu Zissulescu  <claziss@synopsys.com>\n> \t    John Eric Martin <John.Martin@emmicro-us.com>\n> \n> \t* config/arc/arc-protos.h: Add arc_is_jli_call_p proto.\n> \t* config/arc/arc.c (_arc_jli_section): New struct.\n> \t(arc_jli_section): New type.\n> \t(rc_jli_sections): New static variable.\n> \t(arc_handle_jli_attribute): New function.\n> \t(arc_attribute_table): Add jli_always and jli_fixed attribute.\n> \t(arc_file_end): New function.\n> \t(TARGET_ASM_FILE_END): Define.\n> \t(arc_print_operand): Reuse 'S' letter for JLI output instruction.\n> \t(arc_add_jli_section): New function.\n> \t(jli_call_scan): Likewise.\n> \t(arc_reorg): Call jli_call_scan.\n> \t(arc_output_addsi): Remove 'S' from printing asm operand.\n> \t(arc_is_jli_call_p): New function.\n> \t* config/arc/arc.md (movqi_insn): Remove 'S' from printing asm\n> \toperand.\n> \t(movhi_insn): Likewise.\n> \t(movsi_insn): Likewise.\n> \t(movsi_set_cc_insn): Likewise.\n> \t(loadqi_update): Likewise.\n> \t(load_zeroextendqisi_update): Likewise.\n> \t(load_signextendqisi_update): Likewise.\n> \t(loadhi_update): Likewise.\n> \t(load_zeroextendhisi_update): Likewise.\n> \t(load_signextendhisi_update): Likewise.\n> \t(loadsi_update): Likewise.\n> \t(loadsf_update): Likewise.\n> \t(movsicc_insn): Likewise.\n> \t(bset_insn): Likewise.\n> \t(bxor_insn): Likewise.\n> \t(bclr_insn): Likewise.\n> \t(bmsk_insn): Likewise.\n> \t(bicsi3_insn): Likewise.\n> \t(cmpsi_cc_c_insn): Likewise.\n> \t(movsi_ne): Likewise.\n> \t(movsi_cond_exec): Likewise.\n> \t(clrsbsi2): Likewise.\n> \t(norm_f): Likewise.\n> \t(normw): Likewise.\n> \t(swap): Likewise.\n> \t(divaw): Likewise.\n> \t(flag): Likewise.\n> \t(sr): Likewise.\n> \t(kflag): Likewise.\n> \t(ffs): Likewise.\n> \t(ffs_f): Likewise.\n> \t(fls): Likewise.\n> \t(call_i): Remove 'S' asm letter, add jli instruction.\n> \t(call_value_i): Likewise.\n> \t* config/arc/arc.op (mjli-always): New option.\n> \t* config/arc/constraints.md (Cji): New constraint.\n> \t* config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm\n> \toperand.\n> \t(subsf3_fpx): Likewise.\n> \t(mulsf3_fpx): Likewise.\n> \t* config/arc/simdext.md (vendrec_insn): Remove 'S' from printing\n> \tasm operand.\n> \t* doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'\n> \tfunction attrbutes.\n> \t* doc/invoke.texi (ARC): Document mjli-always option.\n> \n> gcc/testsuite\n> 2017-02-10  Claudiu Zissulescu  <claziss@synopsys.com>\n> \n> \t* gcc.target/arc/jli-1.c: New file.\n> \t* gcc.target/arc/jli-2.c: Likewise.\n\nThis looks fine, but I wonder if there should be some documentation\nthat mentions the new .jlitab section added?\n\nThere's one whitespace issue I also spotted...\n\n> @@ -5026,6 +5062,36 @@ static void arc_file_start (void)\n>    fprintf (asm_out_file, \"\\t.cpu %s\\n\", arc_cpu_string);\n>  }\n>  \n> +/* Implement `TARGET_ASM_FILE_END'.  */\n> +/* Outputs to the stdio stream FILE jli related text.  */\n> +\n> +void arc_file_end (void)\n> +{\n> +  arc_jli_section *sec = arc_jli_sections;\n> +\n> +  while (sec != NULL)\n> +  {\n\nI think the '{' is not indented correctly.\n\nThanks,\nAndrew","headers":{"Return-Path":"<gcc-patches-return-471348-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-471348-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"poquxq8w\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3zLR751y8Gz9s7v\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 16 Jan 2018 21:20:16 +1100 (AEDT)","(qmail 81402 invoked by alias); 16 Jan 2018 10:20:09 -0000","(qmail 81380 invoked by uid 89); 16 Jan 2018 10:20:08 -0000","from mail-wr0-f170.google.com (HELO mail-wr0-f170.google.com)\n\t(209.85.128.170) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 16 Jan 2018 10:19:58 +0000","by mail-wr0-f170.google.com with SMTP id 16so14595991wry.12 for\n\t<gcc-patches@gcc.gnu.org>; Tue, 16 Jan 2018 02:19:57 -0800 (PST)","from localhost ([194.153.2.136]) by smtp.gmail.com with ESMTPSA id\n\tv72sm2133513wmd.12.2018.01.16.02.19.54 (version=TLS1_2\n\tcipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 16 Jan 2018 02:19:55 -0800 (PST)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:references:mime-version\n\t:content-type:in-reply-to; q=dns; s=default; b=YmlAKShOdL1AT/eXZ\n\tbzo4QjGyDH1nKzu0nAEaxkK/qw6Hk1WB0aTP25WX/6CnsR2coTOYjOmPwDQPJmNB\n\t7IUY6guzPQwK5TA19a+WuxOcTbiwe1AIbb/fnICU4PkZ9+YuiW1POFg8hz8nwEnc\n\tFdjqVNr41ch6UWrp9SNkmrIwms=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:references:mime-version\n\t:content-type:in-reply-to; s=default; bh=OrR4n+KVhlScncsSMEBj9hg\n\tznHI=; b=poquxq8wxaxJE+cPnk/76odg6Mek/l8IBw/WNc8fNWCKqpJ7CwJvWYg\n\tgvY8KY1plHHIFbjBteUBfJhKZK9EWIiDpH0PS0+oGR2fO+4JViTzONrNLSu/6Q5I\n\tqIhJQ7VotyZcm72592LsAJz1oQgWZatNBdb+vfnoaN+K+m53t+7o=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-1.9 required=5.0 tests=AWL, BAYES_00,\n\tRCVD_IN_DNSWL_NONE,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=mentions","X-HELO":"mail-wr0-f170.google.com","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=pKGfXM/0S1CrjevU+3ciHppuynvdIbX6rwZYAeiQ3Zk=;\n\tb=azK5I34NhWLFYE77YYnqJoTveqwcipjmFqe3ChEipEJP1ZF11N/TRNnrbZtdvvFyv7\n\tW1bexAHYhqlTMac+toFZ1WkaBSU02TdDxasTotFmgPQedYVGXKcyXVoumRo+8tC3420f\n\t1bGyqDU3UEBLCySB74NsUjdj7dWkKkDpZbsTeJ6zxrj2Ubz94Xnfcu6yDaKJyLvFESfk\n\tixyHLWgBF48/6WbpiXj12mcH3jCccK6OPsbxU179iWilnIUA3RXuXLI5whdzonPbJcMV\n\tdqWK8AFcKge15CuMCf2jVhLrZ60E2EDRlrl60B/wJ4bHpeGFfve40KOmryinncXdQV3D\n\tzVOw==","X-Gm-Message-State":"AKwxytfzNm5WPekQK5Ao2x3Hvd1ZbFpgQ9vduuO5ncPemagiVg9DpYjr\tAwMmebycwk4mUV5u0roaaYokFhLx","X-Google-Smtp-Source":"ACJfBouB2ZbIevruRBhMkCTki8BbY07Qde6FF+JX8HuQYTmpqugTUdhGppckZypacZKhmK4CAY/KvQ==","X-Received":"by 10.223.208.201 with SMTP id z9mr16910690wrh.194.1516097995909;\n\tTue, 16 Jan 2018 02:19:55 -0800 (PST)","Date":"Tue, 16 Jan 2018 10:19:54 +0000","From":"Andrew Burgess <andrew.burgess@embecosm.com>","To":"Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>","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>\n\t<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"}}]