GARTHWILSON wrote:
It's no secret that the '02 is poorly suited for compilers. However, I don't think it's necessarily valid to say it has to struggle with "generic" function calls because of the argument-passing overhead. I show why in my
6502 stacks treatise. The '816 is of course more efficient in handling arguments on stacks though, especially with its hardware-stack-relative addressing modes.
The question, perhaps better put, is whether in the domain of running larger programs written in high level languages did something like the 68K perform better than something like the '816. Have a CPU that runs more efficiently with hand tuned code in assembly than another CPU doesn't bring much benefit when the majority of the users don't write code that way, but instead rely on high level compilers.
Quote:
My own feeling is that too much emphasis is placed on portability, at the expense of efficiency and of hardware simplicity.
Yet portability is what has empowered the industry to be where we are today. The simplest case is the explosion of the micro controller environment today. The sheer diversity of which is powered by the portability of everything from OS's to stepper motor drivers to temperature calculations. And that's simply portability of source code.
Next you have portability of object code. Where the toolchain let's objects created from different tools link together. Fortran from C programs, assembly routines in Pascal, etc. As long as a compatible object file, AND it's associated calling convention, is created, you gain the benefit reusing other work in your applications. On the Mac there were extensions to the compilers to distinguish between Pascal and C calling sequences, for example.
The other aspect is portability of the actual application programmers. They write C for Intel, ARM (all 276 different variants it seems), MIPS, TI, SPARC, PowerPC, Coldfire, etc. When a new processor comes out, the manufacturer is essentially obligated to provide a toolchain, a C based toolchain, in order to get any traction whatsoever. Because with that toolchain, the entire world opens up for that processor. Back in the day, a customer asked me which machine they should buy and I simply told them that as long as it support the Database tool set we used and had a modem, I didn't care. That was back in the day when there were a plethora of Unix based mini computer systems being sold (HP, Sun, Sequent, Sequoia, Pyramid, IBM, Data General, SCO Unix, AT&T, NCR, etc. etc.). Folks back then where crushed by the complexity of choice.
Even here, on this forum, we see the diversity of simply which assembler to use and the struggles folks have moving 6502 from one toolchain to another. All of that is friction on the process, and friction is never good.
Finally, portability is manifest even in electronics. Folks long ago talked about "Software ICs", using the integrated circuit as a unit of composition. Can you imagine where we would be, both as an industry and a community, if everyone was wiring processors by hand? Creating their own processors? "Yea my 6502 doesn't have Decimal mode, I didn't add those gates. And I added a Z register, but here's my trig routines if you'd like to use them!" Look at the diversity of components available to your projects.
The industrial revolution is premised on portability and interchangeability of components and parts. Yea, it takes less craftsmanship that way, but it sure scales a lot better.