On 10/30/15 14:28, Jeff Law wrote:

So when we don't use src_reg or dst_mode, we'll get a warning about the unused
variable. I guess this is the first port where HARD_REGNO_NREGS is a constant.

Yeah, I noticed that when first lookingat the port, but as it wasn't (apparently) broken ...

Second, MOVE_MAX is 4.  That's causing out-of-bounds array access warnings in
various places.

There were a variety of other problems associated with MOVE_MAX being smaller
than a word.   If I change MOVE_MAX to 8, then everything is good.

Makes sense.


Testing attached ...

nathan
2015-10-30  Jeff Law <j...@redhat.com>
	    Nathan Sidwell  <nat...@acm.org>

	* config/nvptx/nvptx.h (HARD_REGNO_NREGS): Avoid warning on unused
	args.
	(MOVE_MAX): Set to 8.

Index: config/nvptx/nvptx.h
===================================================================
--- config/nvptx/nvptx.h	(revision 229595)
+++ config/nvptx/nvptx.h	(working copy)
@@ -88,7 +88,7 @@
 #define CALL_USED_REGISTERS				\
   { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
 
-#define HARD_REGNO_NREGS(regno, mode)	1
+#define HARD_REGNO_NREGS(regno, mode)	((void)regno, (void)mode, 1)
 #define CANNOT_CHANGE_MODE_CLASS(M1, M2, CLS) ((CLS) == RETURN_REG)
 #define HARD_REGNO_MODE_OK(REG, MODE) nvptx_hard_regno_mode_ok (REG, MODE)
 
@@ -356,7 +356,7 @@ struct GTY(()) machine_function
 #define FLOAT_STORE_FLAG_VALUE(MODE) REAL_VALUE_ATOF("1.0", (MODE))
 
 #define CASE_VECTOR_MODE SImode
-#define MOVE_MAX 4
+#define MOVE_MAX 8
 #define MOVE_RATIO(SPEED) 4
 #define TRULY_NOOP_TRUNCATION(outprec, inprec) 1
 #define FUNCTION_MODE QImode

Reply via email to