This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: TARGET_HARD_FLOAT for Single preciscion.
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Spundun Bhatt <spundun at ISI dot EDU>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 20 Jan 2004 14:55:54 -0800
- Subject: Re: TARGET_HARD_FLOAT for Single preciscion.
- References: <4005E67F.2010807@isi.edu>
Spundun Bhatt wrote:
I have a (hope fully) simple question to answer. I am porting gcc to an
architeture which suppports only Single preciscion floating points. So
my question is can I define TARGET_HARD_FLOAT and not define any of the
DFmode operations and will it work. I mean not defining insn templates
like movdf etc.
Yes, this works. The DFmode operations will be synthesized if they
don't exist. This works the exact same way as it does for a target with
no FPU at all.
You have the choice of using soft-float DFmode operations, or redefining
double to be a 32-bit FP type. I would recommend the first choice, but
you can find examples of both if you look at existing ports. See
TARGET_SINGLE_FLOAT in the mips port, and TARGET_FPU_SINGLE in the sh port.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com