comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <condicma@bogon.pwfl.com>
Subject: Re: Ada and Java. different behaviour. casting long to int problem.
Date: 1999/06/24
Date: 1999-06-24T00:00:00+00:00	[thread overview]
Message-ID: <37725122.9D7E21E0@pwfl.com> (raw)
In-Reply-To: wccvhcdpskq.fsf@world.std.com

Robert A Duff wrote:
> It's not clear what sort of "data conversion" they're talking about in
> the report.  Is it an Ada type_conversion, as in "Integer(Some_Float)"?
> Or is it a subroutine that's doing something similar -- that could
> explain the "Operand Error" -- maybe the subroutine raises that
> exception.

In the 1750a, there is a FIX opcode which converts the integer portion
of the derived operand to a 16 bit integer (EFIX for extended precision
to 32 bit integer). If the conversion results in a number that is too
large, the condition status register is set and a Fixed Point Overflow
interrupt is triggered. I looked for references to "Operand Error" but
my Fairchild book doesn't seem to have any. My best guess is this is
what triggered the problem.

> 
> > It is possible that they meant having a "begin exception end" block
> > around the computation, but you don't usually see people doing that.
> > There's usually an exception handler at the end which catches all the
> > errors. And since the handler in and of itself is not (usually) run-time
> > intrusive, there would be no reason to remove the handler in the
> > interest of efficiency.
> 
> Unless they were worried about space efficiency.
> 
In a space based Mil-Std-1750a microprocessor, you almost invariably run
out of time *way* before you run out of space. :-) 

> It does seem strange that they would eliminate the exception handler,
> but not eliminate the code that raises the exception, if they were that
> worried about efficiency.  Which makes me think that it must have been a
> hardware-detected exception.  But that would raise Constraint_Error, not
> some user-defined thing called "Operand_Error".  Strange.

That's why I was convinced they were dealing with something that
triggered an interrupt and that the interrupt handler was not generating
an Ada exception, but rather going through some failure accommodation
logic.

If this conversation keeps up, I'm going to have to go re-read the
report. ;-)


MDC
-- 
Marin David Condic
Real Time & Embedded Systems, Propulsion Systems Analysis
United Technologies, Pratt & Whitney, Large Military Engines
M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600
***To reply, remove "bogon" from the domain name.***

Visit my web page at: http://www.mcondic.com/




  reply	other threads:[~1999-06-24  0:00 UTC|newest]

Thread overview: 120+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-12  0:00 Ada and Java. different behaviour. casting long to int problem nabbasi
1999-06-12  0:00 ` Tucker Taft
1999-06-12  0:00   ` Keith Thompson
1999-06-12  0:00     ` kirck
1999-06-13  0:00       ` Robert Dewar
1999-06-12  0:00         ` Fred
1999-06-14  0:00           ` Mark Hood
1999-06-15  0:00             ` mike
1999-06-15  0:00               ` Samuel Mize
1999-06-15  0:00                 ` jerry
1999-06-16  0:00                   ` Richard D Riehle
1999-06-16  0:00                     ` jerry
1999-06-15  0:00               ` Marin David Condic
1999-06-15  0:00                 ` Mike Silva
1999-06-15  0:00                   ` rich
1999-06-15  0:00                     ` Marin David Condic
1999-06-15  0:00                       ` D'Arcy Smith
1999-06-15  0:00                         ` Keith Thompson
1999-06-16  0:00                           ` D'Arcy Smith
1999-06-16  0:00                           ` bill
1999-06-16  0:00                             ` George W. Bayles
1999-06-16  0:00                               ` Fraser Wilson
1999-06-17  0:00                               ` Chris Dollin
1999-06-17  0:00                               ` Aidan Skinner
1999-06-17  0:00                                 ` David Botton
1999-06-18  0:00                                   ` Dale Stanbrough
1999-06-18  0:00                                     ` Matthew Heaney
1999-06-18  0:00                                     ` David Botton
1999-06-18  0:00                                       ` Pascal Obry
1999-07-20  0:00                             ` Geoff Bull
1999-06-16  0:00                         ` Mike Silva
1999-06-16  0:00                           ` D'Arcy Smith
1999-06-16  0:00                             ` kirk
1999-06-16  0:00                               ` D'Arcy Smith
1999-06-17  0:00                                 ` Markus Kuhn
1999-06-17  0:00                                   ` john
1999-06-17  0:00                                     ` Ed Falis
1999-06-18  0:00                                     ` Aidan Skinner
1999-06-17  0:00                                   ` D'Arcy Smith
1999-06-16  0:00                               ` Hyman Rosen
1999-06-17  0:00                                 ` Robert I. Eachus
1999-06-17  0:00                                   ` Hyman Rosen
1999-06-17  0:00                                     ` bob
1999-06-18  0:00                                       ` Hyman Rosen
1999-06-18  0:00                                         ` mike
1999-06-18  0:00                                           ` Hyman Rosen
1999-06-19  0:00                                             ` Dale Stanbrough
1999-06-21  0:00                                               ` Marin David Condic
1999-06-19  0:00                                             ` Samuel Mize
1999-06-21  0:00                                               ` Marin David Condic
1999-06-21  0:00                                             ` Mike Silva
1999-06-17  0:00                                     ` Marin David Condic
1999-06-17  0:00                                 ` Markus Kuhn
1999-06-17  0:00                                 ` Jean-Pierre Rosen
1999-06-17  0:00                                   ` Marin David Condic
1999-06-17  0:00                                     ` Samuel Mize
1999-06-17  0:00                                       ` Marin David Condic
1999-06-22  0:00                                         ` Hyman Rosen
1999-06-22  0:00                                           ` Keith Thompson
1999-06-23  0:00                                             ` Marin David Condic
1999-06-24  0:00                                               ` Robert A Duff
1999-06-24  0:00                                                 ` Marin David Condic [this message]
1999-06-23  0:00                                           ` Marin David Condic
1999-06-18  0:00                                       ` Aidan Skinner
1999-06-20  0:00                                 ` Sera Hirasuna
1999-06-19  0:00                                   ` Kio
1999-06-20  0:00                                   ` Vladimir Olensky
1999-06-21  0:00                                   ` Samuel T. Harris
1999-06-22  0:00                                     ` Richard D Riehle
1999-06-22  0:00                                     ` Robert I. Eachus
1999-06-23  0:00                                       ` Richard D Riehle
1999-06-23  0:00                                       ` Aidan Skinner
1999-06-21  0:00                                   ` Hyman Rosen
1999-06-17  0:00                           ` Jean-Pierre Rosen
1999-06-16  0:00                         ` Marin David Condic
1999-06-16  0:00                         ` George W. Bayles
1999-06-16  0:00                           ` Tucker Taft
1999-06-17  0:00                             ` George W. Bayles
1999-06-17  0:00                               ` Tucker Taft
1999-06-17  0:00                                 ` bob
1999-06-16  0:00                           ` D'Arcy Smith
1999-06-16  0:00                           ` D'Arcy Smith
1999-06-17  0:00                           ` Larry Kilgallen
1999-06-22  0:00                       ` Robert Dewar
1999-06-23  0:00                         ` Marin David Condic
1999-06-23  0:00                           ` Vladimir Olensky
1999-06-23  0:00                             ` Roedy Green
1999-06-23  0:00                               ` Marin David Condic
1999-06-23  0:00                                 ` Keith Thompson
1999-06-24  0:00                                   ` Mike Silva
1999-06-24  0:00                                   ` Marin David Condic
1999-06-23  0:00                             ` Marin David Condic
1999-06-15  0:00                     ` tmoran
1999-06-15  0:00                       ` David Botton
1999-06-16  0:00                       ` Samuel Mize
1999-06-16  0:00                       ` Richard D Riehle
1999-06-15  0:00                     ` Samuel Mize
1999-06-16  0:00                 ` Mark Hood
1999-06-17  0:00                   ` Jean-Pierre Rosen
1999-06-17  0:00                 ` Robert I. Eachus
1999-06-17  0:00                   ` Marin David Condic
1999-06-15  0:00               ` D'Arcy Smith
1999-06-16  0:00                 ` George W. Bayles
1999-06-16  0:00                   ` D'Arcy Smith
1999-06-17  0:00                   ` Matthew Heaney
1999-06-17  0:00                   ` Aidan Skinner
1999-06-17  0:00             ` Markus Kuhn
1999-06-17  0:00               ` David Botton
1999-06-12  0:00   ` PPAATT
1999-06-13  0:00   ` Robert Dewar
1999-06-14  0:00     ` tmoran
1999-06-30  0:00       ` John Merryweather Cooper
1999-07-01  0:00         ` Chad R. Meiners
1999-07-02  0:00           ` Robert Dewar
1999-07-02  0:00             ` John Merryweather Cooper
1999-07-03  0:00               ` Robert Dewar
1999-06-12  0:00 ` nabbasi
1999-06-12  0:00   ` jerry
1999-06-12  0:00     ` Robert Dewar
1999-06-14  0:00       ` Marin David Condic
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox