This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[buildrobot][patch] picochip: Fix int -> enum machine_mode fallout


Hi!

I propose the following patch to cure this:

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../../gcc/gcc -I../../../gcc/gcc/. -I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include -I/opt/cfarm/mpc/include  -I../../../gcc/gcc/../libdecnumber -I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../../gcc/gcc/../libbacktrace    -o picochip.o -MT picochip.o -MMD -MP -MF ./.deps/picochip.TPo ../../../gcc/gcc/config/picochip/picochip.c
In file included from ../../../gcc/gcc/rtl.h:24:0,
                 from ../../../gcc/gcc/config/picochip/picochip.c:27:
../../../gcc/gcc/config/picochip/picochip.c: In function âint picochip_regno_nregs(int, int)â:
../../../gcc/gcc/machmode.h:183:32: error: invalid conversion from âintâ to âmachine_modeâ [-fpermissive]
        ? mode_size_inline (MODE) : mode_size[MODE]))
                                ^
../../../gcc/gcc/config/picochip/picochip.c:1247:12: note: in expansion of macro âGET_MODE_SIZEâ
   return ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
            ^
../../../gcc/gcc/config/picochip/picochip.c: In function âint picochip_class_max_nregs(int, int)â:
../../../gcc/gcc/machmode.h:183:32: error: invalid conversion from âintâ to âmachine_modeâ [-fpermissive]
        ? mode_size_inline (MODE) : mode_size[MODE]))
                                ^
../../../gcc/gcc/config/picochip/picochip.c:1254:16: note: in expansion of macro âGET_MODE_SIZEâ
   int size = ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
                ^
make[2]: *** [picochip.o] Error 1




2014-05-04  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

gcc/
	* config/picochip/picochip-protos.h (picochip_regno_nregs): Change
	int argument to machine_mode.
	(picochip_class_max_nregs): Dito.
	* config/picochip/picochip.c (picochip_regno_nregs): Dito.
	(picochip_class_max_nregs): Dito.



diff --git a/gcc/config/picochip/picochip-protos.h b/gcc/config/picochip/picochip-protos.h
index 1f548f8..d161d0a 100644
--- a/gcc/config/picochip/picochip-protos.h
+++ b/gcc/config/picochip/picochip-protos.h
@@ -53,8 +53,8 @@ extern bool ok_to_peephole_ldw(rtx opnd0, rtx opnd1, rtx opnd2, rtx opnd3);
 
 extern rtx gen_min_reg(rtx opnd1,rtx opnd2);
 
-extern int picochip_regno_nregs (int regno, int mode);
-extern int picochip_class_max_nregs (int klass, int mode);
+extern int picochip_regno_nregs (int regno, enum machine_mode mode);
+extern int picochip_class_max_nregs (int klass, enum machine_mode mode);
 
 extern void picochip_order_regs_for_local_alloc (void);
 
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index 2476f73..5b0502f 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -1229,7 +1229,7 @@ picochip_arg_area_byte_offset (void)
 }
 
 int
-picochip_regno_nregs (int regno ATTRIBUTE_UNUSED, int mode)
+picochip_regno_nregs (int regno ATTRIBUTE_UNUSED, enum machine_mode mode)
 {
 
   /* Special case - only one register needed. */
@@ -1249,7 +1249,7 @@ picochip_regno_nregs (int regno ATTRIBUTE_UNUSED, int mode)
 }
 
 int
-picochip_class_max_nregs (int reg_class, int mode)
+picochip_class_max_nregs (int reg_class, enum machine_mode mode)
 {
   int size = ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
 




Ok?

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of: 17:45 <@Eimann> Hrm, das E90 hat keinen Lebenszeit Call-Time Counter mehr
the second  : 17:46 <@jbglaw> Eimann: WofÃr braucht man das?
              17:46 <@jbglaw> Eimann: FÃr mich ist an 'nem Handy wichtig, daà ich mein
                              GegeÃber hÃren kann. Und daà mein GegenÃber mich versteht...
              17:47 <@KrisK> jbglaw: was du meinst ist wodka.
              17:47 <@KrisK> jbglaw: es klingelt und man hÃrt stimmen

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]