Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site sftig.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!mhuxm!sftig!rbt From: rbt@sftig.UUCP (R.Thomas) Newsgroups: net.arch Subject: Re: RISC Message-ID: <542@sftig.UUCP> Date: Fri, 28-Jun-85 12:11:51 EDT Article-I.D.: sftig.542 Posted: Fri Jun 28 12:11:51 1985 Date-Received: Sat, 29-Jun-85 03:39:34 EDT References: <639@vax2.fluke.UUCP> <2743@nsc.UUCP> Organization: AT&T Bell Laboratories, Summit, NJ Lines: 25 > Saving the status register is an infrequent operation; why not do > multiple conditional branches instead? Virtually no application > programs need it at all. The operating system just needs it to switch > contexts, which is a task done infrequently, and takes so much time as > it is... :-) > -- > > Ken Turkowski @ CADLINC, Menlo Park, CA It's not as funny as you think! The old UNIVAC 1107 did just exactly that to save the status of the carry and overflow flags. And in order to restore them, it had to actually do an arithmetic sequence that would force the flags to have the right values. There were *no* instructions to directly save or restore these flags! An old time hacker, Rick Thomas attunix!rbt For that matter, some benighted hardwares protect the instructions that load the flags register because there are flags in that register that you would rather not have the user mucking around with. On those machines, if you want to save and restore the flags from user mode, you have to resort to some such trick as the above. I know, there are better ways to design systems, but some designers are not as smart as some designers.