On Mon, 1 Jul 2024 at 16:48, Maciej W. Rozycki <macro@xxxxxxxxxxx> wrote: > > Looking from today's perspective it was clearly a bad choice. However it > was 30+ years ago, it wasn't so certain as it is now that x86 was there to > stay No. The thing is, it was objectively the wrong thing to do even 30 years ago, and has nothing to do with x86. The lack of byte operations literally means that even _word_ operations aren't reliable. Because when you emulate byte operations with quad-word operations - which is the way the alpha instruction set was literally designed - you mess with the adjacent word too. So even word accesses aren't safe. And I'm pretty sure that 'sig_atomic_t' was just 32-bit on alpha (that's what glibc had, and I'm pretty sure OSF/1 did too). So... And that's an issue even just UP, and just completely bog-standard POSIX 1003.1 and C. You really can't get much more basic than that. So supposedly portable programs would have subtle bugs because the architecture was bad, and the workarounds for that badness were incomplete. SMP and IO - which are a thing, and which were things that the architecture was allegedly designed for - are then only much worse. The architecture was wrong 30 years ago. It's not that it "became" wrong in hindsight. It was wrong originally, and it's just that people hadn't thought things through enough to realize how wrong it was. The only way it's not wrong is if you say "byte accesses do not matter". That's a very Cray way of looking at things - Cray 1 had a 64-bit "char" in C, because there were no byte accesses. That's fine if your only goal in life is to do HPC. So if you simply don't care about bytes, and you *only* work with words and quad-words, then alpha looks ok. But honestly, that's basically saying "in a different universe, alpha is not a mis-design". That's not the universe we live in, and it's entirely unrelated to x86. Bytes were very much a thing 30 years ago, and they will be a thing 30 years from now even if x86 is dead and buried. Basically, the fundamental mistake of thinking that you can do byte operations by just masking quad-words screwed up POSIX compatibility, screwed up SMP, and majorly screwed up the alpha IO layer too. And by the time it was fixed, it was too late. Don't make excuses for it. It's not ok today, but it really wasn't ok 30 years ago either. It's ok to have rose-colored glasses and have a weak spot in your heart for an architecture. But let's not make that weak spot in your heart be a weak spot in your mind. Linus