public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: rearnsha@arm.com
To: gcc-gnats@gcc.gnu.org
Cc: <roger@eyesopen.com>
Subject: middle-end/9009: floating-point negate and abs optimizations incorrect for ARM
Date: Thu, 19 Dec 2002 09:36:00 -0000	[thread overview]
Message-ID: <20021219173534.25089.qmail@sources.redhat.com> (raw)


>Number:         9009
>Category:       middle-end
>Synopsis:       floating-point negate and abs optimizations incorrect for ARM
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 19 09:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Richard Earnshaw
>Release:        unknown-1.0
>Organization:
>Environment:
arm-elf cross
>Description:
Testsuite gcc.c-torture/exectue/930614-1.c fails after this patch:

2002-12-07  Roger Sayle  <roger@eyesopen.com>

        * real.h (real_format): Add signbit field.
        * real.c (ieee_single_format, ieee_double_format,
        ieee_extended_motorola_format, ieee_extended_intel_96_format,
        ieee_extended_intel_128_format, ibm_extended_format,
        ieee_quad_format, vax_f_format, vax_d_format,
        vax_g_format, i370_single_format, i370_double_format,
        c4x_single_format, c4x_extended_format, real_internal_format):
        Provide suitable signbit value, or -1 to avoid bit twiddling.

        * optabs.c (expand_unop): Try implementing negation of
        floating point modes by flipping the sign bit.
        (expand_abs): Try implementing abs of floating point modes
        by clearing the sign bit.

>How-To-Repeat:
Run the testsuite
>Fix:
The reason for the failure is that on an ARM little-endian system the floating-point sign bit is in the lowest addressed word (that is, the sign bit is at position 31 (not 63) when the floating point value is considered as a 'long long' (ARM FPA double format is motorola word order, even when the system is little-endian).

The code needs to take this into account (FLOAT_WORDS_BIG_ENDIAN != WORDS_BIG_ENDIAN) => the hi and lo fields should be swapped over.
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-12-19 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-19  9:36 rearnsha [this message]
2002-12-19  9:37 rearnsha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021219173534.25089.qmail@sources.redhat.com \
    --to=rearnsha@arm.com \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=roger@eyesopen.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).