From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Dibyendu Majumdar <mobile@majumdar.org.uk>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: sparse-llvm op_fpcast implementation missing
Date: Sun, 12 Mar 2017 20:49:40 +0100 [thread overview]
Message-ID: <20170312194939.7xpggjpoki7uzs6o@macpro.local> (raw)
In-Reply-To: <CACXZuxcpYWZYy-XwbBWWS6si4cdfnxFXAHsthsAeMKijWZeNzg@mail.gmail.com>
On Sun, Mar 12, 2017 at 12:04:43PM +0000, Dibyendu Majumdar wrote:
> On 12 March 2017 at 00:01, Luc Van Oostenryck
> <luc.vanoostenryck@gmail.com> wrote:
> > On Sat, Mar 11, 2017 at 11:53:53PM +0000, Dibyendu Majumdar wrote:
> >> Following test fails:
> >>
> >> int main(void)
> >> {
> >> float f = 'a';
> >> float g = 97;
> >> printf("%f %f\n", f, g);
> >> return 0;
> >> }
> >
> > Just for info, there is a lot of things missing or incorrect with
> > floating-points and I'm not speaking of the llvm part but of
> > sparse itself.
> >
> > I have some test cases somewhere in one of my topic branches
> > but this is very very low priority to me.
> >
>
> Ok no problem. I have tried to add partial support for FPCAST and
> SETVAL in my project. Here is the commit:
>
> https://github.com/dibyendumajumdar/dmr_c/commit/b95d54c9555ccf9e230edea5c1a3701172b7b1e2
>
> Please let me know if this looks reasonable.
The idea is there, yes.
I just saw two minor things for OP_FPCAST:
- you consider all intergers as signed / there is no support for
unsigned integer to float (LLVMUIToFP I suppose).
- you're making the assumption sizeof(float) == 32, sizeof(double) == 64
while these things are defined by the data layout
-- Luc Van Oostenryck
prev parent reply other threads:[~2017-03-12 19:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 23:53 sparse-llvm op_fpcast implementation missing Dibyendu Majumdar
2017-03-12 0:01 ` Luc Van Oostenryck
2017-03-12 12:04 ` Dibyendu Majumdar
2017-03-12 19:49 ` Luc Van Oostenryck [this message]
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=20170312194939.7xpggjpoki7uzs6o@macpro.local \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.org \
--cc=mobile@majumdar.org.uk \
/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).