Commit d9b3eb63 by Eric Christopher Committed by Eric Christopher

explow.c (hard_function_value): Add comment explaining signed/unsigned comparison.

2002-02-12  Eric Christopher  <echristo@redhat.com>

	* explow.c (hard_function_value): Add comment explaining
	signed/unsigned comparison.

From-SVN: r49714
parent 56d44285
2002-02-12 Eric Christopher <echristo@redhat.com>
* explow.c (hard_function_value): Add comment explaining
signed/unsigned comparison.
2002-02-12 Jakub Jelinek <jakub@redhat.com> 2002-02-12 Jakub Jelinek <jakub@redhat.com>
* jump.c (never_reached_warning): Add finish argument. * jump.c (never_reached_warning): Add finish argument.
...@@ -158,7 +163,7 @@ Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz> ...@@ -158,7 +163,7 @@ Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz>
* config/sh/sh.c (expand_prologue): Fix mis-applied 2001-11-09's * config/sh/sh.c (expand_prologue): Fix mis-applied 2001-11-09's
patch. patch.
Contribute sh64-elf. Contribute sh64-elf.
2002-02-09 Alexandre Oliva <aoliva@redhat.com> 2002-02-09 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (TARGET_CANNOT_MODIFY_JUMPS_P): Define to... * config/sh/sh.c (TARGET_CANNOT_MODIFY_JUMPS_P): Define to...
...@@ -559,7 +564,7 @@ Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz> ...@@ -559,7 +564,7 @@ Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz>
2000-12-26 Alexandre Oliva <aoliva@redhat.com> 2000-12-26 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.md (movdi_media split): Don't add REG_LABEL notes. * config/sh/sh.md (movdi_media split): Don't add REG_LABEL notes.
Increment LABEL_NUSES. Increment LABEL_NUSES.
* config/sh/sh.h (SIZE_TYPE): Define as conditional on * config/sh/sh.h (SIZE_TYPE): Define as conditional on
TARGET_SH5. TARGET_SH5.
(SUBTARGET_CPP_SPEC): Arrange for __SIZE_TYPE__ to be always (SUBTARGET_CPP_SPEC): Arrange for __SIZE_TYPE__ to be always
...@@ -664,7 +669,7 @@ Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz> ...@@ -664,7 +669,7 @@ Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz>
(call_media, call_value_media, sibcall_media): Use (call_media, call_value_media, sibcall_media): Use
target_reg_operand instead of target_operand. target_reg_operand instead of target_operand.
2000-12-13 Alexandre Oliva <aoliva@redhat.com> 2000-12-13 Alexandre Oliva <aoliva@redhat.com>
* glimits.h (__LONG_MAX__) [SH5 == 64]: Adjust for 64 bits. * glimits.h (__LONG_MAX__) [SH5 == 64]: Adjust for 64 bits.
* config/sh/sh.c (target_reg_operand): Match hardware registers * config/sh/sh.c (target_reg_operand): Match hardware registers
other than branch-target registers. other than branch-target registers.
* config/sh/sh.md (zero_extendqidi2): Input operand is %1. * config/sh/sh.md (zero_extendqidi2): Input operand is %1.
......
...@@ -142,7 +142,7 @@ plus_constant_wide (x, c) ...@@ -142,7 +142,7 @@ plus_constant_wide (x, c)
Look for constant term in the sum and combine Look for constant term in the sum and combine
with C. For an integer constant term, we make a combined with C. For an integer constant term, we make a combined
integer. For a constant term that is not an explicit integer, integer. For a constant term that is not an explicit integer,
we cannot really combine, but group them together anyway. we cannot really combine, but group them together anyway.
Restart or use a recursive call in case the remaining operand is Restart or use a recursive call in case the remaining operand is
something that we handle specially, such as a SYMBOL_REF. something that we handle specially, such as a SYMBOL_REF.
...@@ -391,7 +391,7 @@ convert_memory_address (to_mode, x) ...@@ -391,7 +391,7 @@ convert_memory_address (to_mode, x)
case CONST: case CONST:
if (POINTERS_EXTEND_UNSIGNED >= 0) if (POINTERS_EXTEND_UNSIGNED >= 0)
return gen_rtx_CONST (to_mode, return gen_rtx_CONST (to_mode,
convert_memory_address (to_mode, XEXP (x, 0))); convert_memory_address (to_mode, XEXP (x, 0)));
break; break;
...@@ -406,11 +406,11 @@ convert_memory_address (to_mode, x) ...@@ -406,11 +406,11 @@ convert_memory_address (to_mode, x)
|| (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == CONST_INT || (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == CONST_INT
&& (INTVAL (XEXP (x, 1)) + 20000 < 40000 && (INTVAL (XEXP (x, 1)) + 20000 < 40000
|| CONSTANT_P (XEXP (x, 0)))))) || CONSTANT_P (XEXP (x, 0))))))
return gen_rtx_fmt_ee (GET_CODE (x), to_mode, return gen_rtx_fmt_ee (GET_CODE (x), to_mode,
convert_memory_address (to_mode, XEXP (x, 0)), convert_memory_address (to_mode, XEXP (x, 0)),
convert_memory_address (to_mode, XEXP (x, 1))); convert_memory_address (to_mode, XEXP (x, 1)));
break; break;
default: default:
break; break;
} }
...@@ -670,12 +670,12 @@ copy_to_reg (x) ...@@ -670,12 +670,12 @@ copy_to_reg (x)
rtx x; rtx x;
{ {
rtx temp = gen_reg_rtx (GET_MODE (x)); rtx temp = gen_reg_rtx (GET_MODE (x));
/* If not an operand, must be an address with PLUS and MULT so /* If not an operand, must be an address with PLUS and MULT so
do the computation. */ do the computation. */
if (! general_operand (x, VOIDmode)) if (! general_operand (x, VOIDmode))
x = force_operand (x, temp); x = force_operand (x, temp);
if (x != temp) if (x != temp)
emit_move_insn (temp, x); emit_move_insn (temp, x);
...@@ -701,9 +701,9 @@ copy_to_mode_reg (mode, x) ...@@ -701,9 +701,9 @@ copy_to_mode_reg (mode, x)
rtx x; rtx x;
{ {
rtx temp = gen_reg_rtx (mode); rtx temp = gen_reg_rtx (mode);
/* If not an operand, must be an address with PLUS and MULT so /* If not an operand, must be an address with PLUS and MULT so
do the computation. */ do the computation. */
if (! general_operand (x, VOIDmode)) if (! general_operand (x, VOIDmode))
x = force_operand (x, temp); x = force_operand (x, temp);
...@@ -731,12 +731,12 @@ force_reg (mode, x) ...@@ -731,12 +731,12 @@ force_reg (mode, x)
if (GET_CODE (x) == REG) if (GET_CODE (x) == REG)
return x; return x;
temp = gen_reg_rtx (mode); temp = gen_reg_rtx (mode);
if (! general_operand (x, mode)) if (! general_operand (x, mode))
x = force_operand (x, NULL_RTX); x = force_operand (x, NULL_RTX);
insn = emit_move_insn (temp, x); insn = emit_move_insn (temp, x);
/* Let optimizers know that TEMP's value never changes /* Let optimizers know that TEMP's value never changes
...@@ -823,7 +823,7 @@ promote_mode (type, mode, punsignedp, for_call) ...@@ -823,7 +823,7 @@ promote_mode (type, mode, punsignedp, for_call)
unsignedp = POINTERS_EXTEND_UNSIGNED; unsignedp = POINTERS_EXTEND_UNSIGNED;
break; break;
#endif #endif
default: default:
break; break;
} }
...@@ -1010,9 +1010,9 @@ emit_stack_save (save_level, psave, after) ...@@ -1010,9 +1010,9 @@ emit_stack_save (save_level, psave, after)
} }
/* Restore the stack pointer for the purpose in SAVE_LEVEL. SA is the save /* Restore the stack pointer for the purpose in SAVE_LEVEL. SA is the save
area made by emit_stack_save. If it is zero, we have nothing to do. area made by emit_stack_save. If it is zero, we have nothing to do.
Put any emitted insns after insn AFTER, if nonzero, otherwise at Put any emitted insns after insn AFTER, if nonzero, otherwise at
current position. */ current position. */
void void
...@@ -1096,7 +1096,7 @@ optimize_save_area_alloca (insns) ...@@ -1096,7 +1096,7 @@ optimize_save_area_alloca (insns)
/* If we do not see the note in a pattern matching /* If we do not see the note in a pattern matching
these precise characteristics, we did something these precise characteristics, we did something
entirely wrong in allocate_dynamic_stack_space. entirely wrong in allocate_dynamic_stack_space.
Note, one way this could happen is if SETJMP_VIA_SAVE_AREA Note, one way this could happen is if SETJMP_VIA_SAVE_AREA
was defined on a machine where stacks grow towards higher was defined on a machine where stacks grow towards higher
...@@ -1187,7 +1187,7 @@ allocate_dynamic_stack_space (size, target, known_align) ...@@ -1187,7 +1187,7 @@ allocate_dynamic_stack_space (size, target, known_align)
/* We will need to ensure that the address we return is aligned to /* We will need to ensure that the address we return is aligned to
BIGGEST_ALIGNMENT. If STACK_DYNAMIC_OFFSET is defined, we don't BIGGEST_ALIGNMENT. If STACK_DYNAMIC_OFFSET is defined, we don't
always know its final value at this point in the compilation (it always know its final value at this point in the compilation (it
might depend on the size of the outgoing parameter lists, for might depend on the size of the outgoing parameter lists, for
example), so we must align the value to be returned in that case. example), so we must align the value to be returned in that case.
(Note that STACK_DYNAMIC_OFFSET will have a default non-zero value if (Note that STACK_DYNAMIC_OFFSET will have a default non-zero value if
...@@ -1206,7 +1206,7 @@ allocate_dynamic_stack_space (size, target, known_align) ...@@ -1206,7 +1206,7 @@ allocate_dynamic_stack_space (size, target, known_align)
if (MUST_ALIGN) if (MUST_ALIGN)
size size
= force_operand (plus_constant (size, = force_operand (plus_constant (size,
BIGGEST_ALIGNMENT / BITS_PER_UNIT - 1), BIGGEST_ALIGNMENT / BITS_PER_UNIT - 1),
NULL_RTX); NULL_RTX);
...@@ -1339,11 +1339,11 @@ allocate_dynamic_stack_space (size, target, known_align) ...@@ -1339,11 +1339,11 @@ allocate_dynamic_stack_space (size, target, known_align)
rtx available; rtx available;
rtx space_available = gen_label_rtx (); rtx space_available = gen_label_rtx ();
#ifdef STACK_GROWS_DOWNWARD #ifdef STACK_GROWS_DOWNWARD
available = expand_binop (Pmode, sub_optab, available = expand_binop (Pmode, sub_optab,
stack_pointer_rtx, stack_limit_rtx, stack_pointer_rtx, stack_limit_rtx,
NULL_RTX, 1, OPTAB_WIDEN); NULL_RTX, 1, OPTAB_WIDEN);
#else #else
available = expand_binop (Pmode, sub_optab, available = expand_binop (Pmode, sub_optab,
stack_limit_rtx, stack_pointer_rtx, stack_limit_rtx, stack_pointer_rtx,
NULL_RTX, 1, OPTAB_WIDEN); NULL_RTX, 1, OPTAB_WIDEN);
#endif #endif
...@@ -1391,7 +1391,7 @@ allocate_dynamic_stack_space (size, target, known_align) ...@@ -1391,7 +1391,7 @@ allocate_dynamic_stack_space (size, target, known_align)
GEN_INT (BIGGEST_ALIGNMENT / BITS_PER_UNIT), GEN_INT (BIGGEST_ALIGNMENT / BITS_PER_UNIT),
NULL_RTX, 1); NULL_RTX, 1);
} }
/* Some systems require a particular insn to refer to the stack /* Some systems require a particular insn to refer to the stack
to make the pages exist. */ to make the pages exist. */
#ifdef HAVE_probe #ifdef HAVE_probe
...@@ -1406,7 +1406,7 @@ allocate_dynamic_stack_space (size, target, known_align) ...@@ -1406,7 +1406,7 @@ allocate_dynamic_stack_space (size, target, known_align)
return target; return target;
} }
/* A front end may want to override GCC's stack checking by providing a /* A front end may want to override GCC's stack checking by providing a
run-time routine to call to check the stack, so provide a mechanism for run-time routine to call to check the stack, so provide a mechanism for
calling that routine. */ calling that routine. */
...@@ -1436,7 +1436,7 @@ emit_stack_probe (address) ...@@ -1436,7 +1436,7 @@ emit_stack_probe (address)
emit_move_insn (memref, const0_rtx); emit_move_insn (memref, const0_rtx);
} }
/* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive. /* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive.
FIRST is a constant and size is a Pmode RTX. These are offsets from the FIRST is a constant and size is a Pmode RTX. These are offsets from the
current stack pointer. STACK_GROWS_DOWNWARD says whether to add or current stack pointer. STACK_GROWS_DOWNWARD says whether to add or
subtract from the stack. If SIZE is constant, this is done subtract from the stack. If SIZE is constant, this is done
...@@ -1603,6 +1603,10 @@ hard_function_value (valtype, func, outgoing) ...@@ -1603,6 +1603,10 @@ hard_function_value (valtype, func, outgoing)
unsigned HOST_WIDE_INT bytes = int_size_in_bytes (valtype); unsigned HOST_WIDE_INT bytes = int_size_in_bytes (valtype);
enum machine_mode tmpmode; enum machine_mode tmpmode;
/* int_size_in_bytes can return -1. We don't need a check here
since the value of bytes will be large enough that no mode
will match and we will abort later in this function. */
for (tmpmode = GET_CLASS_NARROWEST_MODE (MODE_INT); for (tmpmode = GET_CLASS_NARROWEST_MODE (MODE_INT);
tmpmode != VOIDmode; tmpmode != VOIDmode;
tmpmode = GET_MODE_WIDER_MODE (tmpmode)) tmpmode = GET_MODE_WIDER_MODE (tmpmode))
...@@ -1617,7 +1621,7 @@ hard_function_value (valtype, func, outgoing) ...@@ -1617,7 +1621,7 @@ hard_function_value (valtype, func, outgoing)
abort (); abort ();
PUT_MODE (val, tmpmode); PUT_MODE (val, tmpmode);
} }
return val; return val;
} }
......
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