This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[ip2k port] bugfix
- From: Denis Chertykov <denisc at overta dot ru>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 Aug 2002 14:00:23 +0400
- Subject: [ip2k port] bugfix
2002-08-13 Denis Chertykov <denisc@overta.ru>
* config/ip2k/ip2k.c (commands_in_file): Variable removed.
(function_epilogue): Don't calculate function size.
(ip2k_set_compare): Don't use lookup_const_double.
(asm_file_start): Initialization of commands_in_file removed.
(asm_file_end): Output of commands_in_file removed.
* config/ip2k/ip2k.c (CPP_PREDEFINES): Remove definition of
__INT_MAX__.
Index: config/ip2k/ip2k.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ip2k/ip2k.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 ip2k.c
*** config/ip2k/ip2k.c 11 Aug 2002 19:24:08 -0000 1.4
--- config/ip2k/ip2k.c 13 Aug 2002 09:49:57 -0000
*************** static void mdr_try_wreg_elim PARAMS ((r
*** 90,98 ****
struct gcc_target targetm = TARGET_INITIALIZER;
- /* Commands count in the compiled file. */
- static int commands_in_file;
-
/* Commands in the functions prologues in the compiled file. */
static int commands_in_prologues;
--- 90,95 ----
*************** function_epilogue (file, size)
*** 304,310 ****
{
int leaf_func_p;
int reg,savelimit;
- int function_size;
rtx operands[2]; /* Dummy used by OUT_ASn */
int need_ret = 1;
--- 301,306 ----
*************** function_epilogue (file, size)
*** 324,332 ****
}
leaf_func_p = leaf_function_p ();
- function_size = (INSN_ADDRESSES (INSN_UID (get_last_insn ()))
- - INSN_ADDRESSES (INSN_UID (get_insns ())));
-
epilogue_size = 0;
fprintf (file, "/* epilogue: frame size=%d */\n", size);
--- 320,325 ----
*************** function_epilogue (file, size)
*** 508,516 ****
}
fprintf (file, "/* epilogue end (size=%d) */\n", epilogue_size);
- fprintf (file, "/* function %s size %d (%d) */\n", current_function_name,
- prologue_size + function_size + epilogue_size, function_size);
- commands_in_file += prologue_size + function_size + epilogue_size;
commands_in_prologues += prologue_size;
commands_in_epilogues += epilogue_size;
}
--- 501,506 ----
*************** ip2k_set_compare (x, y)
*** 1091,1097 ****
{
rtx value;
size_t i;
!
value = rtx_alloc (CONST_DOUBLE);
PUT_MODE (value, VOIDmode);
--- 1081,1087 ----
{
rtx value;
size_t i;
!
value = rtx_alloc (CONST_DOUBLE);
PUT_MODE (value, VOIDmode);
*************** ip2k_set_compare (x, y)
*** 1101,1107 ****
for (i = 2; i < (sizeof CONST_DOUBLE_FORMAT - 1); i++)
XWINT (value, i) = 0;
! y = lookup_const_double (value);
}
ip2k_compare_operands[0] = x;
--- 1091,1097 ----
for (i = 2; i < (sizeof CONST_DOUBLE_FORMAT - 1); i++)
XWINT (value, i) = 0;
! y = value;
}
ip2k_compare_operands[0] = x;
*************** asm_file_start (file)
*** 3196,3202 ****
{
output_file_directive (file, main_input_filename);
- commands_in_file = 0;
commands_in_prologues = 0;
commands_in_epilogues = 0;
}
--- 3186,3191 ----
*************** asm_file_end (file)
*** 3210,3221 ****
{
fprintf
(file,
! "/* File %s: code %4d = 0x%04x (%4d), prologues %3d, epilogues %3d */\n",
! main_input_filename,
! commands_in_file,
! commands_in_file,
! commands_in_file - commands_in_prologues - commands_in_epilogues,
! commands_in_prologues, commands_in_epilogues);
}
/* Cost functions. */
--- 3199,3206 ----
{
fprintf
(file,
! "/* File %s: prologues %3d, epilogues %3d */\n",
! main_input_filename, commands_in_prologues, commands_in_epilogues);
}
/* Cost functions. */
Index: config/ip2k/ip2k.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ip2k/ip2k.h,v
retrieving revision 1.5
diff -c -3 -p -r1.5 ip2k.h
*** config/ip2k/ip2k.h 31 Jul 2002 02:13:31 -0000 1.5
--- config/ip2k/ip2k.h 13 Aug 2002 09:50:32 -0000
*************** Boston, MA 02111-1307, USA. */
*** 28,34 ****
#undef ASM_SPEC /* But we have a GAS assembler. */
#define CPP_PREDEFINES \
! "-DIP2K -D__INT_MAX__=SHRT_MAX -D_DOUBLE_IS_32BITS -D__BUFSIZ__=512 -D__FILENAME_MAX__=128"
/* Define this to be a string constant containing `-D' options to
define the predefined macros that identify this machine and system.
These macros will be predefined unless the `-ansi' option is
--- 28,34 ----
#undef ASM_SPEC /* But we have a GAS assembler. */
#define CPP_PREDEFINES \
! "-DIP2K -D_DOUBLE_IS_32BITS -D__BUFSIZ__=512 -D__FILENAME_MAX__=128"
/* Define this to be a string constant containing `-D' options to
define the predefined macros that identify this machine and system.
These macros will be predefined unless the `-ansi' option is