public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][committed] arc: Update operand printing
@ 2020-03-31 12:12 Claudiu Zissulescu
  0 siblings, 0 replies; only message in thread
From: Claudiu Zissulescu @ 2020-03-31 12:12 UTC (permalink / raw)
  To: gcc-patches; +Cc: fbedard, andrew.burgess, law

Use HOST_WIDE_INT_PRINT_DEC macro instead of %ld for format printing.

Committed as obvious.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_print_operand): Use
	HOST_WIDE_INT_PRINT_DEC macro.
---
 gcc/ChangeLog        | 5 +++++
 gcc/config/arc/arc.c | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9da7a4a76b7..3d4e798a2f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-31  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	* config/arc/arc.c (arc_print_operand): Use
+	HOST_WIDE_INT_PRINT_DEC macro.
+
 2020-03-31  Claudiu Zissulescu  <claziss@synopsys.com>
 
 	* config/arc/arc.h (ASM_FORMAT_PRIVATE_NAME): Fix it.
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 922ccc5c9f9..6b96c5e4bf5 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -4530,7 +4530,7 @@ arc_print_operand (FILE *file, rtx x, int code)
 
     case 'c':
       if (GET_CODE (x) == CONST_INT)
-        fprintf (file, "%ld", INTVAL (x) );
+        fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) );
       else
         output_operand_lossage ("invalid operands to %%c code");
 
@@ -4724,7 +4724,7 @@ arc_print_operand (FILE *file, rtx x, int code)
 		  /* No special treatment for jli_fixed functions.  */
 		  if (code == 'j')
 		    break;
-		  fprintf (file, "%ld\t; @",
+		  fprintf (file, HOST_WIDE_INT_PRINT_DEC "\t; @",
 			   TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attrs))));
 		  assemble_name (file, XSTR (x, 0));
 		  return;
@@ -4745,7 +4745,7 @@ arc_print_operand (FILE *file, rtx x, int code)
 	  tree attrs = (TREE_TYPE (SYMBOL_REF_DECL (x)) != error_mark_node
 			? TYPE_ATTRIBUTES (TREE_TYPE (SYMBOL_REF_DECL (x)))
 			: NULL_TREE);
-	  fprintf (file, "%ld\t; @",
+	  fprintf (file, HOST_WIDE_INT_PRINT_DEC "\t; @",
 		   TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attrs))));
 	  assemble_name (file, XSTR (x, 0));
 	  return;
-- 
2.24.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-31 12:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 12:12 [PATCH][committed] arc: Update operand printing Claudiu Zissulescu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).