This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Sign-extend CONST_INTs within their modes
- To: aoliva at redhat dot com
- Subject: Re: Sign-extend CONST_INTs within their modes
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: Mon, 2 Apr 2001 16:12:36 -0700
- CC: gcc-patches at gcc dot gnu dot org, bob dot koninckx at mech dot kuleuven dot ac dot be
- References: <org0gb1tmu.fsf@guarana.lsd.ic.unicamp.br><jmbsqzv7bi.fsf@geoffk.org> <or4rwb5pi2.fsf@guarana.lsd.ic.unicamp.br>
- Reply-to: Geoff Keating <geoffk at redhat dot com>
> Cc: gcc-patches@gcc.gnu.org, Bob Koninckx <bob.koninckx@mech.kuleuven.ac.be>
> From: Alexandre Oliva <aoliva@redhat.com>
> Date: 30 Mar 2001 10:56:53 -0300
> Index: gcc/ChangeLog
> from Alexandre Oliva <aoliva@redhat.com>
>
> * recog.c (general_operand, immediate_operand,
> nonmemory_operand): Require CONST_INTs to be sign-extended
> values for their modes.
> * combine.c (try_combine): Avoid generating a new set in i2
> that changes the expected mode of a CONST_INT.
> * expmed.c (store_bit_field): Truncate CONST_INTs.
> (expand_mult_highpart, expand_divmod): Likewise.
> * expr.c (convert_modes, store_field): Likewise.
> * integrate.c (expand_inline_function): Use promote_mode() to
> determine whether to convert_modes() an argument as signed
> or unsigned.
> * optabs.c (expand_binop): Get CONST_INT operands
> sign-extended for their appropriate modes.
> * stmt.c (emit_case_nodes): Convert node values to the
> appropriate mode.
> (expand_end_case): Convert minval and range to the appropriate
> mode.
> * unroll.c (loop_iterations): Truncate abs_diff to the mode of
> the iteration variable.
> * varasm.c (immed_double_const): Don't require words to be
> narrower than host wide ints to properly sign-extend
> CONST_INTs.
...
* config/rs6000/rs6000.c (logical_operand): CONST_INTs are
already sign-extended.
(rs6000_emit_move): Don't special-case HOST_BITS_PER_WIDE_INT != 32.
(rs6000_emit_prologue): Make register iterator signed.
(rs6000_emit_epilogue): Likewise.
* config/rs6000/rs6000.md (addsi3, adddi3): Sign-extend high
and low.
(movsf split, movdf split): Sign-extend CONST_INTs.
(movdi splits): Likewise.
This is OK, please commit it.
--
- Geoffrey Keating <geoffk@geoffk.org>