Re: To RISC or not to RISC



"f0dder" <f0dder.nospam@xxxxxxxxxxxxxxxx> writes:
Some registers have special purpose. SI/DI/SP source/destination/stack are
easy to remember, but having to remember that, for instance, that these were
r0, r3, r5 (arbitrarily chosen here) would be harder.

On other and properly designed hardware with more registers and a more
coherent opcode map, r0-rxx naming would make sense. But on x86, it makes
about as much sense at a/b's weird "line noise" language.

On all register-rich orthogonal architectures that I've played with,
the vendor-supplied development tools' assembler has always used
macros for these special purpose registers (tools ABI-defined, not
necessarily architecturally imposed as they are in x86), even if they
are just r28-r30 in reality. It's a compromise, and it seems to work.

Different ABI's for different OSes in the same architecture could often
use different reservations for those special registers. Best to use
symbolic names with macros than hard coded numeric register values if
any portabilit is desired.

Phil
--
"Home taping is killing big business profits. We left this side blank
so you can help." -- Dead Kennedys, written upon the B-side of tapes of
/In God We Trust, Inc./.
.



Relevant Pages

  • Re: microcontroller programming -- how to begin
    ... they both have registers ... memory location that can be used in ALU operations. ... address of the next instruction in encoded in each instruction. ... There are certainly processor architectures that use significantly ...
    (sci.electronics.design)
  • Re: microcontroller programming -- how to begin
    ... happy count the PIC and AVR as similar because they both have registers ... In some "very long instruction word" designs, ... There are certainly processor architectures that use significantly ... like the x86 and the Z80. ...
    (sci.electronics.design)
  • Re: microcontroller programming -- how to begin
    ... There have been a few attempts at processors where there are no "registers" in that all operations took data from RAM and put the result into RAM. ... In some "very long instruction word" designs, the address of the next instruction in encoded in each instruction. ... There are certainly processor architectures that use significantly different architectures, making the PIC and AVR seem similar in comparison. ... I have read of several processor designs that use two, three or four stacks instead of having any data registers. ...
    (sci.electronics.design)
  • Re: Pros and Cons of GNU toolchain
    ... GCC may not be easily portable to some micro-controller ... It deals pretty well with CISC architectures like the IA32, ... lots of similar registers. ...
    (comp.arch.embedded)
  • Re: microcontroller programming -- how to begin
    ... There have been a few attempts at processors where there are no "registers" in that all operations took data from RAM and put the result into RAM. ... There are certainly processor architectures that use significantly different architectures, making the PIC and AVR seem similar in comparison. ... I have read of several processor designs that use two, three or four stacks instead of having any data registers. ... A third group has several specialised registers, like the x86 and the Z80. ...
    (sci.electronics.design)