This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: converting real value to float


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]