This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] ARM half-precision floating point, 6/8 (ARM backend details)
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: GCC Patches s <gcc-patches at gcc dot gnu dot org>, Sandra Loosemore <sandra at codesourcery dot com>
- Date: Thu, 16 Apr 2009 09:43:24 +0200
- Subject: Re: [PATCH] ARM half-precision floating point, 6/8 (ARM backend details)
- References: <49E65EE5.firstname.lastname@example.org>
In fix_trunchfsi2 and fix_trunchfdi2:
> + (fix:SI (fix:HF (match_operand:HF 1 "general_operand" ""))))]
I know this is not used, but to be precise this would be float_extend:SF
instead of fix:HF.
> +FLOAT_MODE (HF, 2, 0);
This can probably go in the machine-independent parts.
Also, I came across the bug you fix in part 2 for my cond-optab work.
> 2009-04-15 Sandra Loosemore <email@example.com>
> * optabs.c (prepare_float_lib_cmp): Test that the comparison,
> swapped, and reversed optabs exist before trying to use them.
This will actually be unnecessary after the cond-optab merge. The bug
here is that can_compare_p tries widening the operand and says "we can
do UNLT by going through SFmode", so that UNLT is not split into
UNORDERED and LT. Then however prepare_cmp_insn does not try widening
and prepare_float_lib_cmp crashes when it tries HFmode because UNLT does
not have a libcall and hence an optab. On the branch, widening is tried
before libcalls, which works.
If I beat you to committing the branch, I'll ask you to try reverting
that part. If (as it is likely) you're first, I'll test whether I can
change this to an assert.