X-Received: by 10.236.137.50 with SMTP id x38mr4571884yhi.9.1396068888638; Fri, 28 Mar 2014 21:54:48 -0700 (PDT) MIME-Version: 1.0 Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!w5no9698135qac.0!news-out.google.com!du2ni17104qab.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: glen herrmannsfeldt Newsgroups: comp.compilers Subject: Re: catch and throw, was Is multi-level function return possible? Date: Sat, 29 Mar 2014 03:38:01 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 44 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-03-081@comp.compilers> References: <14-03-065@comp.compilers> <14-03-068@comp.compilers> <14-03-070@comp.compilers> <14-03-076@comp.compilers> <14-03-077@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: miucha.iecc.com 1396068888 18307 2001:470:1f07:1126:0:676f:7373:6970 (29 Mar 2014 04:54:48 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sat, 29 Mar 2014 04:54:48 +0000 (UTC) Keywords: errors, history, architecture Posted-Date: 29 Mar 2014 00:54:47 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1203 Ivan Godard wrote: > On 3/28/2014 4:08 PM, mac wrote: >> Not quite the same. ON defined a handler invoked at the signal site. It >> could attempt repair and return. more like an interrupt. However, the >> typical handler did a non-local GOTO to bail out, clearing any calls >> between the signal and the gone-to label. >> I still think that the ability to resume can be useful. > Useful or no, the ability to resume requires retaining the illusion of > sequential execution. You have no idea how expensive, in power and > performance, that illusion is. And it's flat-out impossible on wide > issue machine such as VLIWs. That is true, and was already true for the IBM 360/91. But there are different kinds of exception. There are software generated exceptions (even if the underlying source is hardware) that can be resumed. As I noted previously PL/I had ENDPAGE that allows one to print page headers during I/O operations. A single I/O statement may produce multiple lines of output, and the ENDPAGE may occur during that output. CONVERSION (an illegal character in a numeric field) also can be corrected and resumed. But yes, resuming hardware exception is complicated. S/360 required operands to be properly aligned. It was believe that Fortran required COMMON blocks to be packed, without any padding, even if alignment requirements were violated. The fix was an interrupt routine to copy the operand to a properly aligned buffer, preform the offending instruction, and then return. That worked (though was very slow) for most S/360 models, but not at all for the 360/91, which allowed for out-of-order execution. The address reported for the interrupt might be nowhere near the offending instruction, and more instructions using the data might have been executed. Most languages now allow for padding and data to be aligned. On the other hand, VLIW is pretty much dead. (I have an actual RX2600 Itanium based system, though don't use it much.) -- glen