Path: utzoo!attcan!uunet!ncc!alberta!access!edm!rroot
From: rroot@edm.UUCP (uucp)
Newsgroups: comp.arch
Subject: Re: Is the Intel memory model safe from NO-ONE ?!?
Message-ID: <3111@edm.UUCP>
Date: 12 May 88 09:29:15 GMT
References: <20618@think.UUCP>
Organization: Unexsys Systems, Edmonton,AB.
Lines: 28

From article <20618@think.UUCP>, by barmar@think.COM (Barry Margolin):
] In article <3095@edm.UUCP> rroot@edm.UUCP (uucp) writes:
]>From article <353@cf-cm.UUCP>, by mch@computing-maths.cardiff.ac.uk (Major Kano):
>>> (As an aside, I've heard of 68000 routines doing all kinds of contortions to
>>> check for/avoid overflow because the 68K traps on (eg., zerodivide) and traps
>>> into SUPERVISOR mode (believe it or not).
> Read the original message again, more carefully.  He wasn't
> complaining so much about the fact that divide by zero results in a
> trap, but that it traps into SUPERVISOR mode, even though the program

He seemed to be complaining about all the contortions that he heard that
programs go thru to check for zero divide (and seemed to assume that it was
also necessary for other overflow-type thins).  I was basically defending 
the existance of -- and presumed logic behid -- the trap.
 The problem behind having the zerodivide interrupt trap into USER state is
that it would mess up the whole world. RTI would then have to become a 
non-priveledged instruction, and user programs would have to set up for
it whether they cared about recovering from zero divides or not (rather
than tellin the OS when they did). It's not that difficult to emulate 
a vector into user state when you start in supervisor than it is to go 
the other way around without introducing some weird contortions on
both the user and supervisor side of things.

-- 
-------------
 Stephen Samuel 
  {ihnp4,ubc-vision,vax135}!alberta!edm!steve
  or userzxcv@uqv-mts.bitnet