Commit 5f4f0e22 by Charles Hannum

*** empty log message ***

From-SVN: r1471
parent 3d678dca
...@@ -28,7 +28,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -28,7 +28,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <signal.h> #include <signal.h>
......
...@@ -1205,7 +1205,7 @@ fixup_var_refs_1 (var, loc, insn, replacements) ...@@ -1205,7 +1205,7 @@ fixup_var_refs_1 (var, loc, insn, replacements)
/* Make the change and see if the insn remains valid. */ /* Make the change and see if the insn remains valid. */
INSN_CODE (insn) = -1; INSN_CODE (insn) = -1;
XEXP (x, 0) = newmem; XEXP (x, 0) = newmem;
XEXP (x, 2) = gen_rtx (CONST_INT, VOIDmode, pos); XEXP (x, 2) = GEN_INT (pos);
if (recog_memoized (insn) >= 0) if (recog_memoized (insn) >= 0)
return; return;
...@@ -1270,7 +1270,7 @@ fixup_var_refs_1 (var, loc, insn, replacements) ...@@ -1270,7 +1270,7 @@ fixup_var_refs_1 (var, loc, insn, replacements)
optimize_bit_field (x, insn, 0); optimize_bit_field (x, insn, 0);
if (GET_CODE (SET_SRC (x)) == SIGN_EXTRACT if (GET_CODE (SET_SRC (x)) == SIGN_EXTRACT
|| GET_CODE (SET_SRC (x)) == ZERO_EXTRACT) || GET_CODE (SET_SRC (x)) == ZERO_EXTRACT)
optimize_bit_field (x, insn, 0); optimize_bit_field (x, insn, NULL_PTR);
/* If SET_DEST is now a paradoxical SUBREG, put the result of this /* If SET_DEST is now a paradoxical SUBREG, put the result of this
insn into a pseudo and store the low part of the pseudo into VAR. */ insn into a pseudo and store the low part of the pseudo into VAR. */
...@@ -1362,7 +1362,7 @@ fixup_var_refs_1 (var, loc, insn, replacements) ...@@ -1362,7 +1362,7 @@ fixup_var_refs_1 (var, loc, insn, replacements)
/* Make the change and see if the insn remains valid. */ /* Make the change and see if the insn remains valid. */
INSN_CODE (insn) = -1; INSN_CODE (insn) = -1;
XEXP (outerdest, 0) = newmem; XEXP (outerdest, 0) = newmem;
XEXP (outerdest, 2) = gen_rtx (CONST_INT, VOIDmode, pos); XEXP (outerdest, 2) = GEN_INT (pos);
if (recog_memoized (insn) >= 0) if (recog_memoized (insn) >= 0)
return; return;
...@@ -1867,7 +1867,7 @@ instantiate_virtual_regs (fndecl, insns) ...@@ -1867,7 +1867,7 @@ instantiate_virtual_regs (fndecl, insns)
|| GET_CODE (insn) == CALL_INSN) || GET_CODE (insn) == CALL_INSN)
{ {
instantiate_virtual_regs_1 (&PATTERN (insn), insn, 1); instantiate_virtual_regs_1 (&PATTERN (insn), insn, 1);
instantiate_virtual_regs_1 (&REG_NOTES (insn), 0, 0); instantiate_virtual_regs_1 (&REG_NOTES (insn), NULL_RTX, 0);
} }
/* Now instantiate the remaining register equivalences for debugging info. /* Now instantiate the remaining register equivalences for debugging info.
...@@ -1904,11 +1904,13 @@ instantiate_decls (fndecl, valid_only) ...@@ -1904,11 +1904,13 @@ instantiate_decls (fndecl, valid_only)
{ {
if (DECL_RTL (decl) && GET_CODE (DECL_RTL (decl)) == MEM) if (DECL_RTL (decl) && GET_CODE (DECL_RTL (decl)) == MEM)
instantiate_virtual_regs_1 (&XEXP (DECL_RTL (decl), 0), instantiate_virtual_regs_1 (&XEXP (DECL_RTL (decl), 0),
valid_only ? DECL_RTL (decl) : 0, 0); (valid_only ? DECL_RTL (decl) : NULL_RTX),
0);
if (DECL_INCOMING_RTL (decl) if (DECL_INCOMING_RTL (decl)
&& GET_CODE (DECL_INCOMING_RTL (decl)) == MEM) && GET_CODE (DECL_INCOMING_RTL (decl)) == MEM)
instantiate_virtual_regs_1 (&XEXP (DECL_INCOMING_RTL (decl), 0), instantiate_virtual_regs_1 (&XEXP (DECL_INCOMING_RTL (decl), 0),
valid_only ? DECL_INCOMING_RTL (decl) : 0, (valid_only ? DECL_INCOMING_RTL (decl)
: NULL_RTX),
0); 0);
} }
...@@ -1938,7 +1940,7 @@ instantiate_decls_1 (let, valid_only) ...@@ -1938,7 +1940,7 @@ instantiate_decls_1 (let, valid_only)
for (t = BLOCK_VARS (let); t; t = TREE_CHAIN (t)) for (t = BLOCK_VARS (let); t; t = TREE_CHAIN (t))
if (DECL_RTL (t) && GET_CODE (DECL_RTL (t)) == MEM) if (DECL_RTL (t) && GET_CODE (DECL_RTL (t)) == MEM)
instantiate_virtual_regs_1 (& XEXP (DECL_RTL (t), 0), instantiate_virtual_regs_1 (& XEXP (DECL_RTL (t), 0),
valid_only ? DECL_RTL (t) : 0, 0); valid_only ? DECL_RTL (t) : NULL_RTX, 0);
/* Process all subblocks. */ /* Process all subblocks. */
for (t = BLOCK_SUBBLOCKS (let); t; t = TREE_CHAIN (t)) for (t = BLOCK_SUBBLOCKS (let); t; t = TREE_CHAIN (t))
...@@ -2023,10 +2025,10 @@ instantiate_virtual_regs_1 (loc, object, extra_insns) ...@@ -2023,10 +2025,10 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
start_sequence (); start_sequence ();
if (GET_CODE (SET_SRC (x)) != REG) if (GET_CODE (SET_SRC (x)) != REG)
temp = force_operand (SET_SRC (x), 0); temp = force_operand (SET_SRC (x), NULL_RTX);
else else
temp = SET_SRC (x); temp = SET_SRC (x);
temp = force_operand (plus_constant (temp, offset), 0); temp = force_operand (plus_constant (temp, offset), NULL_RTX);
seq = get_insns (); seq = get_insns ();
end_sequence (); end_sequence ();
...@@ -2128,7 +2130,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns) ...@@ -2128,7 +2130,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
XEXP (x, 0) = old; XEXP (x, 0) = old;
start_sequence (); start_sequence ();
temp = force_operand (new, 0); temp = force_operand (new, NULL_RTX);
seq = get_insns (); seq = get_insns ();
end_sequence (); end_sequence ();
...@@ -2267,7 +2269,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns) ...@@ -2267,7 +2269,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
return 0; return 0;
start_sequence (); start_sequence ();
temp = force_operand (temp, 0); temp = force_operand (temp, NULL_RTX);
seq = get_insns (); seq = get_insns ();
end_sequence (); end_sequence ();
...@@ -2490,7 +2492,7 @@ assign_parms (fndecl, second_time) ...@@ -2490,7 +2492,7 @@ assign_parms (fndecl, second_time)
{ {
tree type = build_pointer_type (fntype); tree type = build_pointer_type (fntype);
function_result_decl = build_decl (PARM_DECL, 0, type); function_result_decl = build_decl (PARM_DECL, NULL_TREE, type);
DECL_ARG_TYPE (function_result_decl) = type; DECL_ARG_TYPE (function_result_decl) = type;
TREE_CHAIN (function_result_decl) = fnargs; TREE_CHAIN (function_result_decl) = fnargs;
...@@ -2501,9 +2503,9 @@ assign_parms (fndecl, second_time) ...@@ -2501,9 +2503,9 @@ assign_parms (fndecl, second_time)
bzero (parm_reg_stack_loc, nparmregs * sizeof (rtx)); bzero (parm_reg_stack_loc, nparmregs * sizeof (rtx));
#ifdef INIT_CUMULATIVE_INCOMING_ARGS #ifdef INIT_CUMULATIVE_INCOMING_ARGS
INIT_CUMULATIVE_INCOMING_ARGS (args_so_far, fntype, 0); INIT_CUMULATIVE_INCOMING_ARGS (args_so_far, fntype, NULL_PTR);
#else #else
INIT_CUMULATIVE_ARGS (args_so_far, fntype, 0); INIT_CUMULATIVE_ARGS (args_so_far, fntype, NULL_PTR);
#endif #endif
/* We haven't yet found an argument that we must push and pretend the /* We haven't yet found an argument that we must push and pretend the
...@@ -2849,7 +2851,7 @@ assign_parms (fndecl, second_time) ...@@ -2849,7 +2851,7 @@ assign_parms (fndecl, second_time)
&& REGNO (entry_parm) < FIRST_PSEUDO_REGISTER && REGNO (entry_parm) < FIRST_PSEUDO_REGISTER
&& ! HARD_REGNO_MODE_OK (REGNO (entry_parm), && ! HARD_REGNO_MODE_OK (REGNO (entry_parm),
GET_MODE (entry_parm))) GET_MODE (entry_parm)))
convert_move (parmreg, copy_to_reg (entry_parm)); convert_move (parmreg, copy_to_reg (entry_parm), 0);
else else
convert_move (parmreg, validize_mem (entry_parm), 0); convert_move (parmreg, validize_mem (entry_parm), 0);
} }
...@@ -2953,11 +2955,10 @@ assign_parms (fndecl, second_time) ...@@ -2953,11 +2955,10 @@ assign_parms (fndecl, second_time)
#ifdef ARGS_GROW_DOWNWARD #ifdef ARGS_GROW_DOWNWARD
current_function_arg_offset_rtx current_function_arg_offset_rtx
= (stack_args_size.var == 0 ? gen_rtx (CONST_INT, VOIDmode, = (stack_args_size.var == 0 ? GEN_INT (-stack_args_size.constant)
-stack_args_size.constant)
: expand_expr (size_binop (MINUS_EXPR, stack_args_size.var, : expand_expr (size_binop (MINUS_EXPR, stack_args_size.var,
size_int (-stack_args_size.constant)), size_int (-stack_args_size.constant)),
0, VOIDmode, 0)); NULL_RTX, VOIDmode, 0));
#else #else
current_function_arg_offset_rtx = ARGS_SIZE_RTX (stack_args_size); current_function_arg_offset_rtx = ARGS_SIZE_RTX (stack_args_size);
#endif #endif
...@@ -3497,10 +3498,10 @@ round_trampoline_addr (tramp) ...@@ -3497,10 +3498,10 @@ round_trampoline_addr (tramp)
/* Round address up to desired boundary. */ /* Round address up to desired boundary. */
rtx temp = gen_reg_rtx (Pmode); rtx temp = gen_reg_rtx (Pmode);
temp = expand_binop (Pmode, add_optab, tramp, temp = expand_binop (Pmode, add_optab, tramp,
gen_rtx (CONST_INT, VOIDmode, TRAMPOLINE_ALIGNMENT - 1), GEN_INT (TRAMPOLINE_ALIGNMENT - 1),
temp, 0, OPTAB_LIB_WIDEN); temp, 0, OPTAB_LIB_WIDEN);
tramp = expand_binop (Pmode, and_optab, temp, tramp = expand_binop (Pmode, and_optab, temp,
gen_rtx (CONST_INT, VOIDmode, - TRAMPOLINE_ALIGNMENT), GEN_INT (- TRAMPOLINE_ALIGNMENT),
temp, 0, OPTAB_LIB_WIDEN); temp, 0, OPTAB_LIB_WIDEN);
#endif #endif
return tramp; return tramp;
...@@ -3615,7 +3616,7 @@ init_function_start (subr, filename, line) ...@@ -3615,7 +3616,7 @@ init_function_start (subr, filename, line)
/* Make sure first insn is a note even if we don't want linenums. /* Make sure first insn is a note even if we don't want linenums.
This makes sure the first insn will never be deleted. This makes sure the first insn will never be deleted.
Also, final expects a note to appear there. */ Also, final expects a note to appear there. */
emit_note (0, NOTE_INSN_DELETED); emit_note (NULL_PTR, NOTE_INSN_DELETED);
/* Set flags used by final.c. */ /* Set flags used by final.c. */
if (aggregate_value_p (DECL_RESULT (subr))) if (aggregate_value_p (DECL_RESULT (subr)))
...@@ -3795,12 +3796,12 @@ expand_function_start (subr, parms_have_cleanups) ...@@ -3795,12 +3796,12 @@ expand_function_start (subr, parms_have_cleanups)
The move is supposed to make sdb output more accurate. */ The move is supposed to make sdb output more accurate. */
/* Indicate the beginning of the function body, /* Indicate the beginning of the function body,
as opposed to parm setup. */ as opposed to parm setup. */
emit_note (0, NOTE_INSN_FUNCTION_BEG); emit_note (NULL_PTR, NOTE_INSN_FUNCTION_BEG);
/* If doing stupid allocation, mark parms as born here. */ /* If doing stupid allocation, mark parms as born here. */
if (GET_CODE (get_last_insn ()) != NOTE) if (GET_CODE (get_last_insn ()) != NOTE)
emit_note (0, NOTE_INSN_DELETED); emit_note (NULL_PTR, NOTE_INSN_DELETED);
parm_birth_insn = get_last_insn (); parm_birth_insn = get_last_insn ();
if (obey_regdecls) if (obey_regdecls)
...@@ -3841,11 +3842,11 @@ expand_function_start (subr, parms_have_cleanups) ...@@ -3841,11 +3842,11 @@ expand_function_start (subr, parms_have_cleanups)
/* After the display initializations is where the tail-recursion label /* After the display initializations is where the tail-recursion label
should go, if we end up needing one. Ensure we have a NOTE here should go, if we end up needing one. Ensure we have a NOTE here
since some things (like trampolines) get placed before this. */ since some things (like trampolines) get placed before this. */
tail_recursion_reentry = emit_note (0, NOTE_INSN_DELETED); tail_recursion_reentry = emit_note (NULL_PTR, NOTE_INSN_DELETED);
/* Evaluate now the sizes of any types declared among the arguments. */ /* Evaluate now the sizes of any types declared among the arguments. */
for (tem = nreverse (get_pending_sizes ()); tem; tem = TREE_CHAIN (tem)) for (tem = nreverse (get_pending_sizes ()); tem; tem = TREE_CHAIN (tem))
expand_expr (TREE_VALUE (tem), 0, VOIDmode, 0); expand_expr (TREE_VALUE (tem), NULL_RTX, VOIDmode, 0);
/* Make sure there is a line number after the function entry setup code. */ /* Make sure there is a line number after the function entry setup code. */
force_next_line_note (); force_next_line_note ();
...@@ -3905,8 +3906,7 @@ expand_function_end (filename, line) ...@@ -3905,8 +3906,7 @@ expand_function_end (filename, line)
start_sequence (); start_sequence ();
tramp = change_address (initial_trampoline, BLKmode, tramp = change_address (initial_trampoline, BLKmode,
round_trampoline_addr (XEXP (tramp, 0))); round_trampoline_addr (XEXP (tramp, 0)));
emit_block_move (tramp, initial_trampoline, emit_block_move (tramp, initial_trampoline, GEN_INT (TRAMPOLINE_SIZE),
gen_rtx (CONST_INT, VOIDmode, TRAMPOLINE_SIZE),
FUNCTION_BOUNDARY / BITS_PER_UNIT); FUNCTION_BOUNDARY / BITS_PER_UNIT);
INITIALIZE_TRAMPOLINE (XEXP (tramp, 0), INITIALIZE_TRAMPOLINE (XEXP (tramp, 0),
XEXP (DECL_RTL (function), 0), context); XEXP (DECL_RTL (function), 0), context);
...@@ -3938,7 +3938,7 @@ expand_function_end (filename, line) ...@@ -3938,7 +3938,7 @@ expand_function_end (filename, line)
/* End any sequences that failed to be closed due to syntax errors. */ /* End any sequences that failed to be closed due to syntax errors. */
while (in_sequence_p ()) while (in_sequence_p ())
end_sequence (0); end_sequence ();
/* Outside function body, can't compute type's actual size /* Outside function body, can't compute type's actual size
until next function's body starts. */ until next function's body starts. */
...@@ -3971,7 +3971,7 @@ expand_function_end (filename, line) ...@@ -3971,7 +3971,7 @@ expand_function_end (filename, line)
/* Mark the end of the function body. /* Mark the end of the function body.
If control reaches this insn, the function can drop through If control reaches this insn, the function can drop through
without returning a value. */ without returning a value. */
emit_note (0, NOTE_INSN_FUNCTION_END); emit_note (NULL_PTR, NOTE_INSN_FUNCTION_END);
/* Output a linenumber for the end of the function. /* Output a linenumber for the end of the function.
SDB depends on this. */ SDB depends on this. */
...@@ -3997,7 +3997,7 @@ expand_function_end (filename, line) ...@@ -3997,7 +3997,7 @@ expand_function_end (filename, line)
rtx tem = 0; rtx tem = 0;
emit_stack_save (SAVE_FUNCTION, &tem, parm_birth_insn); emit_stack_save (SAVE_FUNCTION, &tem, parm_birth_insn);
emit_stack_restore (SAVE_FUNCTION, tem, 0); emit_stack_restore (SAVE_FUNCTION, tem, NULL_RTX);
} }
/* If scalar return value was computed in a pseudo-reg, /* If scalar return value was computed in a pseudo-reg,
...@@ -4072,7 +4072,7 @@ expand_function_end (filename, line) ...@@ -4072,7 +4072,7 @@ expand_function_end (filename, line)
/* If you have any cleanups to do at this point, /* If you have any cleanups to do at this point,
and they need to create temporary variables, and they need to create temporary variables,
then you will lose. */ then you will lose. */
fixup_gotos (0, 0, 0, get_insns (), 0); fixup_gotos (NULL_PTR, NULL_RTX, NULL_TREE, get_insns (), 0);
} }
/* These arrays record the INSN_UIDs of the prologue and epilogue insns. */ /* These arrays record the INSN_UIDs of the prologue and epilogue insns. */
......
...@@ -106,7 +106,7 @@ gen_peephole (peep) ...@@ -106,7 +106,7 @@ gen_peephole (peep)
/* Walk the insn's pattern, remembering at all times the path /* Walk the insn's pattern, remembering at all times the path
down to the walking point. */ down to the walking point. */
match_rtx (XVECEXP (peep, 0, i), 0, insn_code_number); match_rtx (XVECEXP (peep, 0, i), NULL_PTR, insn_code_number);
} }
/* We get this far if the pattern matches. /* We get this far if the pattern matches.
......
...@@ -34,7 +34,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -34,7 +34,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "tree.h" #include "tree.h"
#include "rtl.h" #include "rtl.h"
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include "obstack.h" #include "obstack.h"
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
......
/* Optimize jump instructions, for GNU compiler. /* Optimize jump instructions, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1991 Free Software Foundation, Inc. Copyright (C) 1987, 1988, 1989, 1991, 1992 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -368,8 +368,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -368,8 +368,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
} }
else else
XEXP (SET_SRC (PATTERN (stack_adjust_insn)), 1) XEXP (SET_SRC (PATTERN (stack_adjust_insn)), 1)
= gen_rtx (CONST_INT, VOIDmode, = GEN_INT (stack_adjust_amount - total_pushed);
stack_adjust_amount - total_pushed);
/* Change the appropriate push insns to ordinary stores. */ /* Change the appropriate push insns to ordinary stores. */
p = insn; p = insn;
...@@ -396,7 +395,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -396,7 +395,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
if (total_pushed < 0) if (total_pushed < 0)
{ {
emit_insn_before (gen_add2_insn (stack_pointer_rtx, emit_insn_before (gen_add2_insn (stack_pointer_rtx,
gen_rtx (CONST_INT, VOIDmode, - total_pushed)), GEN_INT (- total_pushed)),
p); p);
break; break;
} }
...@@ -433,8 +432,8 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -433,8 +432,8 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
else if (sreg >= 0 && dreg >= 0) else if (sreg >= 0 && dreg >= 0)
{ {
rtx trial; rtx trial;
rtx tem = find_equiv_reg (0, insn, 0, rtx tem = find_equiv_reg (NULL_RTX, insn, 0,
sreg, 0, dreg, sreg, NULL_PTR, dreg,
GET_MODE (SET_SRC (body))); GET_MODE (SET_SRC (body)));
#ifdef PRESERVE_DEATH_INFO_REGNO_P #ifdef PRESERVE_DEATH_INFO_REGNO_P
...@@ -463,8 +462,9 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -463,8 +462,9 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
} }
} }
else if (dreg >= 0 && CONSTANT_P (SET_SRC (body)) else if (dreg >= 0 && CONSTANT_P (SET_SRC (body))
&& find_equiv_reg (SET_SRC (body), insn, 0, dreg, 0, && find_equiv_reg (SET_SRC (body), insn, 0, dreg,
0, GET_MODE (SET_DEST (body)))) NULL_PTR, 0,
GET_MODE (SET_DEST (body))))
{ {
/* This handles the case where we have two consecutive /* This handles the case where we have two consecutive
assignments of the same constant to pseudos that didn't assignments of the same constant to pseudos that didn't
...@@ -629,7 +629,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -629,7 +629,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
it into a RETURN insn, possibly a conditional one. */ it into a RETURN insn, possibly a conditional one. */
if (JUMP_LABEL (insn) if (JUMP_LABEL (insn)
&& next_active_insn (JUMP_LABEL (insn)) == 0) && next_active_insn (JUMP_LABEL (insn)) == 0)
changed |= redirect_jump (insn, 0); changed |= redirect_jump (insn, NULL_RTX);
/* Detect jump to following insn. */ /* Detect jump to following insn. */
if (reallabelprev == insn && condjump_p (insn)) if (reallabelprev == insn && condjump_p (insn))
...@@ -902,7 +902,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -902,7 +902,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
if (normalizep != 1) if (normalizep != 1)
target = expand_and (yes, target, target = expand_and (yes, target,
(GET_CODE (target) == REG (GET_CODE (target) == REG
? target : 0)); ? target : NULL_RTX));
seq = gen_sequence (); seq = gen_sequence ();
end_sequence (); end_sequence ();
emit_insn_before (seq, temp5); emit_insn_before (seq, temp5);
...@@ -1718,8 +1718,8 @@ duplicate_loop_exit_test (loop_start) ...@@ -1718,8 +1718,8 @@ duplicate_loop_exit_test (loop_start)
case JUMP_INSN: case JUMP_INSN:
case INSN: case INSN:
if (++num_insns > 20 if (++num_insns > 20
|| find_reg_note (insn, REG_RETVAL, 0) || find_reg_note (insn, REG_RETVAL, NULL_RTX)
|| find_reg_note (insn, REG_LIBCALL, 0)) || find_reg_note (insn, REG_LIBCALL, NULL_RTX))
return 0; return 0;
break; break;
} }
...@@ -1996,10 +1996,10 @@ find_cross_jump (e1, e2, minimum, f1, f2) ...@@ -1996,10 +1996,10 @@ find_cross_jump (e1, e2, minimum, f1, f2)
rtx equiv2; rtx equiv2;
if (!lose && GET_CODE (p1) == GET_CODE (p2) if (!lose && GET_CODE (p1) == GET_CODE (p2)
&& ((equiv1 = find_reg_note (i1, REG_EQUAL, 0)) != 0 && ((equiv1 = find_reg_note (i1, REG_EQUAL, NULL_RTX)) != 0
|| (equiv1 = find_reg_note (i1, REG_EQUIV, 0)) != 0) || (equiv1 = find_reg_note (i1, REG_EQUIV, NULL_RTX)) != 0)
&& ((equiv2 = find_reg_note (i2, REG_EQUAL, 0)) != 0 && ((equiv2 = find_reg_note (i2, REG_EQUAL, NULL_RTX)) != 0
|| (equiv2 = find_reg_note (i2, REG_EQUIV, 0)) != 0) || (equiv2 = find_reg_note (i2, REG_EQUIV, NULL_RTX)) != 0)
/* If the equivalences are not to a constant, they may /* If the equivalences are not to a constant, they may
reference pseudos that no longer exist, so we can't reference pseudos that no longer exist, so we can't
use them. */ use them. */
...@@ -2743,7 +2743,7 @@ mark_jump_label (x, insn, cross_jump) ...@@ -2743,7 +2743,7 @@ mark_jump_label (x, insn, cross_jump)
int eltnum = code == ADDR_DIFF_VEC ? 1 : 0; int eltnum = code == ADDR_DIFF_VEC ? 1 : 0;
for (i = 0; i < XVECLEN (x, eltnum); i++) for (i = 0; i < XVECLEN (x, eltnum); i++)
mark_jump_label (XVECEXP (x, eltnum, i), 0, cross_jump); mark_jump_label (XVECEXP (x, eltnum, i), NULL_RTX, cross_jump);
return; return;
} }
} }
...@@ -2788,7 +2788,7 @@ delete_jump (insn) ...@@ -2788,7 +2788,7 @@ delete_jump (insn)
&& sets_cc0_p (PATTERN (prev))) && sets_cc0_p (PATTERN (prev)))
{ {
if (sets_cc0_p (PATTERN (prev)) > 0 if (sets_cc0_p (PATTERN (prev)) > 0
&& !FIND_REG_INC_NOTE (prev, 0)) && !FIND_REG_INC_NOTE (prev, NULL_RTX))
delete_insn (prev); delete_insn (prev);
else else
/* Otherwise, show that cc0 won't be used. */ /* Otherwise, show that cc0 won't be used. */
...@@ -2834,7 +2834,7 @@ delete_jump (insn) ...@@ -2834,7 +2834,7 @@ delete_jump (insn)
if (reg_set_p (XEXP (note, 0), PATTERN (our_prev))) if (reg_set_p (XEXP (note, 0), PATTERN (our_prev)))
{ {
if (FIND_REG_INC_NOTE (our_prev, 0)) if (FIND_REG_INC_NOTE (our_prev, NULL_RTX))
break; break;
if (GET_CODE (PATTERN (our_prev)) == PARALLEL) if (GET_CODE (PATTERN (our_prev)) == PARALLEL)
...@@ -3463,6 +3463,11 @@ rtx_renumbered_equal_p (x, y) ...@@ -3463,6 +3463,11 @@ rtx_renumbered_equal_p (x, y)
register int j; register int j;
switch (fmt[i]) switch (fmt[i])
{ {
case 'w':
if (XWINT (x, i) != XWINT (y, i))
return 0;
break;
case 'i': case 'i':
if (XINT (x, i) != XINT (y, i)) if (XINT (x, i) != XINT (y, i))
return 0; return 0;
...@@ -3875,6 +3880,11 @@ rtx_equal_for_thread_p (x, y, yinsn) ...@@ -3875,6 +3880,11 @@ rtx_equal_for_thread_p (x, y, yinsn)
{ {
switch (fmt[i]) switch (fmt[i])
{ {
case 'w':
if (XWINT (x, i) != XWINT (y, i))
return 0;
break;
case 'n': case 'n':
case 'i': case 'i':
if (XINT (x, i) != XINT (y, i)) if (XINT (x, i) != XINT (y, i))
......
...@@ -33,6 +33,34 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -33,6 +33,34 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) #define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) #define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
/* Find the largest host integer type and set its size and type. */
#ifndef HOST_BITS_PER_WIDE_INT
#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
#define HOST_WIDE_INT long
#else
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
#define HOST_WIDE_INT int
#endif
#endif
/* Define the number of entries in an 8-bit `shorts' array needed to represent
the largest supported constant, which is twice the width of the largest
host integer type. */
#ifndef MAX_SHORTS
#define MAX_SHORTS (HOST_BITS_PER_WIDE_INT * 2 / 8)
#endif
/* Provide a default way to print an address in hex via printf. */
#ifndef HOST_PTR_PRINTF
#define HOST_PTR_PRINTF sizeof (int) == sizeof (char *) ? "%x" : "%lx"
#endif
/* Make an enum class that gives all the machine modes. */ /* Make an enum class that gives all the machine modes. */
#define DEF_MACHMODE(SYM, NAME, TYPE, SIZE, UNIT, WIDER) SYM, #define DEF_MACHMODE(SYM, NAME, TYPE, SIZE, UNIT, WIDER) SYM,
...@@ -90,8 +118,8 @@ extern int mode_unit_size[]; ...@@ -90,8 +118,8 @@ extern int mode_unit_size[];
that fit within mode MODE. */ that fit within mode MODE. */
#define GET_MODE_MASK(MODE) \ #define GET_MODE_MASK(MODE) \
((GET_MODE_BITSIZE (MODE) >= HOST_BITS_PER_INT) \ ((GET_MODE_BITSIZE (MODE) >= HOST_BITS_PER_WIDE_INT) \
? -1 : ((1 << GET_MODE_BITSIZE (MODE)) - 1)) ?(HOST_WIDE_INT) ~0 : (((HOST_WIDE_INT) 1 << GET_MODE_BITSIZE (MODE)) - 1))
/* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */ /* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */
......
...@@ -464,7 +464,7 @@ DEF_RTL_EXPR(TRAP_IF, "trap_if", "ei", 'x') ...@@ -464,7 +464,7 @@ DEF_RTL_EXPR(TRAP_IF, "trap_if", "ei", 'x')
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
/* numeric integer constant */ /* numeric integer constant */
DEF_RTL_EXPR(CONST_INT, "const_int", "i", 'o') DEF_RTL_EXPR(CONST_INT, "const_int", "w", 'o')
/* numeric double constant. /* numeric double constant.
Operand 0 is the MEM that stores this constant in memory, Operand 0 is the MEM that stores this constant in memory,
...@@ -473,7 +473,7 @@ DEF_RTL_EXPR(CONST_INT, "const_int", "i", 'o') ...@@ -473,7 +473,7 @@ DEF_RTL_EXPR(CONST_INT, "const_int", "i", 'o')
Remaining operands hold the actual value. Remaining operands hold the actual value.
The number of operands may be more than 2 if cross-compiling; The number of operands may be more than 2 if cross-compiling;
see init_rtl. */ see init_rtl. */
DEF_RTL_EXPR(CONST_DOUBLE, "const_double", "e0ii", 'o') DEF_RTL_EXPR(CONST_DOUBLE, "const_double", "e0ww", 'o')
/* String constant. Used only for attributes right now. */ /* String constant. Used only for attributes right now. */
DEF_RTL_EXPR(CONST_STRING, "const_string", "s", 'o') DEF_RTL_EXPR(CONST_STRING, "const_string", "s", 'o')
......
...@@ -55,6 +55,7 @@ extern char rtx_class[]; ...@@ -55,6 +55,7 @@ extern char rtx_class[];
typedef union rtunion_def typedef union rtunion_def
{ {
HOST_WIDE_INT rtwint;
int rtint; int rtint;
char *rtstr; char *rtstr;
struct rtx_def *rtx; struct rtx_def *rtx;
...@@ -132,6 +133,16 @@ typedef struct rtx_def ...@@ -132,6 +133,16 @@ typedef struct rtx_def
#define NULL_RTX (rtx) 0 #define NULL_RTX (rtx) 0
/* Define a generic NULL if one hasn't already been defined. */
#ifndef NULL
#define NULL 0
#endif
#ifndef NULL_PTR
#define NULL_PTR (char *) NULL
#endif
/* Define macros to access the `code' field of the rtx. */ /* Define macros to access the `code' field of the rtx. */
#ifdef SHORT_ENUM_BUG #ifdef SHORT_ENUM_BUG
...@@ -179,6 +190,7 @@ typedef struct rtvec_def{ ...@@ -179,6 +190,7 @@ typedef struct rtvec_def{
#define XEXP(RTX, N) ((RTX)->fld[N].rtx) #define XEXP(RTX, N) ((RTX)->fld[N].rtx)
#define XINT(RTX, N) ((RTX)->fld[N].rtint) #define XINT(RTX, N) ((RTX)->fld[N].rtint)
#define XWINT(RTX, N) ((RTX)->fld[N].rtwint)
#define XSTR(RTX, N) ((RTX)->fld[N].rtstr) #define XSTR(RTX, N) ((RTX)->fld[N].rtstr)
#define XVEC(RTX, N) ((RTX)->fld[N].rtvec) #define XVEC(RTX, N) ((RTX)->fld[N].rtvec)
#define XVECLEN(RTX, N) ((RTX)->fld[N].rtvec->num_elem) #define XVECLEN(RTX, N) ((RTX)->fld[N].rtvec->num_elem)
...@@ -399,7 +411,7 @@ extern char *note_insn_name[]; ...@@ -399,7 +411,7 @@ extern char *note_insn_name[];
/* For a CONST_INT rtx, INTVAL extracts the integer. */ /* For a CONST_INT rtx, INTVAL extracts the integer. */
#define INTVAL(RTX) ((RTX)->fld[0].rtint) #define INTVAL(RTX) ((RTX)->fld[0].rtwint)
/* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of. /* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of.
SUBREG_WORD extracts the word-number. */ SUBREG_WORD extracts the word-number. */
...@@ -532,17 +544,36 @@ extern char *note_insn_name[]; ...@@ -532,17 +544,36 @@ extern char *note_insn_name[];
/* Generally useful functions. */ /* Generally useful functions. */
/* The following functions accept a wide integer argument. Rather than
having to cast on every function call, we use a macro instead, that is
defined here and in tree.h. */
#ifndef exact_log2
#define exact_log2(N) exact_log2_wide ((HOST_WIDE_INT) (N))
#define floor_log2(N) floor_log2_wide ((HOST_WIDE_INT) (N))
#endif
#define plus_constant(X,C) plus_constant_wide (X, (HOST_WIDE_INT) (C))
#define plus_constant_for_output(X,C) \
plus_constant_for_output_wide (X, (HOST_WIDE_INT) (C))
extern rtx plus_constant_wide (), plus_constant_for_output_wide ();
#define GEN_INT(N) gen_rtx (CONST_INT, VOIDmode, (N))
extern rtx gen_rtx ();
extern char *xmalloc (); extern char *xmalloc ();
extern void free (); extern void free ();
extern rtx rtx_alloc (); extern rtx rtx_alloc ();
extern rtvec rtvec_alloc (); extern rtvec rtvec_alloc ();
extern rtx find_reg_note (); extern rtx find_reg_note ();
extern rtx find_regno_note (); extern rtx find_regno_note ();
extern int get_integer_term (); extern HOST_WIDE_INT get_integer_term ();
extern rtx get_related_value (); extern rtx get_related_value ();
extern rtx single_set (); extern rtx single_set ();
extern rtx find_last_value (); extern rtx find_last_value ();
extern rtx gen_rtx ();
extern rtx copy_rtx (); extern rtx copy_rtx ();
extern rtx copy_rtx_if_shared (); extern rtx copy_rtx_if_shared ();
extern rtx copy_most_rtx (); extern rtx copy_most_rtx ();
...@@ -623,7 +654,6 @@ extern enum rtx_code reverse_condition (); ...@@ -623,7 +654,6 @@ extern enum rtx_code reverse_condition ();
extern enum rtx_code swap_condition (); extern enum rtx_code swap_condition ();
extern enum rtx_code unsigned_condition (); extern enum rtx_code unsigned_condition ();
extern enum rtx_code signed_condition (); extern enum rtx_code signed_condition ();
extern rtx plus_constant (), plus_constant_for_output ();
extern rtx find_equiv_reg (); extern rtx find_equiv_reg ();
extern rtx squeeze_notes (); extern rtx squeeze_notes ();
extern rtx delete_insn (); extern rtx delete_insn ();
......
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