Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <2024Aug15.122911@mips.complang.tuwien.ac.at>
Deutsch   English   Français   Italiano  
<2024Aug15.122911@mips.complang.tuwien.ac.at>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Decrement And Branch
Date: Thu, 15 Aug 2024 10:29:11 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 30
Message-ID: <2024Aug15.122911@mips.complang.tuwien.ac.at>
References: <v9f7b9$3qj3c$1@dont-email.me> <v9gl1b$30as$7@dont-email.me> <2024Aug14.111001@mips.complang.tuwien.ac.at> <v9jgc2$l633$5@dont-email.me>
Injection-Date: Thu, 15 Aug 2024 12:39:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e4273ddcc5b5dd90fe3856bf5f2abacf";
	logging-data="989971"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19WbLjkYUQxAWT+1/1TQR53"
Cancel-Lock: sha1:2UEA+CVLqoL3OajHPN0NPGRC8yE=
X-newsreader: xrn 10.11
Bytes: 1901

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>On Wed, 14 Aug 2024 09:10:01 GMT, Anton Ertl wrote:
>>>Like I said, I wondered why this sort of thing wasn't more common ...
>> 
>> For the early RISCs, the pipeline was designed for early branch
>> execution.
>
>Note that I was referring to the decrement-down-to-minus-1 form, as 
>opposed to the decrement-down-to-zero form.

I guess what you want to point out is that

x = x-1
if (x!=-1) goto ...

is equivalent to

flag = x!=0; x = x-1; if (flag) goto ...

but in the latter the branch does not need to wait for the decrement
to complete.  As for x!=0 vs. x!=1, the CPU may already have special
circuits for x!=0.

Ok, so this is not the reason for not having this instruction.  Which
leaves: It is not useful that often.

- anton
-- 
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
  Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>