Decrement And Branch

Liste des GroupesRevenir à c arch 
Sujet : Decrement And Branch
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.arch
Date : 13. Aug 2024, 11:00:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v9f7b9$3qj3c$1@dont-email.me>
User-Agent : Pan/0.159 (Vovchansk; )
I thought loop-control instructions had fallen out of favour in the RISC
era. But reading some IBM POWER (and PowerPC) docs has reminded me that
that family does have such instructions. I don’t think any other RISC
architecture does, though. POWER even has a special register (CTR, the
“counter” register) for use with loop instructions, though it could also
(along with LR, the “link” register) be used for indirect branches.
(Obviously you need at least two registers with this property.)

The original designers of POWER clearly thought there was a point to
having such instructions; do you agree?

The most common form of these will decrement the counter register, and
only branch back to the top of the loop if the counter has not reached
zero; if it is now zero, then fall through. However, the good old VAX (in
its usual kitchen-sink fashion) had a whole set of variations, including
one that decremented down to -1 instead of zero. And the Motorola 68000
family only had the decrement down to -1 version.

This seemed to mystify quite a few assembly-language programmers. I wonder
why it wasn’t a more popular idea ...

Date Sujet#  Auteur
13 Aug 24 * Decrement And Branch24Lawrence D'Oliveiro
13 Aug 24 +* Re: Decrement And Branch2Anton Ertl
13 Aug 24 i`- Re: Decrement And Branch1MitchAlsup1
13 Aug 24 +- Re: Decrement And Branch1MitchAlsup1
14 Aug 24 +* Re: Decrement And Branch18Lawrence D'Oliveiro
14 Aug 24 i+* Re: Decrement And Branch3MitchAlsup1
14 Aug 24 ii`* Re: Decrement And Branch2Lawrence D'Oliveiro
15 Aug 24 ii `- Re: Decrement And Branch1MitchAlsup1
14 Aug 24 i`* Re: Decrement And Branch14Anton Ertl
15 Aug 24 i +* Re: Decrement And Branch4Lawrence D'Oliveiro
15 Aug 24 i i+- Re: Decrement And Branch1MitchAlsup1
15 Aug 24 i i`* Re: Decrement And Branch2Anton Ertl
16 Aug 24 i i `- Re: Decrement And Branch1Lawrence D'Oliveiro
15 Aug 24 i `* Re: Decrement And Branch9MitchAlsup1
15 Aug 24 i  `* Re: Decrement And Branch8Anton Ertl
15 Aug 24 i   +* Re: Decrement And Branch5MitchAlsup1
16 Aug 24 i   i`* Instruction counts (was: Decrement And Branch)4Anton Ertl
16 Aug 24 i   i +* Re: Instruction counts (was: Decrement And Branch)2Lawrence D'Oliveiro
16 Aug 24 i   i i`- Re: Instruction counts (was: Decrement And Branch)1Anton Ertl
16 Aug 24 i   i `- Re: Instruction counts1MitchAlsup1
15 Aug 24 i   +- Re: Decrement And Branch1MitchAlsup1
9 Sep 24 i   `- Re: Decrement And Branch1Kent Dickey
16 Aug 24 `* Re: Decrement And Branch2quadibloc
16 Aug 24  `- Re: Decrement And Branch1MitchAlsup1

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal