Message ID | 5633EC2B.3090405@acm.org |
---|---|
State | New |
Headers | show |
On 10/30/15 15:16, Nathan Sidwell wrote: > > Testing attached ... ... with parens on void cast args ... nathan
On 10/30/2015 04:16 PM, Nathan Sidwell wrote: > 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 ... It's only fatal with -Wjumble-mumble that gets set by config-list.mk, so it could have been easily sneaking by. Certainly wouldn't affect the correctness of the compiler though. > >> 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. I find myself wondering if that ought to be explicitly sanity-checked somewhere. I'm sure there's a significant number of invariants for ports that we could check at build time and hopefully prevent problems of this nature in the future. Though it may not be worth it.. > Testing attached ... Cool. I'll go ahead and add nvptx-elf to the list shortly on the assumption this stuff will get fixed on way or another. Jeff
2015-10-30 Jeff Law <jeff@redhat.com> Nathan Sidwell <nathan@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