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.
Date: Tue, 16 Jan 2018 10:20:00 -0000 [thread overview]
Message-ID: <20180116101953.GH2676@embecosm.com> (raw)
In-Reply-To: <1509625835-22344-2-git-send-email-claziss@synopsys.com>
* Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com> [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 <claziss@synopsys.com>
> John Eric Martin <John.Martin@emmicro-us.com>
>
> * 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 <claziss@synopsys.com>
>
> * 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
next prev parent reply other threads:[~2018-01-16 10:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 12:34 [PATCH 0/6] [ARC] New baremetal features and fixes Claudiu Zissulescu
2017-11-02 12:34 ` [PATCH 4/6] [ARC] Rework delegitimate_address hook Claudiu Zissulescu
2018-01-23 23:07 ` Andrew Burgess
2017-11-02 12:34 ` [PATCH 1/6] [ARC] Add JLI support Claudiu Zissulescu
2018-01-16 10:20 ` Andrew Burgess [this message]
2017-11-02 12:34 ` [PATCH 6/6] [ARC] Add 'aux' variable attribute Claudiu Zissulescu
2018-01-29 20:28 ` Andrew Burgess
2017-11-02 12:34 ` [PATCH 5/6] [ARC] Add 'uncached' attribute Claudiu Zissulescu
2017-11-03 2:26 ` Sandra Loosemore
2017-11-03 11:24 ` Claudiu Zissulescu
2017-11-03 18:55 ` Sandra Loosemore
2017-11-09 9:13 ` Claudiu Zissulescu
2018-01-29 20:23 ` Andrew Burgess
2017-11-02 12:34 ` [PATCH 2/6] [ARC] Add SJLI support Claudiu Zissulescu
2018-01-16 10:37 ` Andrew Burgess
2017-11-02 12:34 ` [PATCH 3/6] [ARC] Add support for "register file 16" reduced register set Claudiu Zissulescu
2018-01-16 10:52 ` Andrew Burgess
2018-02-01 10:10 ` [PATCH 0/6] [ARC] New baremetal features and fixes Claudiu Zissulescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180116101953.GH2676@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=Claudiu.Zissulescu@synopsys.com \
--cc=Francois.Bedard@synopsys.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).