diff mbox

Rs6000 infrastructure cleanup (switches), revised patch #2c

Message ID 20121009225830.GA22469@ibm-tiger.the-meissners.org
State New
Headers show

Commit Message

Michael Meissner Oct. 9, 2012, 10:58 p.m. UTC
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  <meissner@linux.vnet.ibm.com>

	* 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.

Comments

David Edelsohn Oct. 10, 2012, 1:16 a.m. UTC | #1
On Tue, Oct 9, 2012 at 6:58 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> 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  <meissner@linux.vnet.ibm.com>
>
>         * 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.

This patch is okay.

Thanks, David
diff mbox

Patch

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;