]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
MIPS: Bugfix for fix Dejagnu issues with RTL checking enabled.
authorRobert Suchanek <robert.suchanek@imgtec.com>
Thu, 2 Mar 2023 10:37:47 +0000 (10:37 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 2 Mar 2023 10:37:47 +0000 (10:37 +0000)
gcc/ChangeLog:

* config/mips/mips.cc (mips_set_text_contents_type): Use HOST_WIDE_INT
instead of long.
* config/mips/mips-protos.h (mips_set_text_contents_type): Likewise.

Signed-off-by: Xin Liu <xin.liu@oss.cipunited.com>
gcc/config/mips/mips-protos.h
gcc/config/mips/mips.cc

index 05abe8523601479c12527275cdb997ca720c1331..2048346910525f8854c64d0d23d9553ce789fc2e 100644 (file)
@@ -271,7 +271,7 @@ extern void mips_declare_object (FILE *, const char *, const char *,
 extern void mips_declare_object_name (FILE *, const char *, tree);
 extern void mips_finish_declare_object (FILE *, tree, int, int);
 extern void mips_set_text_contents_type (FILE *, const char *,
-                                        unsigned long, bool);
+                                        unsigned HOST_WIDE_INT, bool);
 
 extern bool mips_small_data_pattern_p (rtx);
 extern rtx mips_rewrite_small_data (rtx);
index b066a2cda75221137658777c234b9e1141bfff64..ca822758b41cac46cc3f01fd2200c69bfd35f479 100644 (file)
@@ -9923,7 +9923,7 @@ mips_finish_declare_object (FILE *stream, tree decl, int top_level, int at_end)
 void
 mips_set_text_contents_type (FILE *file ATTRIBUTE_UNUSED,
                             const char *prefix ATTRIBUTE_UNUSED,
-                            unsigned long num ATTRIBUTE_UNUSED,
+                            unsigned HOST_WIDE_INT num ATTRIBUTE_UNUSED,
                             bool function_p ATTRIBUTE_UNUSED)
 {
 #ifdef ASM_OUTPUT_TYPE_DIRECTIVE
@@ -9932,7 +9932,7 @@ mips_set_text_contents_type (FILE *file ATTRIBUTE_UNUSED,
   char *sname;
   rtx symbol;
 
-  sprintf (buf, "%lu", num);
+  sprintf (buf, HOST_WIDE_INT_PRINT_UNSIGNED, num);
   symbol = XEXP (DECL_RTL (current_function_decl), 0);
   fnname = targetm.strip_name_encoding (XSTR (symbol, 0));
   sname = ACONCAT ((prefix, fnname, "_", buf, NULL));