On Wed, Jun 12, 2013 at 10:53 AM, Alan Modra <amo...@gmail.com> wrote: > FLOAT_WORDS_BIG_ENDIAN doesn't work out too well for IBM extended > double when little-endian, because we're thinking to keep the large > magnitude double first. See the comment below on > LONG_DOUBLE_LARGE_FIRST. > > This patch fixes all occurrences of FLOAT_WORDS_BIG_ENDIAN in the > rs6000 backend (all of them are dealing with long doubles), and adds > an expander that results in us avoiding all current code in builtins.c > and optabs.c that uses FLOAT_WORDS_BIG_ENDIAN. Bootstrapped etc. > powerpc64-linux. signbittf2 is written to use the 64-bit shift when > available as this lets optimisers know the state of the high 32-bits, > and avoid a sign/zero extend if the SImode result is later extended to > DImode. > > * config/rs6000/rs6000.h (LONG_DOUBLE_LARGE_FIRST): Define. > * config/rs6000/rs6000.md (signbittf2): New insn. > (extenddftf2_internal): Use LONG_DOUBLE_LARGE_FIRST. > (abstf2_internal, cmptf_internal2): Likewise. > * config/rs6000/spe.md (spe_abstf2_cmp, spe_abstf2_tst): Likewise.
The patch is okay. That style of writing a pattern is not very common. Thanks, David