<html><body>
<p><font size="2" face="sans-serif">In addition to trapping, the PowerPC architecture allows compilers to detect any exceptions including underflow by using a slightly different opcode then a conditional branch. &nbsp;If trapping on exceptions was already turned on then doing it this way requires turning it off for the duration.</font><br>
<br>
<font size="2" face="sans-serif">- Ian McIntosh &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IBM Canada Lab &nbsp; &nbsp; &nbsp; &nbsp; Compiler Back End Support and Development<br>
</font><br>
<br>
<img width="16" height="16" src="cid:1__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt="Inactive hide details for Jim Thomas ---2014-06-04 03:33:20 PM---So 754-2008 does not explicitly recommendation a means to dete"><font size="2" color="#424282" face="sans-serif">Jim Thomas ---2014-06-04 03:33:20 PM---So 754-2008 does not explicitly recommendation a means to detect underflow exceptions, but its recom</font><br>
<br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">From:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">Jim Thomas &lt;jaswthomas@sbcglobal.net&gt;</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">To:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">CFP &lt;cfp-interest@ucbtest.org&gt;, </font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">Date:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">2014-06-04 03:33 PM</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">Subject:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">Re: [Cfp-interest] exceptions and flags</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">Sent by:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF67EDFFD5DDC8f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">cfp-interest-bounces@oakapple.net</font></td></tr>
</table>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt><font size="2">So 754-2008 does not explicitly recommendation a means to detect underflow exceptions, but its recommendation that languages provide alternate exception handling entails detecting underflow exceptions. Maybe Part 5 could leave detection of tiny exact underflow cases as a recommended option, which would allow the simpler slower implementation using flags.<br>
<br>
-Jim<br>
<br>
On Jun 3, 2014, at 9:32 PM, David Hough CFP &lt;pcfp@oakapple.net&gt; wrote:<br>
<br>
&gt;&gt; Does all HW provide a way for SW to detect an underflow exception?<br>
&gt; <br>
&gt; The only way I know is to enable the underflow trap. &nbsp; &nbsp;If the trap works<br>
&gt; as recommended by 754-1985, then that suffices.<br>
&gt; <br>
&gt; But 754-1985 chapter 8 only recommends traps (to implementations) while<br>
&gt; 754-2008 chapter 8 only recommends alternate exception handling (to languages).<br>
&gt; Alternate exception handling replaces traps as far as programming environments<br>
&gt; go, but the traps are still a very likely implementation mechanism.<br>
<br>
<br>
_______________________________________________<br>
Cfp-interest mailing list<br>
Cfp-interest@oakapple.net<br>
</font></tt><tt><font size="2"><a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest">http://mailman.oakapple.net/mailman/listinfo/cfp-interest</a></font></tt><tt><font size="2"><br>
<br>
</font></tt><br>
<br>
</body></html>