diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2018-06-13 10:43:56 +0200 |
---|---|---|
committer | Claudiu Zissulescu <claziss@gcc.gnu.org> | 2018-06-13 10:43:56 +0200 |
commit | 16493b5771cf3b1670a4a9bf7c7426fd74b727d0 (patch) | |
tree | e980080e39e343317abe7dc492173a7cc68e3e56 /gcc/config/arc/arc-protos.h | |
parent | 60a3f6590618c8fa74ddc54d3232d57b2908765d (diff) | |
download | gcc-16493b5771cf3b1670a4a9bf7c7426fd74b727d0.zip gcc-16493b5771cf3b1670a4a9bf7c7426fd74b727d0.tar.gz gcc-16493b5771cf3b1670a4a9bf7c7426fd74b727d0.tar.bz2 |
[ARC] Reimplement return padding operation for ARC700.
For ARC700, adding padding if necessary to avoid a mispredict. A
return could happen immediately after the function start. A
call/return and return/return must be 6 bytes apart to avoid
mispredict.
The old implementation was doing this operation very late in the
compilation process, and the additional nop instructions and/or
forcing some other instruction to take their long form was not taken
into account when generating brcc instructions. Thus, wrong code could
be generated.
gcc/
2017-03-24 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (arc_pad_return): Remove.
* config/arc/arc.c (machine_function): Remove force_short_suffix
and size_reason.
(arc_print_operand): Adjust printing of '&'.
(arc_verify_short): Remove conditional printing of short suffix.
(arc_final_prescan_insn): Remove reference to size_reason.
(pad_return): New function.
(arc_reorg): Call pad_return.
(arc_pad_return): Remove.
(arc_init_machine_status): Remove reference to force_short_suffix.
* config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
(attr length): When attribute iscompact is true force to 2
regardless; in the case of maybe check if we want to force the
instruction to have 4 bytes length.
(nopv): Change it to generate 4 byte long nop as well.
(blockage): New pattern.
(simple_return): Remove call to arc_pad_return.
(p_return_i): Likewise.
gcc/testsuite/
2017-03-24 Claudiu Zissulescu <claziss@synopsys.com>
* gcc.target/arc/pr9001107555.c: New file.
From-SVN: r261542
Diffstat (limited to 'gcc/config/arc/arc-protos.h')
-rw-r--r-- | gcc/config/arc/arc-protos.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h index 67f3b4e..ce4b6f8 100644 --- a/gcc/config/arc/arc-protos.h +++ b/gcc/config/arc/arc-protos.h @@ -89,7 +89,6 @@ extern void arc_clear_unalign (void); extern void arc_toggle_unalign (void); extern void split_addsi (rtx *); extern void split_subsi (rtx *); -extern void arc_pad_return (void); extern void arc_split_move (rtx *); extern const char *arc_short_long (rtx_insn *insn, const char *, const char *); extern rtx arc_regno_use_in (unsigned int, rtx); |