From patchwork Tue Oct 9 22:58:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Rs6000 infrastructure cleanup (switches), revised patch #2c Date: Tue, 09 Oct 2012 12:58:30 -0000 From: Michael Meissner X-Patchwork-Id: 190509 Message-Id: <20121009225830.GA22469@ibm-tiger.the-meissners.org> To: Michael Meissner , David Edelsohn , gcc-patches@gcc.gnu.org, bergner@vnet.ibm.com, segher@kernel.crashing.org, iain@codesourcery.com, andreast-list@fgznet.ch Ok, David preferred the 2 series of patches which replace all of the flags in target_flags to rs6000_isa_flags to the 3 series of patches, which started over, and added a new flag word, but did not change the existing options. In an effort to simplify the main patch, I'm going to push out some of the patches that are standalone. This patch fixes the 3 signed/unsigned warnings that were caused by comparing an integer type with an enumeration. I did bootstap and make check with no regressions. Is it ok to install (it is probably ok under the obvious rule)? 2012-10-09 Michael Meissner * config/rs6000/rs6000.c (altivec_expand_dst_builtin): Fix signed vs. unsigned warnings by using enum type for function code. (paired_expand_builtin): Likewise. (spe_expand_builtin): Likewise. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 192265) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -10442,7 +10442,7 @@ altivec_expand_dst_builtin (tree exp, rt bool *expandedp) { tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0); - unsigned int fcode = DECL_FUNCTION_CODE (fndecl); + enum rs6000_builtins fcode = (enum rs6000_builtins) DECL_FUNCTION_CODE (fndecl); tree arg0, arg1, arg2; enum machine_mode mode0, mode1; rtx pat, op0, op1, op2; @@ -10844,7 +10844,7 @@ static rtx paired_expand_builtin (tree exp, rtx target, bool * expandedp) { tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0); - unsigned int fcode = DECL_FUNCTION_CODE (fndecl); + enum rs6000_builtins fcode = (enum rs6000_builtins) DECL_FUNCTION_CODE (fndecl); const struct builtin_description *d; size_t i; @@ -10909,7 +10909,7 @@ spe_expand_builtin (tree exp, rtx target { tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0); tree arg1, arg0; - unsigned int fcode = DECL_FUNCTION_CODE (fndecl); + enum rs6000_builtins fcode = (enum rs6000_builtins) DECL_FUNCTION_CODE (fndecl); enum insn_code icode; enum machine_mode tmode, mode0; rtx pat, op0;