This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: converting real value to float
- To: amylaar at redhat dot com (Joern Rennecke)
- Subject: Re: converting real value to float
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 07 Jun 2001 22:33:47 -0700
- CC: gcc at gcc dot gnu dot org
- References: <Pine.SOL.3.91.1010514105551.2894C-100000@emperor.cygnus.com> <200106080342.f583g6B28543.cygnus.gcc@phal.cambridge.redhat.com>
amylaar@redhat.com (Joern Rennecke) writes:
> > You mean to say that these insns shouldn't get combined.
>
> There are other ways to solve this problem. Where the substituted-into
> rtl requires a mode (besides subreg, this includes at least also sign and
> zero extension), you could force the const_int into a const_double of the
> mode of the register that is replaced.
Lots of code relies on the current rule, which is that each value can
be expressed only one way, either as a CONST_INT or CONST_DOUBLE.
> Or you could remember the mode and simplify the mode-riquiring operation
> straight away. Although that could get you into problems when such
> expressions are nested.
This is how other code deals with the similar situation.
--
- Geoffrey Keating <geoffk@geoffk.org>