What are CPU designs which are not fetch/store but operate directly on RAM?
I only know about the design of the Nintendo Entertainment System (NES), where the CPU does not have registers (AFAIK) and operates directly on RAM, with fast access to low addresses in the RAM.
What CPUs/Systems do you know, which also do not do fetch/store for their operands? Which systems are out there? Why do CPUs like RISC/Arm/AMD64 use fetch/store, what are the tradeoffs? Are there different architectures for CPUs working on operands outside of fetch/store, DMA and stack machines?
As far as I know the 6502 clone in the NES has 3 general-purpose registers: X, Y and accumulator. Many of the instructions operate on them.
https://www.masswerk.at/6502/6502_instruction_set.html
It’s a good question though. I am just not aware of a mainstream CPU architecture without registers.
Thank you very much for your answer! :-)
I would also assume, that at least 1-3 registers are ‘always’ in a CPU, like instruction pointer, top of stack for stack machines or for modern CPUs frame pointers.
For the NES, as far as I understand, you can also operate on the lower memory addresses with the CPU by simply referring to their address.
In the end, what triggered my question is the (banal) insight, that one actually does not need registers from computer science point of view and I am wondering if there are any implementations.
(Obviously for speed reasons alone one wants registers…)
Interesting question, a lot of CPUs have instructions that act directly on memory, but not having any registers would be a weird kind of system. You could design one for yourself en run it on an FPGA, but it probably wouldn’t work very well. At the very least you would want to have an instruction pointer and accumulation registers.
primarily speed. In order to avoid constantly searching for RAM, the majority of CPUs have a cache adjacent to them. It resembles a priority queue with VIP cache on a separate queue.
Thank you very much for your answer. I totally agree and understand why modern CPUs have registers. But what about low end/cheap (embedded?) hardware, any design/board/CPU w/o registers?
Registers would only add very little amount of transistors to a CPU with huge gains, so even at the low end it isn’t worth it.
These days low end is also crazy, you can get full fledged 32-bit microcontrollers for pennies.