Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 14 Jan 2020 13:58:35 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Q: dealing with missing removal of excess precision

On Tue, Jan 14, 2020 at 07:50:58PM +0100, Szabolcs Nagy wrote:
> * Alexander Monakov <amonakov@...ras.ru> [2020-01-14 21:17:55 +0300]:
> > What to do with functions that return values with excess precision from asm?
> > 
> > Many of the remaining x87-based asm implementations do not remove excess
> > precision on return. This looks like a bug, but matches Glibc behavior.
> > Moving such functions to C would either introduce removal of excess precision,
> > or result in code that lies to the compiler by pretending that inline asm keeps
> > values within precision of float/double, where in reality it might not.
> 
> the intention is to remove excess precision so it's good that's happening.

Agreed. It may be a slight performance regression but it's the right
thing to do anyway.

> otoh it would be nice if there was a way to tell the compiler not to
> remove it (e.g. in case the asm already took care of it) even in c99
> standard mode.

Perhaps this happens if the output constraint is tied to a float
rather than a long double?

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.