Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.arch Subject: Re: Is the Intel memory model safe from NO-ONE ?!? Message-ID: <20618@think.UUCP> Date: 10 May 88 06:52:28 GMT References: <353@cf-cm.UUCP> <3095@edm.UUCP> Sender: usenet@think.UUCP Reply-To: barmar@kulla.think.com.UUCP (Barry Margolin) Organization: Thinking Machines Corporation, Cambridge, MA Lines: 22 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). >Yes, the Divide instruction seems to unconditionially except on a zero >divide, but if you REALLY want to ignore zero divide, you can have the >interrupt vector point to an RTE instruction (or an OR/RTE pair if you >want to set the condition code). 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 that executed the divide instruction was running in USER mode. Why should a zero-divide need to be handled by the protected kernel, rather than simply trapping to a user handler? Barry Margolin Thinking Machines Corp. barmar@think.com uunet!think!barmar