aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
authorRobert Suchanek <robert.suchanek@imgtec.com>2023-03-02 10:37:47 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2023-03-02 10:37:47 +0000
commit0b83fa076458703f4c73395ceec14e59b8ddbf49 (patch)
tree9a2b6097e000eb76dbf3c342ef2a8b6535ae5104 /gcc/config/mips
parentf2b846f1feb6a1bbca0b85d2db66b92787bc0891 (diff)
downloadgcc-0b83fa076458703f4c73395ceec14e59b8ddbf49.zip
gcc-0b83fa076458703f4c73395ceec14e59b8ddbf49.tar.gz
gcc-0b83fa076458703f4c73395ceec14e59b8ddbf49.tar.bz2
MIPS: Bugfix for fix Dejagnu issues with RTL checking enabled.
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>
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/mips-protos.h2
-rw-r--r--gcc/config/mips/mips.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h
index 05abe85..2048346 100644
--- a/gcc/config/mips/mips-protos.h
+++ b/gcc/config/mips/mips-protos.h
@@ -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);
diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
index b066a2c..ca82275 100644
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
@@ -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));