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.
Tested on powerpc64-linux {-m32,-m64}. Committing to trunk. Segher 2018-10-19 Segher Boessenkool <seg...@kernel.crashing.org> * config/rs6000/rs6000.md (*call_indirect_aix<mode>, *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>, *call_value_indirect_elfv2<mode>): Add correct mode to the unspec. --- gcc/config/rs6000/rs6000.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index a47f746..5ef7f6b 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -11165,7 +11165,7 @@ (define_insn "*call_indirect_aix<mode>" [(call (mem:SI (match_operand:P 0 "register_operand" "c,*l")) (match_operand 1 "" "g,g")) (use (match_operand:P 2 "memory_operand" "<ptrm>,<ptrm>")) - (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" "<ptrload> 2,%2\;b%T0l\;<ptrload> 2,%3(1)" @@ -11177,7 +11177,7 @@ (define_insn "*call_value_indirect_aix<mode>" (call (mem:SI (match_operand:P 1 "register_operand" "c,*l")) (match_operand 2 "" "g,g"))) (use (match_operand:P 3 "memory_operand" "<ptrm>,<ptrm>")) - (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" "<ptrload> 2,%3\;b%T1l\;<ptrload> 2,%4(1)" @@ -11191,7 +11191,7 @@ (define_insn "*call_value_indirect_aix<mode>" (define_insn "*call_indirect_elfv2<mode>" [(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\;<ptrload> 2,%2(1)" @@ -11202,7 +11202,7 @@ (define_insn "*call_value_indirect_elfv2<mode>" [(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\;<ptrload> 2,%3(1)" -- 1.8.3.1