aboutsummaryrefslogtreecommitdiff
path: root/gcc/defaults.h
diff options
context:
space:
mode:
authorAlex Coplan <alex.coplan@arm.com>2023-11-01 17:42:34 +0000
committerAlex Coplan <alex.coplan@arm.com>2023-12-15 19:59:59 +0000
commitfcdd2757c76bf925115b8e1ba4318d6366dd6f09 (patch)
treede10d44f1e9e1c39ecaa6631e217de5abe5de718 /gcc/defaults.h
parentb73a685ebf498af62f6a8743303c20fcdee827a1 (diff)
downloadgcc-fcdd2757c76bf925115b8e1ba4318d6366dd6f09.zip
gcc-fcdd2757c76bf925115b8e1ba4318d6366dd6f09.tar.gz
gcc-fcdd2757c76bf925115b8e1ba4318d6366dd6f09.tar.bz2
aarch64: Generalize writeback ldp/stp patterns
Thus far the writeback forms of ldp/stp have been exclusively used in prologue and epilogue code for saving/restoring of registers to/from the stack. As such, forms of ldp/stp that weren't needed for prologue/epilogue code weren't supported by the aarch64 backend. This patch generalizes the load/store pair writeback patterns to allow: - Base registers other than the stack pointer. - Modes that weren't previously supported. - Combinations of distinct modes provided they have the same size. - Pre/post variants that weren't previously needed in prologue/epilogue code. We make quite some effort to avoid a combinatorial explosion in the number of patterns generated (and those in the source) by making extensive use of special predicates. An updated version of the upcoming ldp/stp pass can generate the writeback forms, so this patch is motivated by that. This patch doesn't add zero-extending or sign-extending forms of the writeback patterns; that is left for future work. gcc/ChangeLog: * config/aarch64/aarch64-protos.h (aarch64_ldpstp_operand_mode_p): Declare. * config/aarch64/aarch64.cc (aarch64_gen_storewb_pair): Build RTL directly instead of invoking named pattern. (aarch64_gen_loadwb_pair): Likewise. (aarch64_ldpstp_operand_mode_p): New. * config/aarch64/aarch64.md (loadwb_pair<GPI:mode>_<P:mode>): Replace with ... (*loadwb_post_pair_<ldst_sz>): ... this. Generalize as described in cover letter. (loadwb_pair<GPF:mode>_<P:mode>): Delete (superseded by the above). (*loadwb_post_pair_16): New. (*loadwb_pre_pair_<ldst_sz>): New. (loadwb_pair<TX:mode>_<P:mode>): Delete. (*loadwb_pre_pair_16): New. (storewb_pair<GPI:mode>_<P:mode>): Replace with ... (*storewb_pre_pair_<ldst_sz>): ... this. Generalize as described in cover letter. (*storewb_pre_pair_16): New. (storewb_pair<GPF:mode>_<P:mode>): Delete. (*storewb_post_pair_<ldst_sz>): New. (storewb_pair<TX:mode>_<P:mode>): Delete. (*storewb_post_pair_16): New. * config/aarch64/predicates.md (aarch64_mem_pair_operator): New. (pmode_plus_operator): New. (aarch64_ldp_reg_operand): New. (aarch64_stp_reg_operand): New.
Diffstat (limited to 'gcc/defaults.h')
0 files changed, 0 insertions, 0 deletions