Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 21 Jan 2020 08:11:50 +1100 (AEDT)
From: Damian McGuckin <damianm@....com.au>
To: musl@...ts.openwall.com
Subject: Triggering Overflow (or Underflow) without triggering Inexact on
 i386


I am trying to write arithmetic expressions using only x87 instructions to 
trigger an exception.  The ASM instruction to raise the flag in the status 
register has way too much overhead.

My normal technique of doing either of these would also trigger Inexact.

e.g.
 	volatile long double t;

 	Overflow:  t = largest normal long double, t *= t;
 	Underflow:  t = smallest normal long double, t *= t;

Can it be triggered WITHOUT also triggering INEXACT?

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

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.