title: On which platforms does integer divide by zero trigger a floating point exception?
body: <p>In another question, someone was wondering why they were getting a "floating point error" when in fact they had an integer divide-by-zero in their C++ program. A discussion arose around this, with some asserting that floating point exceptions are in fact never raised for <em>float</em> divide by zero, but only arise on <em>integer</em> divide by zero.</p>
  
  <p>This sounds strange to me, because I know that:</p>
  
  <ol>
  <li><p>MSVC-compiled code on x86 and x64 on all Windows platforms reports an int divide by zero as "0xc0000094: Integer division by zero", and float divide by zero as 0xC000008E "Floating-point division by zero" (when enabled) </p></li>
  <li><p><a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf" rel="noreferrer">IA-32 and AMD64</a> ISAs specify <a href="http://www.felixcloutier.com/x86/DIV.html" rel="noreferrer"><code>#DE</code> (integer divide exception)</a> as interrupt 0.  Floating-point exceptions trigger interrupt 16 (x87 floating-point) or interrupt 19 (SIMD floating-point).</p></li>
  <li><p>Other hardware have similarly different interrupts (<em>eg</em> PPC raises 0x7000 on float-div-by-zero and doesn't trap for int/0 at all).</p></li>
  <li><p>Our application unmasks floating-point exceptions for divide-by-zero with the <code>_controlfp_s</code> intrinsic (ultimately <code>stmxcsr</code> op) and then catches them for debugging purposes. So I have definitely seen IEEE754 divide-by-zero exceptions in practice.</p></li>
  </ol>
  
  <p>So I conclude that there are some platforms that report int exceptions as floating point exceptions, such as <a href="https://stackoverflow.com/questions/16928942/why-does-integer-division-by-zero-result-in-a-floating-point-exception">x64 Linux (raising SIGFPE for all arithmetic errors regardless of ALU pipe)</a>. </p>
  
  <p>What other operating systems (or C/C++ runtimes if you <em>are</em> the operating system) report integer div-by-zero as a floating point exception?</p>