3 ms·
On the other hand, they do exist as a separate case, and have instructions that treat them as an individual register. There is precedent for all this too. Tak
by ddingus 6y ago
On the other hand, they do exist as a separate case, and have instructions that treat them as an individual register.
There is precedent for all this too.
Take the 6809, having 8 bit A and B accumulators. These can be addressed as D, a 16 bit register.
D is not generally counted as it's own register because the D addressing does not point to anything new.
A and B are counted as two registers.
If somehow D brought new bits, say it was 24 bits long, then it would need to be counted.
- shdon 6y agoDoes that mean you would count AL, AH, but not AX (as it can be split into AL/AH and doesn't "bring new bits"), and then again would count EAX and RAX?
- ddingus 6y agoIn physical terms, I probably would not count it. However if I were doing emulation, I would have to count it because it is a register case that has to be addressed. Just like the D register has to be dealt with on a 6809. My own personal way to resolve this has always been to determine whether or not a given register specification, that can be addressed somehow, brings new information not contain in any other register specification, to the table. Fact is, CPU designers do all kinds of crazy things with registers. They overlap, they may be indirect, like not directly addressable, but still there as consideration for the programmer. Think about something like the REP instruction found on some CPUs. There's a little circuit it keeps track of account, and some rules, and account may be a register that may or may not be directly addressable any other way. My general take on this article is, "wow, that's a lot of registers!" We can all quibble about what the quantity of a lot is, and it's all good fun, and I don't think it means anything really.