From: Segher Boessenkool Date: Thu, 1 Sep 2016 15:07:54 +0000 (+0200) Subject: rs6000: Use LR_REGNO directly in the save/restore patterns X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d87a85c67b9f4e424c9660753429e8252d265ee3;p=gcc.git rs6000: Use LR_REGNO directly in the save/restore patterns Various patterns use "register_operand" "l" (or "=l") although those patterns are only created refering to LR_REGNO directly. This patch changes those patterns to use the hard regs as well. * config/rs6000/rs6000.md (*restore_gpregs__r11, *restore_gpregs__r12, *restore_gpregs__r1, *return_and_restore_gpregs__r11, *return_and_restore_gpregs__r12, *return_and_restore_gpregs__r1, *return_and_restore_fpregs__r11, *return_and_restore_fpregs__r12, *return_and_restore_fpregs__r1): Use the hard register LR_REGNO directly instead of via the "l" constraint. Renumber operands. Fix whitespace. From-SVN: r239942 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 03f96f4d5fb..7d80216bc0e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2016-09-01 Segher Boessenkool + + * config/rs6000/rs6000.md (*restore_gpregs__r11, + *restore_gpregs__r12, *restore_gpregs__r1, + *return_and_restore_gpregs__r11, + *return_and_restore_gpregs__r12, + *return_and_restore_gpregs__r1, + *return_and_restore_fpregs__r11, + *return_and_restore_fpregs__r12, + *return_and_restore_fpregs__r1): Use the hard register LR_REGNO + directly instead of via the "l" constraint. Renumber operands. + Fix whitespace. + 2016-09-01 Segher Boessenkool * config/rs6000/altivec.md (*save_world, *save_vregs__r11, diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 1ecbb9d930c..7da4370242d 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -12620,115 +12620,115 @@ (define_insn "*restore_gpregs__r11" [(match_parallel 0 "any_parallel_operand" - [(clobber (match_operand:P 1 "register_operand" "=l")) - (use (match_operand:P 2 "symbol_ref_operand" "s")) - (use (reg:P 11)) - (set (match_operand:P 3 "gpc_reg_operand" "=r") - (match_operand:P 4 "memory_operand" "m"))])] + [(clobber (reg:P LR_REGNO)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (reg:P 11)) + (set (match_operand:P 2 "gpc_reg_operand" "=r") + (match_operand:P 3 "memory_operand" "m"))])] "" - "bl %2" + "bl %1" [(set_attr "type" "branch") (set_attr "length" "4")]) (define_insn "*restore_gpregs__r12" [(match_parallel 0 "any_parallel_operand" - [(clobber (match_operand:P 1 "register_operand" "=l")) - (use (match_operand:P 2 "symbol_ref_operand" "s")) - (use (reg:P 12)) - (set (match_operand:P 3 "gpc_reg_operand" "=r") - (match_operand:P 4 "memory_operand" "m"))])] + [(clobber (reg:P LR_REGNO)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (reg:P 12)) + (set (match_operand:P 2 "gpc_reg_operand" "=r") + (match_operand:P 3 "memory_operand" "m"))])] "" - "bl %2" + "bl %1" [(set_attr "type" "branch") (set_attr "length" "4")]) (define_insn "*restore_gpregs__r1" [(match_parallel 0 "any_parallel_operand" - [(clobber (match_operand:P 1 "register_operand" "=l")) - (use (match_operand:P 2 "symbol_ref_operand" "s")) - (use (reg:P 1)) - (set (match_operand:P 3 "gpc_reg_operand" "=r") - (match_operand:P 4 "memory_operand" "m"))])] + [(clobber (reg:P LR_REGNO)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (reg:P 1)) + (set (match_operand:P 2 "gpc_reg_operand" "=r") + (match_operand:P 3 "memory_operand" "m"))])] "" - "bl %2" + "bl %1" [(set_attr "type" "branch") (set_attr "length" "4")]) (define_insn "*return_and_restore_gpregs__r11" [(match_parallel 0 "any_parallel_operand" - [(return) - (clobber (match_operand:P 1 "register_operand" "=l")) - (use (match_operand:P 2 "symbol_ref_operand" "s")) - (use (reg:P 11)) - (set (match_operand:P 3 "gpc_reg_operand" "=r") - (match_operand:P 4 "memory_operand" "m"))])] + [(return) + (clobber (reg:P LR_REGNO)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (reg:P 11)) + (set (match_operand:P 2 "gpc_reg_operand" "=r") + (match_operand:P 3 "memory_operand" "m"))])] "" - "b %2" + "b %1" [(set_attr "type" "branch") (set_attr "length" "4")]) (define_insn "*return_and_restore_gpregs__r12" [(match_parallel 0 "any_parallel_operand" - [(return) - (clobber (match_operand:P 1 "register_operand" "=l")) - (use (match_operand:P 2 "symbol_ref_operand" "s")) - (use (reg:P 12)) - (set (match_operand:P 3 "gpc_reg_operand" "=r") - (match_operand:P 4 "memory_operand" "m"))])] + [(return) + (clobber (reg:P LR_REGNO)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (reg:P 12)) + (set (match_operand:P 2 "gpc_reg_operand" "=r") + (match_operand:P 3 "memory_operand" "m"))])] "" - "b %2" + "b %1" [(set_attr "type" "branch") (set_attr "length" "4")]) (define_insn "*return_and_restore_gpregs__r1" [(match_parallel 0 "any_parallel_operand" - [(return) - (clobber (match_operand:P 1 "register_operand" "=l")) - (use (match_operand:P 2 "symbol_ref_operand" "s")) - (use (reg:P 1)) - (set (match_operand:P 3 "gpc_reg_operand" "=r") - (match_operand:P 4 "memory_operand" "m"))])] + [(return) + (clobber (reg:P LR_REGNO)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (reg:P 1)) + (set (match_operand:P 2 "gpc_reg_operand" "=r") + (match_operand:P 3 "memory_operand" "m"))])] "" - "b %2" + "b %1" [(set_attr "type" "branch") (set_attr "length" "4")]) (define_insn "*return_and_restore_fpregs__r11" [(match_parallel 0 "any_parallel_operand" - [(return) - (clobber (match_operand:P 1 "register_operand" "=l")) - (use (match_operand:P 2 "symbol_ref_operand" "s")) - (use (reg:P 11)) - (set (match_operand:DF 3 "gpc_reg_operand" "=d") - (match_operand:DF 4 "memory_operand" "m"))])] + [(return) + (clobber (reg:P LR_REGNO)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (reg:P 11)) + (set (match_operand:DF 2 "gpc_reg_operand" "=d") + (match_operand:DF 3 "memory_operand" "m"))])] "" - "b %2" + "b %1" [(set_attr "type" "branch") (set_attr "length" "4")]) (define_insn "*return_and_restore_fpregs__r12" [(match_parallel 0 "any_parallel_operand" - [(return) - (clobber (match_operand:P 1 "register_operand" "=l")) - (use (match_operand:P 2 "symbol_ref_operand" "s")) - (use (reg:P 12)) - (set (match_operand:DF 3 "gpc_reg_operand" "=d") - (match_operand:DF 4 "memory_operand" "m"))])] + [(return) + (clobber (reg:P LR_REGNO)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (reg:P 12)) + (set (match_operand:DF 2 "gpc_reg_operand" "=d") + (match_operand:DF 3 "memory_operand" "m"))])] "" - "b %2" + "b %1" [(set_attr "type" "branch") (set_attr "length" "4")]) (define_insn "*return_and_restore_fpregs__r1" [(match_parallel 0 "any_parallel_operand" - [(return) - (clobber (match_operand:P 1 "register_operand" "=l")) - (use (match_operand:P 2 "symbol_ref_operand" "s")) - (use (reg:P 1)) - (set (match_operand:DF 3 "gpc_reg_operand" "=d") - (match_operand:DF 4 "memory_operand" "m"))])] + [(return) + (clobber (reg:P LR_REGNO)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (reg:P 1)) + (set (match_operand:DF 2 "gpc_reg_operand" "=d") + (match_operand:DF 3 "memory_operand" "m"))])] "" - "b %2" + "b %1" [(set_attr "type" "branch") (set_attr "length" "4")])