diff options
author | Eric Christopher <echristo@redhat.com> | 2002-02-12 21:55:29 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gcc.gnu.org> | 2002-02-12 21:55:29 +0000 |
commit | d9b3eb63b2f690c056cecde5d6a4c79aaac942c9 (patch) | |
tree | f41f1bf612c600cbf4e4eb7c7e229aa46899fdf8 /gcc/explow.c | |
parent | 56d4428505c7dd85bf6a49dd9b22497331b39341 (diff) | |
download | gcc-d9b3eb63b2f690c056cecde5d6a4c79aaac942c9.zip gcc-d9b3eb63b2f690c056cecde5d6a4c79aaac942c9.tar.gz gcc-d9b3eb63b2f690c056cecde5d6a4c79aaac942c9.tar.bz2 |
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
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index 8a1b829..a72a03b 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -142,7 +142,7 @@ plus_constant_wide (x, c) Look for constant term in the sum and combine with C. For an integer constant term, we make a combined 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 something that we handle specially, such as a SYMBOL_REF. @@ -391,7 +391,7 @@ convert_memory_address (to_mode, x) case CONST: 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))); break; @@ -406,11 +406,11 @@ convert_memory_address (to_mode, x) || (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == CONST_INT && (INTVAL (XEXP (x, 1)) + 20000 < 40000 || 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, 1))); break; - + default: break; } @@ -670,12 +670,12 @@ copy_to_reg (x) rtx x; { rtx temp = gen_reg_rtx (GET_MODE (x)); - + /* If not an operand, must be an address with PLUS and MULT so - do the computation. */ + do the computation. */ if (! general_operand (x, VOIDmode)) x = force_operand (x, temp); - + if (x != temp) emit_move_insn (temp, x); @@ -701,9 +701,9 @@ copy_to_mode_reg (mode, x) rtx x; { rtx temp = gen_reg_rtx (mode); - + /* If not an operand, must be an address with PLUS and MULT so - do the computation. */ + do the computation. */ if (! general_operand (x, VOIDmode)) x = force_operand (x, temp); @@ -731,12 +731,12 @@ force_reg (mode, x) if (GET_CODE (x) == REG) return x; - + temp = gen_reg_rtx (mode); - + if (! general_operand (x, mode)) x = force_operand (x, NULL_RTX); - + insn = emit_move_insn (temp, x); /* Let optimizers know that TEMP's value never changes @@ -823,7 +823,7 @@ promote_mode (type, mode, punsignedp, for_call) unsignedp = POINTERS_EXTEND_UNSIGNED; break; #endif - + default: break; } @@ -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 - 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. */ void @@ -1096,7 +1096,7 @@ optimize_save_area_alloca (insns) /* If we do not see the note in a pattern matching 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 was defined on a machine where stacks grow towards higher @@ -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 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 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 @@ -1206,7 +1206,7 @@ allocate_dynamic_stack_space (size, target, known_align) if (MUST_ALIGN) size - = force_operand (plus_constant (size, + = force_operand (plus_constant (size, BIGGEST_ALIGNMENT / BITS_PER_UNIT - 1), NULL_RTX); @@ -1339,11 +1339,11 @@ allocate_dynamic_stack_space (size, target, known_align) rtx available; rtx space_available = gen_label_rtx (); #ifdef STACK_GROWS_DOWNWARD - available = expand_binop (Pmode, sub_optab, + available = expand_binop (Pmode, sub_optab, stack_pointer_rtx, stack_limit_rtx, NULL_RTX, 1, OPTAB_WIDEN); #else - available = expand_binop (Pmode, sub_optab, + available = expand_binop (Pmode, sub_optab, stack_limit_rtx, stack_pointer_rtx, NULL_RTX, 1, OPTAB_WIDEN); #endif @@ -1391,7 +1391,7 @@ allocate_dynamic_stack_space (size, target, known_align) GEN_INT (BIGGEST_ALIGNMENT / BITS_PER_UNIT), NULL_RTX, 1); } - + /* Some systems require a particular insn to refer to the stack to make the pages exist. */ #ifdef HAVE_probe @@ -1406,7 +1406,7 @@ allocate_dynamic_stack_space (size, target, known_align) 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 calling that routine. */ @@ -1436,7 +1436,7 @@ emit_stack_probe (address) 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 current stack pointer. STACK_GROWS_DOWNWARD says whether to add or subtract from the stack. If SIZE is constant, this is done @@ -1603,6 +1603,10 @@ hard_function_value (valtype, func, outgoing) unsigned HOST_WIDE_INT bytes = int_size_in_bytes (valtype); 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); tmpmode != VOIDmode; tmpmode = GET_MODE_WIDER_MODE (tmpmode)) @@ -1617,7 +1621,7 @@ hard_function_value (valtype, func, outgoing) abort (); PUT_MODE (val, tmpmode); - } + } return val; } |