[ARC] Cleanup sdata handling.
authorClaudiu Zissulescu <claziss@synopsys.com>
Mon, 30 Apr 2018 13:16:09 +0000 (15:16 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Mon, 30 Apr 2018 13:16:09 +0000 (15:16 +0200)
commite0be3321b908443c46b69c888c53b3fddc4cf797
treeefe97a809fcb332422a5d15837c252edd6b2f9b0
parent2295aa75224be0b765cf5c58865e97d094990579
[ARC] Cleanup sdata handling.

Clean up how we handle small data load/store operations.

gcc/
2018-01-18  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc-protos.h (prepare_extend_operands): Remove.
(small_data_pattern): Likewise.
(arc_rewrite_small_data): Likewise.
* config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
(LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
(get_symbol_alignment): New function.
(legitimate_small_data_address_p): Likewise.
(legitimate_scaled_address): Update, call
legitimate_small_data_address_p.
(output_sdata): New static variable.
(arc_print_operand): Update how we handle small data operands.
(arc_print_operand_address): Likewise.
(arc_legitimate_address_p): Update, use
legitimate_small_data_address_p.
(arc_rewrite_small_data_p): Remove.
(arc_rewrite_small_data_1): Likewise.
(arc_rewrite_small_data): Likewise.
(small_data_pattern): Likewise.
(compact_sda_memory_operand): Update to use
legitimate_small_data_address_p and get_symbol_alignment.
(prepare_move_operands): Don't rewite sdata pattern.
(prepare_extend_operands): Remove.
* config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
pattern.
(zero_extendqisi2): Likewise.
(zero_extendhisi2): Likewise.
(extendqihi2): Likewise.
(extendqisi2): Likewise.
(extendhisi2): Likewise.
(addsi3): Likewise.
(subsi3): Likewise.
(andsi3): Likewise.
* config/arc/constraints.md (Usd): Change it to memory constraint.

gcc/testsuite
2018-01-18  Claudiu Zissulescu  <claziss@synopsys.com>

* gcc.target/arc/interrupt-8.c: Update test.
* gcc.target/arc/loop-4.c: Likewise.
* gcc.target/arc/loop-hazard-1.c: Likewise.
* gcc.target/arc/sdata-3.c: Likewise.

From-SVN: r259763
gcc/ChangeLog
gcc/config/arc/arc-protos.h
gcc/config/arc/arc.c
gcc/config/arc/arc.md
gcc/config/arc/constraints.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arc/interrupt-8.c
gcc/testsuite/gcc.target/arc/loop-4.c
gcc/testsuite/gcc.target/arc/loop-hazard-1.c
gcc/testsuite/gcc.target/arc/sdata-3.c