From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,28b0249f7691568e X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,28b0249f7691568e X-Google-Attributes: gid1164f8,public From: wilson@dbit.com (John Wilson) Subject: Re: Alpha in peril? First Canion, now Pfieffer Date: 1999/04/26 Message-ID: <37250e6e.0@news.wizvax.net> X-Deja-AN: 471274945 References: <371B1CEE.6041484B@strategypartners.com> <7fm3l6$10pe$1@news.doit.wisc.edu> <37238e70.0@news.wizvax.net> X-Trace: 26 Apr 1999 21:10:06 -0500, dbit.dbit.com Organization: D Bit, Troy, NY Newsgroups: comp.arch,comp.sys.dec In article , Pete Zaitcev wrote: >>Pushing SS:ESP on the stack during ring changes when >>DEC style per-ring SPs would have avoided the need? > >What is the benefit of several SPs as opposed to several sets of GPRs? Multiple GPRs would be OK, except that the 80x86 doesn't have them. Some PDP-11s do though, and they really aren't that useful. My point was, IRET is an atrocity, what could have been just a simple two-pops-and-go on a clean architecture (i.e. the PDP-11!) turns into this complicated mess that has to inspect the popped PSW and decide what else to pop, possibly including ES:ESP itself, and maybe the rest of the segment regs (if a V86 task was interrupted). >> No way to enable I/O instructions to non-ring-0 tasks w/o an 8 KB bitmap? > >Hmm.. I fail to see a problem with that. Pointless waste of memory. I don't care how cheap memory is, there's no reason to just piss it away for fun. >> No concept of the CPU's own interrupt priority so it all has to be >> faked using external ICUs? > >Hmm.. what good are interrupt priorities anyways? On a system with a total joke of an I/O system, it doesn't matter. But putting that aside, PC device drivers have to do extra work nursing the ICUs along so they know what's going on (they don't even do IRET sniffing like the Z80 chips did). Which would be only mildly annoying (2 or 3 extra instructions plus a push/pop in every ISR), except in cases where you're chaining multiple ISRs off the same vector (which wouldn't be necessary if vectored interrupts had been done correctly in the PC architecture -- this one is IBM's fault for using the chips wrong, Intel's not directly to blame since you *could* use all 224 non-reserved vectors for hardware interrupts if you built your own ICU) it gets confusing where you have to make sure that each individual ISR doesn't send the EOI when it's the root ISR dispatcher's job, but then again maybe it does after all if the ISR's *aren't* chained. It's just more clutter, which the PDP-11 avoided entirely by planning ahead a little. And, if you actually *wanted* to share a vector between two devices for some reason, the PDP-11 would let you do it from day one with no special hardware. >> No SP-relative index mode (until later models) so HLL subroutine entry/exit >>code has to be bloated up with setting up BP? > >Is it not what .jsr and .jret did anyways? Don't know what macro package that is, but on a PDP-11 it's perfectly possible for a compiler to keep track of how the SP has been adjusted so far since entering the routine, and figure out the right offset to just index off SP to wherever the locals and/or call parms are located. No frame pointer needed. That's how Small-C works, and it's the stupidest compiler around! >Dunno... I never liked proliferation of instruction sets in PDP-11. >FPP vs. FIS, mtps/mfps (returning result on stack, no less). >The jewel of PDP-11 kludges was rtt of course. Talk about scraping the bottom of the barrel! Meanwhile the 80x86 has half a dozen IMUL instructions, *no way* of reaching into another job's context w/o mapping it manually, and gobs of instructions that are hardwired to particular registers (so you have to constantly do a little dance to keep your register values out of each other's way), constantly changing rules about which instructions are fast and which are slow, and a handful of pointless new instructions added to each new generation. Why was BSWAP so important that it had to be added to the *fourth* generation chip? And I love the fact that CPUID in general and the serial number feature in particular came so late in the game, since both ideas were ripe for plucking from the PDP-11 architecture back in the 8086 days. And would it have killed them to put an invalid opcode trap, like every PDP-11 has, in those early chips? Anyway if you want to talk about proliferation, you can't beat Intel for that. With the release of the Pentium it was decided that we were supposed to settle into the "RISC core" instructions, all the simple one-cycle stuff that pairs nicely. So we're supposed to pretend it's practically a RISC chip, with significant performance penalties for using the genuinely *useful* instructions like REPE CMPSB. Then, they shovel that MMX crap onto the architecture and go through a particularly stupid ad campaign trying to get anyone to care (I'll bet that to this day most C compilers can go all day long w/o generating a single MMX instruction as object). It's just a huge cluttered mess. >In any case, a used program on 8086 could access a meg, as opposed >to 2x64K on a high end PDP-11. This is what was its downfall. But, the 8086 couldn't go past a meg *total*, while PDP-11s could handle 4 MB. So 80x86 code did all those flips and twists with EMS and 80286 segmentation, which was a nightmare. Each time around, Intel adds just a handful more address bits, so it takes kludges on top of kludges to make it all work now (the P6 jump from 32 to 36 bits was particularly pointless). Not that the PDP-11 isn't guilty of the same thing, but it was ahead at the time the 8086 came out, and at least its bits are next to each other! >> autodecrement addressing that works backwards... > >huh? STD / LODSB decrements *after* the memory reference, which is rarely what you actually want. So you often get messy with subtracting 1 (2? 4?) from your pointer before doing your byte/word/dword string instruction(s), and then adding it back when you CLD again. >> It's a bigger mess than anything DEC ever built! > >Dunno... I never was too excited about PDP-11. Actually I hated to feed >paper tapes into it from the outset. :) Somehow, I doubt feeding paper tapes into an Intel box would be any better! Anyway the thing about the PDP-11 architecture is that it's balanced and it makes sense. I've been writing 80x86 assembly language for *16 years* and I *still* have to pull out the manuals pretty often to find my way around those bizarre bit fields and nasty data structures and crazy privilege rules, there's way too much cruft in there to keep it straight in my head. John Wilson D Bit