Deutsch English Français Italiano |
<jwvfrpqkpcq.fsf-monnier+comp.arch@gnu.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Stefan Monnier <monnier@iro.umontreal.ca> Newsgroups: comp.arch Subject: Re: is Vax addressing sane today Date: Mon, 23 Sep 2024 18:00:36 -0400 Organization: A noiseless patient Spider Lines: 33 Message-ID: <jwvfrpqkpcq.fsf-monnier+comp.arch@gnu.org> References: <vbd6b9$g147$1@dont-email.me> <09ce1622b872f0b0fa944e868a8c97be@www.novabbs.org> <vbnisc$2hb59$1@dont-email.me> <2024Sep10.094353@mips.complang.tuwien.ac.at> <vckf9d$178f2$1@dont-email.me> <O2DHO.184073$kxD8.113118@fx11.iad> <e290e18a59651f93e4b46f4839713b1c@www.novabbs.org> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 24 Sep 2024 00:00:37 +0200 (CEST) Injection-Info: dont-email.me; posting-host="7a2524499de57dc5fdc44c8e642a23e8"; logging-data="3025851"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Hpj/5ja7C3d427AfK+CEbUrcOdVXKt+I=" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:2xEExspjHIGzNmbvjt5d7+QquPU= sha1:v/wmaIwwfJxGnPb5gmLp9bHpFBQ= Bytes: 2888 > Some of the things that minimize the "badness" of taking an exception:: > > a) deliver control to user signal handler without taking an > excursion through GuestOS. (think 10 cycles) > b) when control arrives, receiving thread is already reentrant. > c) when control arrives, the instruction (bits) and its operand > values are delivered to the exception handler. So, the exception > handler has what it needs to deal with the problem at hand. > d) when control returns, the result (R0) is delivered back to the > destination register. > e) (b, c, d) are performed without handler needing to understand > how. Handler is just a subroutine that receives arguments (c) > fixes the problem, and returns a non-excepting value, or abort. > f) return has a way to re-execute the instruction or to skip the > instruction under control of handler without having access > to excepting-IP and without knowing the length of the > instruction. > g) during (a..f) nobody ever has to disable interrupts or > exceptions or re-enable them later. Priority and privilege > are inherited automatically from excepting thread. Note that in the case where you want the overflow exception to jump to some alternate code path (a language-level exception handler, or a code path that continues with a bigint instead of a register-sized integer), (d) is useless because you don't want to return to the overflowing instruction (nor to the immediately following instruction). Instead you usually want to lookup a side table indexed with the address of the overflowing instruction to find the "exception handler" to "return" to. (a) (b) and (c) are still very welcome, of course. Stefan