9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Forsyth <charles.forsyth@gmail.com>
To: lucio@proxima.alt.za,
	Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] ARM compiler shortcoming?
Date: Sat, 29 Oct 2011 16:32:45 +0100	[thread overview]
Message-ID: <CAOw7k5ho=y-6azAAqbJ0o9TyGFVW6LtQFxhzCeQw07C=6GezFw@mail.gmail.com> (raw)
In-Reply-To: <4cdfdc69c18eaaf525552885049926cf@proxima.alt.za>

i've got a 5[acl] tucked away that does 64-bit operations, although
i think that particular case can be fixed more simply.

On 29 October 2011 16:29, Lucio De Re <lucio@proxima.alt.za> wrote:
> My guess is that the ARM compiler does not like 64-bit values in
> conditional expressions.  The following C snippet:
>
>        typedef unsigned long long      uvlong;
>
>        uvlong uvinf    = ((uvlong)0x7FF00000<<32)|0x00000000;
>        uvlong uvneginf = ((uvlong)0xFFF00000<<32)|0x00000000;
>
>        double u2d(uvlong v);
>
>        double
>        __Inf(int sign)
>        {
>                return u2d(sign < 0 ? uvneginf : uvinf);
>        }
>
> compiled with 8c seems OK, but with 5c causes an error:
>
>        % 5c -FTVw /tmp/nan64.c
>        /tmp/nan64.c:11 unknown vlong LIST
>
> Using an if statement seems to get rid of the problem.
>
> ++L
>
>
>



  parent reply	other threads:[~2011-10-29 15:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29 15:29 Lucio De Re
2011-10-29 15:25 ` erik quanstrom
2011-10-29 16:18   ` Lucio De Re
2011-10-29 16:28     ` Charles Forsyth
2011-10-29 16:42       ` Lucio De Re
2011-10-29 15:32 ` Charles Forsyth [this message]
2011-10-29 16:09   ` Lucio De Re
2011-10-29 16:09     ` Charles Forsyth
2011-10-29 16:40       ` Lucio De Re
2011-10-29 15:54 ` Charles Forsyth
2011-10-29 16:08   ` Lucio De Re

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='CAOw7k5ho=y-6azAAqbJ0o9TyGFVW6LtQFxhzCeQw07C=6GezFw@mail.gmail.com' \
    --to=charles.forsyth@gmail.com \
    --cc=9fans@9fans.net \
    --cc=lucio@proxima.alt.za \
    /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 NNTP newsgroup(s).