Sujet : Re: number of registers
De : mitchalsup (at) *nospam* aol.com (MitchAlsup1)
Groupes : comp.archDate : 20. Aug 2024, 21:59:28
Autres entêtes
Organisation : Rocksolid Light
Message-ID : <48438024ccdbcc373e4cfa51d18066f5@www.novabbs.org>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Rocksolid Light
On Tue, 20 Aug 2024 17:40:50 +0000, Michael S wrote:
On Tue, 20 Aug 2024 16:40:06 +0000
mitchalsup@aol.com (MitchAlsup1) wrote:
>
>
and you may have
several of these in a local sequence of code. ...
>
No, you can not have several. It's always one then another one then yet
another one etc... Each one can reuse the same temporary register.
The point is that the cost of not getting allocated into a register
is vastly lower--the count of instructions remains 1 while the
latency increases. That increase in latency does not hurt those
use once/seldom variables.
The the examples cited, the lack of register allocation triples
the instruction count due to lack of LD-OP and LD-OP-ST. The
register count I stated is how many registers would a
non-LD-OP machine need to break even on the instruction count.