diff options
author | Sebastian Perta <sebastian.perta@renesas.com> | 2018-01-22 19:53:55 +0000 |
---|---|---|
committer | Sebastian Perta <sebastianperta@gcc.gnu.org> | 2018-01-22 19:53:55 +0000 |
commit | 10cd6ec51a5153ca92d2912d2611d4038374626e (patch) | |
tree | 68df157eadd6ca4f3ca47f13ff40b12000f43f1c /gcc | |
parent | de0ecff83d8639cfa0075fab7a5f9a42657dd94e (diff) | |
download | gcc-10cd6ec51a5153ca92d2912d2611d4038374626e.zip gcc-10cd6ec51a5153ca92d2912d2611d4038374626e.tar.gz gcc-10cd6ec51a5153ca92d2912d2611d4038374626e.tar.bz2 |
rl78-protos.h: New function declaration rl78_split_movdi
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78-protos.h: New function declaration rl78_split_movdi
* config/rl78/rl78.md: New define_expand "movdi"
* config/rl78/rl78.c: New function definition rl78_split_movdi
From-SVN: r256960
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rl78/rl78-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/rl78/rl78.c | 12 | ||||
-rw-r--r-- | gcc/config/rl78/rl78.md | 8 |
4 files changed, 27 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bfcf4da..c565758 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> + + * config/rl78/rl78-protos.h: New function declaration rl78_split_movdi + * config/rl78/rl78.md: New define_expand "movdi" + * config/rl78/rl78.c: New function definition rl78_split_movdi + 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/83862 diff --git a/gcc/config/rl78/rl78-protos.h b/gcc/config/rl78/rl78-protos.h index 852190f..a599e7e 100644 --- a/gcc/config/rl78/rl78-protos.h +++ b/gcc/config/rl78/rl78-protos.h @@ -23,6 +23,7 @@ void rl78_emit_eh_epilogue (rtx); void rl78_expand_compare (rtx *); void rl78_expand_movsi (rtx *); void rl78_split_movsi (rtx *, machine_mode); +void rl78_split_movdi (rtx *, enum machine_mode); int rl78_force_nonfar_2 (rtx *, rtx (*gen)(rtx,rtx)); int rl78_force_nonfar_3 (rtx *, rtx (*gen)(rtx,rtx,rtx)); void rl78_expand_eh_epilogue (rtx); diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index 3e34a88..6f2551c 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -598,6 +598,18 @@ rl78_split_movsi (rtx *operands, machine_mode omode) } } +void +rl78_split_movdi (rtx *operands, enum machine_mode omode) +{ + rtx op00, op04, op10, op14; + op00 = rl78_subreg (SImode, operands[0], omode, 0); + op04 = rl78_subreg (SImode, operands[0], omode, 4); + op10 = rl78_subreg (SImode, operands[1], omode, 0); + op14 = rl78_subreg (SImode, operands[1], omode, 4); + emit_insn (gen_movsi (op00, op10)); + emit_insn (gen_movsi (op04, op14)); +} + /* Used by various two-operand expanders which cannot accept all operands in the "far" namespace. Force some such operands into registers so that each pattern has at most one far operand. */ diff --git a/gcc/config/rl78/rl78.md b/gcc/config/rl78/rl78.md index 1c44e87..2b39b46 100644 --- a/gcc/config/rl78/rl78.md +++ b/gcc/config/rl78/rl78.md @@ -719,6 +719,14 @@ (set_attr "is_g13_muldiv_insn" "yes")] ) +(define_expand "movdi" + [(set (match_operand:DI 0 "nonimmediate_operand" "") + (match_operand:DI 1 "general_operand" ""))] + "" + "rl78_split_movdi(operands, DImode); + DONE;" +) + (define_expand "umindi3" [(set (match_operand:DI 0 "nonimmediate_operand" "") (umin:DI (match_operand:DI 1 "general_operand" "") |