From d8198d1cd0f0849d5ba070d70b672ed869eead4a Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Thu, 19 Oct 2017 12:55:51 +0200 Subject: [PATCH] rs6000: Fix "missing mode" on UNSPEC_TOCSLOT Currently gen* warn about a missing mode on an UNSPEC_TOCSLOT unspec in some call patterns. Those unspecs are created from rs6000.c, with Pmode always. This patch fixes the patterns to say :P as well. * config/rs6000/rs6000.md (*call_indirect_aix, *call_value_indirect_aix, *call_indirect_elfv2, *call_value_indirect_elfv2): Add correct mode to the unspec. From-SVN: r253885 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/rs6000.md | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b7f4e4e071c..189fe05afab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-10-19 Segher Boessenkool + + * config/rs6000/rs6000.md (*call_indirect_aix, + *call_value_indirect_aix, *call_indirect_elfv2, + *call_value_indirect_elfv2): Add correct mode to the unspec. + 2017-10-19 Jakub Jelinek PR target/82580 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index aad382ced33..62bd19b19c5 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -11157,7 +11157,7 @@ [(call (mem:SI (match_operand:P 0 "register_operand" "c,*l")) (match_operand 1 "" "g,g")) (use (match_operand:P 2 "memory_operand" ",")) - (set (reg:P TOC_REGNUM) (unspec [(match_operand:P 3 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) + (set (reg:P TOC_REGNUM) (unspec:P [(match_operand:P 3 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) (clobber (reg:P LR_REGNO))] "DEFAULT_ABI == ABI_AIX" " 2,%2\;b%T0l\; 2,%3(1)" @@ -11169,7 +11169,7 @@ (call (mem:SI (match_operand:P 1 "register_operand" "c,*l")) (match_operand 2 "" "g,g"))) (use (match_operand:P 3 "memory_operand" ",")) - (set (reg:P TOC_REGNUM) (unspec [(match_operand:P 4 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) + (set (reg:P TOC_REGNUM) (unspec:P [(match_operand:P 4 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) (clobber (reg:P LR_REGNO))] "DEFAULT_ABI == ABI_AIX" " 2,%3\;b%T1l\; 2,%4(1)" @@ -11183,7 +11183,7 @@ (define_insn "*call_indirect_elfv2" [(call (mem:SI (match_operand:P 0 "register_operand" "c,*l")) (match_operand 1 "" "g,g")) - (set (reg:P TOC_REGNUM) (unspec [(match_operand:P 2 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) + (set (reg:P TOC_REGNUM) (unspec:P [(match_operand:P 2 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) (clobber (reg:P LR_REGNO))] "DEFAULT_ABI == ABI_ELFv2" "b%T0l\; 2,%2(1)" @@ -11194,7 +11194,7 @@ [(set (match_operand 0 "" "") (call (mem:SI (match_operand:P 1 "register_operand" "c,*l")) (match_operand 2 "" "g,g"))) - (set (reg:P TOC_REGNUM) (unspec [(match_operand:P 3 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) + (set (reg:P TOC_REGNUM) (unspec:P [(match_operand:P 3 "const_int_operand" "n,n")] UNSPEC_TOCSLOT)) (clobber (reg:P LR_REGNO))] "DEFAULT_ABI == ABI_ELFv2" "b%T1l\; 2,%3(1)" -- 2.30.2