Deutsch   English   Français   Italiano  
<vcp00o$26pgg$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!feeds.phibee-telecom.net!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Terje Mathisen <terje.mathisen@tmsw.no>
Newsgroups: comp.arch
Subject: Re: except what, is Vax addressing sane today
Date: Sun, 22 Sep 2024 13:45:28 +0200
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <vcp00o$26pgg$1@dont-email.me>
References: <vbd6b9$g147$1@dont-email.me> <vckf9d$178f2$1@dont-email.me>
 <O2DHO.184073$kxD8.113118@fx11.iad>
 <e290e18a59651f93e4b46f4839713b1c@www.novabbs.org>
 <vcngfk$pkf$1@gal.iecc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Sep 2024 13:45:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="9926b292dbfdf699a61fd735070466f1";
	logging-data="2319888"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18WbX7nPMSTjCUa3dwGRDsVQl/Xra8pbUmIUMNjIwoVqA=="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
 Firefox/91.0 SeaMonkey/2.53.19
Cancel-Lock: sha1:dMxhksLdo6H6n1Ztukv+EdIhcgw=
In-Reply-To: <vcngfk$pkf$1@gal.iecc.com>
Bytes: 3169

John Levine wrote:
> According to MitchAlsup1 <mitchalsup@aol.com>:
>> In the days before <good> branch prediction having a conditional branch
>> after each instruction that could have an execution problem was an
>> extremely poor choice. Thus, exceptions were invented (circa 1958).

Before (good) branch predictors and exceptions, we did have the ability 
to fall through any forward branches, and assume backwards branches were 
taken, right?

With that approach, compilers were free to place all recovery code after 
the function itself, in which case something like

   add,ax,bx
    jo overflow_detected
   ;; ax is now good

would work quite well, i.e. costing "only" 8 cycles for the load of the 
two JO instruction bytes.

> 
> Oh, it was worse than that.  There were instructions like "Divide or
> Halt" which stopped the computer with an error light on a zero divide.

Sort of like "Halt_And_Catch_Fire"?
> 
>> Many (most, nearly all) processor architectures have notoriously
>> bad exception delivery to a point of control that can deal with
>> the problem at hand.
> 
> Some of us remember imprecise itnterrupts and the OS/360 S0C0
> completion code.
> 
> But you are in general right, it makes more sense to keep the computer
> running in the normal case and provide slow ways to recover from
> failures and do something else.
> 
This was idea behind the single-byte INTO (Interrupt on Overflow) opcode:

   add ax,bx
   into

would cost just 4 clock cycles vs the 8 needed for the forward exception 
handler.

OTOH, you did need to either reload the INTO vector (same location as 
INT 4) every time you needed a possibly new/different handler.

I never saw any compiler using it and I never used ti in my own asm code.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"