[ARC] Improves and fixes for small data support.
authorClaudiu Zissulescu <claziss@synopsys.com>
Thu, 31 Aug 2017 13:52:31 +0000 (15:52 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Thu, 31 Aug 2017 13:52:31 +0000 (15:52 +0200)
commitb6fb793374fd887aee2b08b44145961b28533be2
tree79bcd5b426f24fa391f4e3f8e998c334ea950953
parenta621861e39a42ee8b770d660b36041f2ac8bc4a4
[ARC] Improves and fixes for small data support.

Add alignment check for short load/store instructions used for sdata,
as they request 32-bit aligned short immediate.  Use sdata symbol
alignment information and emit scalled loads/stores whenever is
possible. The scalled address will extend the access range for sdata
symbols.  Allow 64-bit datum into small data section, if double
load/store instructions are present.

gcc/
2017-04-12  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc-protos.h (compact_sda_memory_operand): Update
prototype.
* config/arc/arc.c (arc_print_operand): Output scalled address for
sdata whenever is possible.
(arc_in_small_data_p): Allow sdata for 64bit datum when double
load/stores are available.
(compact_sda_memory_operand): Check for the alignment required by
code density instructions.
* config/arc/arc.md (movsi_insn): Use newly introduced Us0
constraint.
* config/arc/constraints.md (Usd): Update constraint.
(Us0): New constraint.
(Usc): Update constraint.

gcc/testsuite/
2017-04-12  Claudiu Zissulescu  <claziss@synopsys.com>

* gcc.target/arc/sdata-3.c: New file.

From-SVN: r251562
gcc/ChangeLog
gcc/config/arc/arc-protos.h
gcc/config/arc/arc.c
gcc/config/arc/constraints.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arc/sdata-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arc/sdata-4.c [new file with mode: 0644]