On 31/07/2013 12:25 PM, Paul Gilmartin wrote:
On Wed, 31 Jul 2013 08:57:08 +0800, David Crayford wrote:

Do you still get an 0C9 with FLOAT(IEEE)? I suspect not.

M&C says:

    0C9
           Fixed-point-divide exception. The reason code is 9.

... in agreement with the CEE3209S message text.  The generated
machine code is:

                            000009 |       *  I = 42 / I;
  000112  5800  D0A0        000009 |                 L        r0,I(,r13,160)
  000116  4160  002A        000009 |                 LA       r6,42
  00011A  8E60  0020        000009 |                 SRDA     r6,32
  00011E  1D60              000009 |                 DR       r6,r0
  000120  1807              000009 |                 LR       r0,r7
  000122  5000  D0A0        000009 |                 ST       r0,I(,r13,160)

... nary a FLOP in sight.  (Just an otiose LR.)  I'm not even going to
try IEEE.  (The source code is a couple plies back; be my guest.)

I was tricked! I should look more closely next time.

50332526      Floating point exception        ./overflow



(You mean IEEE *isn't* the default!?  I guess I'll put it in my Makefile.)

If you want it to be the default put it in a compiler stanza.


/usr/include/signal.h says:
         ...
     /* Flags returned in the si_code member of a siginfo_t      */
         ...
       #define FPE_INTDIV     31  /* SIGFPE caused by an integer *
                                   *  divide by zero             */
       #define FPE_INTOVF     32  /* SIGFPE caused by an integer *
                                   *  overflow                   */

... It appears that SIGFPE (Floating point exception) is being used as
a catch-all for any arithmetic exception.  Except fixed-point overflow,
which is ignored, notwithstanding the definition of FPE_INTOVF.


I wonder if FPE_INTOVF is there for some kind of library code? I can't think of a case where C or C++ compilers would ever generate exeptions for integer overflow.

On 31/07/2013, at 8:53 AM, Paul Gilmartin wrote:
CEE3209S The system detected a fixed-point divide exception (System Completion 
Code=0C9).
         From entry point main at compile unit offset +00000096 at entry offset 
+00000096 at address 47F089BE.
[1] + Done(136) ( gmake overflow 2>&1 | tee log ) && ./overflow
  50332526      Floating point exception        ./overflow

"Floating point"?  Oh, well.
-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to