Commit c2ae8aef by Kaveh R. Ghazi Committed by Kaveh Ghazi

hwint.h (HOST_WIDE_INT_PRINT_DEC_SPACE, [...]): New formatting macros.

	* hwint.h (HOST_WIDE_INT_PRINT_DEC_SPACE,
	HOST_WIDE_INT_PRINT_UNSIGNED_SPACE,
	HOST_WIDEST_INT_PRINT_DEC_SPACE, HOST_WIDEST_INT_PRINT_DEC_SPACE):
	New formatting macros.

	* ra-debug.c (dump_static_insn_cost): Avoid string concatenation.

From-SVN: r55652
parent eab2120d
2002-07-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* hwint.h (HOST_WIDE_INT_PRINT_DEC_SPACE,
HOST_WIDE_INT_PRINT_UNSIGNED_SPACE,
HOST_WIDEST_INT_PRINT_DEC_SPACE, HOST_WIDEST_INT_PRINT_DEC_SPACE):
New formatting macros.
* ra-debug.c (dump_static_insn_cost): Avoid string concatenation.
Mon Jul 22 15:27:25 2002 J"orn Rennecke <joern.rennecke@superh.com> Mon Jul 22 15:27:25 2002 J"orn Rennecke <joern.rennecke@superh.com>
* rtlanal.c (subreg_regno_offset): Return correct offset for * rtlanal.c (subreg_regno_offset): Return correct offset for
......
...@@ -73,13 +73,16 @@ ...@@ -73,13 +73,16 @@
# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
# define HOST_WIDE_INT_PRINT_DEC "%d" # define HOST_WIDE_INT_PRINT_DEC "%d"
# define HOST_WIDE_INT_PRINT_DEC_C "%d" # define HOST_WIDE_INT_PRINT_DEC_C "%d"
# define HOST_WIDE_INT_PRINT_DEC_SPACE "% *d"
# else # else
# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
# define HOST_WIDE_INT_PRINT_DEC "%ld" # define HOST_WIDE_INT_PRINT_DEC "%ld"
# define HOST_WIDE_INT_PRINT_DEC_C "%ldL" # define HOST_WIDE_INT_PRINT_DEC_C "%ldL"
# define HOST_WIDE_INT_PRINT_DEC_SPACE "% *ld"
# else # else
# define HOST_WIDE_INT_PRINT_DEC "%lld" # define HOST_WIDE_INT_PRINT_DEC "%lld"
# define HOST_WIDE_INT_PRINT_DEC_C "%lldLL" # define HOST_WIDE_INT_PRINT_DEC_C "%lldLL"
# define HOST_WIDE_INT_PRINT_DEC_SPACE "% *lld"
# endif # endif
# endif # endif
#endif /* ! HOST_WIDE_INT_PRINT_DEC */ #endif /* ! HOST_WIDE_INT_PRINT_DEC */
...@@ -87,11 +90,14 @@ ...@@ -87,11 +90,14 @@
#ifndef HOST_WIDE_INT_PRINT_UNSIGNED #ifndef HOST_WIDE_INT_PRINT_UNSIGNED
# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
# define HOST_WIDE_INT_PRINT_UNSIGNED "%u" # define HOST_WIDE_INT_PRINT_UNSIGNED "%u"
# define HOST_WIDE_INT_PRINT_UNSIGNED_SPACE "% *u"
# else # else
# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
# define HOST_WIDE_INT_PRINT_UNSIGNED "%lu" # define HOST_WIDE_INT_PRINT_UNSIGNED "%lu"
# define HOST_WIDE_INT_PRINT_UNSIGNED_SPACE "% *lu"
# else # else
# define HOST_WIDE_INT_PRINT_UNSIGNED "%llu" # define HOST_WIDE_INT_PRINT_UNSIGNED "%llu"
# define HOST_WIDE_INT_PRINT_UNSIGNED_SPACE "% *llu"
# endif # endif
# endif # endif
#endif /* ! HOST_WIDE_INT_PRINT_UNSIGNED */ #endif /* ! HOST_WIDE_INT_PRINT_UNSIGNED */
...@@ -142,13 +148,17 @@ ...@@ -142,13 +148,17 @@
# define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG # define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG
# define HOST_WIDEST_INT long long # define HOST_WIDEST_INT long long
# define HOST_WIDEST_INT_PRINT_DEC "%lld" # define HOST_WIDEST_INT_PRINT_DEC "%lld"
# define HOST_WIDEST_INT_PRINT_DEC_SPACE "% *lld"
# define HOST_WIDEST_INT_PRINT_UNSIGNED "%llu" # define HOST_WIDEST_INT_PRINT_UNSIGNED "%llu"
# define HOST_WIDEST_INT_PRINT_UNSIGNED_SPACE "% *llu"
# define HOST_WIDEST_INT_PRINT_HEX "0x%llx" # define HOST_WIDEST_INT_PRINT_HEX "0x%llx"
# else # else
# define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONG # define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONG
# define HOST_WIDEST_INT long # define HOST_WIDEST_INT long
# define HOST_WIDEST_INT_PRINT_DEC "%ld" # define HOST_WIDEST_INT_PRINT_DEC "%ld"
# define HOST_WIDEST_INT_PRINT_DEC_SPACE "% *ld"
# define HOST_WIDEST_INT_PRINT_UNSIGNED "%lu" # define HOST_WIDEST_INT_PRINT_UNSIGNED "%lu"
# define HOST_WIDEST_INT_PRINT_UNSIGNED_SPACE "% *lu"
# define HOST_WIDEST_INT_PRINT_HEX "0x%lx" # define HOST_WIDEST_INT_PRINT_HEX "0x%lx"
# endif /* long long wider than long */ # endif /* long long wider than long */
#endif /* ! HOST_WIDEST_INT */ #endif /* ! HOST_WIDEST_INT */
......
...@@ -981,16 +981,21 @@ dump_static_insn_cost (file, message, prefix) ...@@ -981,16 +981,21 @@ dump_static_insn_cost (file, message, prefix)
if (!prefix) if (!prefix)
prefix = ""; prefix = "";
fprintf (file, "static insn cost %s\n", message ? message : ""); fprintf (file, "static insn cost %s\n", message ? message : "");
fprintf (file, " %soverall:\tnum=%6d\tcost=%8d\n", prefix, overall.count, fprintf (file, " %soverall:\tnum=%6d\tcost=", prefix, overall.count);
overall.cost); fprintf (file, HOST_WIDE_INT_PRINT_DEC_SPACE, 8, overall.cost);
fprintf (file, " %sloads:\tnum=%6d\tcost=%8d\n", prefix, load.count, fprintf (file, "\n");
load.cost); fprintf (file, " %sloads:\tnum=%6d\tcost=", prefix, load.count);
fprintf (file, " %sstores:\tnum=%6d\tcost=%8d\n", prefix, fprintf (file, HOST_WIDE_INT_PRINT_DEC_SPACE, 8, load.cost);
store.count, store.cost); fprintf (file, "\n");
fprintf (file, " %sregcopy:\tnum=%6d\tcost=%8d\n", prefix, regcopy.count, fprintf (file, " %sstores:\tnum=%6d\tcost=", prefix, store.count);
regcopy.cost); fprintf (file, HOST_WIDE_INT_PRINT_DEC_SPACE, 8, store.cost);
fprintf (file, " %sselfcpy:\tnum=%6d\tcost=%8d\n", prefix, selfcopy.count, fprintf (file, "\n");
selfcopy.cost); fprintf (file, " %sregcopy:\tnum=%6d\tcost=", prefix, regcopy.count);
fprintf (file, HOST_WIDE_INT_PRINT_DEC_SPACE, 8, regcopy.cost);
fprintf (file, "\n");
fprintf (file, " %sselfcpy:\tnum=%6d\tcost=", prefix, selfcopy.count);
fprintf (file, HOST_WIDE_INT_PRINT_DEC_SPACE, 8, selfcopy.cost);
fprintf (file, "\n");
} }
/* Returns nonzero, if WEB1 and WEB2 have some possible /* Returns nonzero, if WEB1 and WEB2 have some possible
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment