]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pru: Use unsigned constants for register classes
authorDimitar Dimitrov <dimitar@dinux.eu>
Sun, 9 Nov 2025 15:45:14 +0000 (17:45 +0200)
committerDimitar Dimitrov <dimitar@dinux.eu>
Mon, 10 Nov 2025 17:24:31 +0000 (19:24 +0200)
Fix the following warning:

  .../gcc/gcc/config/pru/pru.h:249:43: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ [-Wnarrowing]
    249 |     /* ALL_REGS       */ { ~0,~0, ~0, ~0, ~0}                   \

gcc/ChangeLog:

* config/pru/pru.h (REG_CLASS_CONTENTS): Use unsigned integer
constants.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
gcc/config/pru/pru.h

index 9d547ed3bad0a223761ac28d3f5c3230ab7c2f98..967bb79433a707a7d905c43fcb85f161adad46b3 100644 (file)
@@ -239,14 +239,14 @@ enum reg_class
 #define REG_CLASS_CONTENTS                                     \
   {                                                            \
     /* NO_REGS       */ { 0, 0, 0, 0, 0},                      \
-    /* SIB_REGS              */ { 0xf, 0xff000000, ~0, 0xffffff, 0},   \
+    /* SIB_REGS              */ { 0xf, 0xff000000u, ~0u, 0xffffffu, 0},\
     /* LOOPCNTR_REGS  */ { 0, 0, 0, 0, 0xf},                   \
-    /* MULDST_REGS    */ { 0, 0, 0, 0x00000f00, 0},            \
-    /* MULSRC0_REGS   */ { 0, 0, 0, 0x000f0000, 0},            \
-    /* MULSRC1_REGS   */ { 0, 0, 0, 0x00f00000, 0},            \
-    /* REGIO_REGS     */ { 0, 0, 0, 0xff000000, 0},            \
-    /* GP_REGS       */ { ~0, ~0, ~0, ~0, 0},                  \
-    /* ALL_REGS              */ { ~0,~0, ~0, ~0, ~0}                   \
+    /* MULDST_REGS    */ { 0, 0, 0, 0x00000f00u, 0},           \
+    /* MULSRC0_REGS   */ { 0, 0, 0, 0x000f0000u, 0},           \
+    /* MULSRC1_REGS   */ { 0, 0, 0, 0x00f00000u, 0},           \
+    /* REGIO_REGS     */ { 0, 0, 0, 0xff000000u, 0},           \
+    /* GP_REGS       */ { ~0u, ~0u, ~0u, ~0u, 0},              \
+    /* ALL_REGS              */ { ~0u, ~0u, ~0u, ~0u, ~0u}             \
   }