News for hackers. Stuff that matters.
Re:x86 assembly doesn’t have to be scary (2018) by ajross on Thursday October 07, 2021 @10:32AM (#28786777)
> 68k assembly coding was pure joy because of its elegant and consistent instruction set

That's maybe a little spun. The separated address/data registers (there are two kinds of registers, and memory operations need to use one from each to combine to a final address) played hell with optimizer strategies for years.

In fact 68k compiler output was significantly sub-par pretty much throughout its lifetime. The "cobbled-together mess" had (post-386 anyway) a significantly more orthogonal instruction set and was just plain easier to optimize, even for humans.

Re:x86 assembly doesn’t have to be scary (2018) by notriskfree on Thursday October 07, 2021 @10:55AM (#28787110)
The 68k was certainly great fun after 8bit systems, and the x86 was almost just more of the same. ARM32 is also nice, apart from some corner cases. I think everything has corner cases, apart from x86 where the whole thing is an ugly mess.
Re:x86 assembly doesn’t have to be scary (2018) by Banjo911 on Thursday October 07, 2021 @11:40AM (#28787749)
No, on the 68000 you can do memory addressing using none, one address register, two address registers, or one of each.

On the 68020 you get even more flexibility.

Re:x86 assembly doesn’t have to be scary (2018) by ajross on Thursday October 07, 2021 @01:57PM (#28789914)
Yes. But what you cannot do is a load with the sum of any two GPRs. They need to be in the right partitions. That makes register assignment a huge pain for the optimizer, and historically hurt the architecture.

That's the kind of complexity that really hurts software. Compare vs. the commonly-cited x86 nonsense (the REP prefix, say), which complicates silicon implementations but generally makes software easier to write (c.f. decades of optimized inline memcpy implementations).

The point being the 68k was a dead end in a different direction. It was a "clean" archiecture from the perspective of a 1970's assembly programmer, but not a late 80's compiler writer.

Re:x86 assembly doesn’t have to be scary (2018) by Banjo911 on Thursday October 07, 2021 @05:36PM (#28792424)
The only thing you can't do is the sum of two data registers, and this only applies when calculating an effective address.

When you have 15 registers to work with that's not going to be more of a problem than only having 7 or 8 registers to work with.

Re:x86 assembly doesn’t have to be scary (2018) by ajross on Thursday October 07, 2021 @05:46PM (#28792527)
I don't want to be too blunt, but have you looked at early 90's era 68k compiler output? It was crap. When Sun launched SPARC, like half the advantage of the platform was that the compiler was suddenly generating this amazingly clean code. The phantom spills and intra-GPR movs everyone was used to disappeared overnight.