🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #608

Re: vector length CSR?

#608
From: Robert Finch
Date: Mon, 09 Nov 2026 07:29
43 lines
2841 bytes
; Pedantic (work in progress)
; If the number of GPR registers per vector register is 3.
; The core translates with micro-ops:

	vadd %r1,%r8,%r16

; into
	add %r1,%r8,%r16	; records lane #1 in the instruction
	add %r2,%r9,%r17	; records lane #2 in the instruction
	add %r3,%r10,%r18

; which it can then distribute to three different pipelines
; and execute in parallel. (no dependencies).

; Translating with micro-ops happens in the front-end after
; the instruction is extracted from the cache line.
; Therefore, there are no register values available yet,
; therefore the vector length cannot be set dynamically
; at high speed. It is possible to change the length but
; it takes a lot of clock cycles. Suggested to use mask
; register instead.

	vaddm %r1,%r8,%r16,%r4	; r4 contains mask

; translates into (source arg #3 is always scalar) masked add
	addm %r1,%r8,%r16,%r4	; records lane #1 in the instruction
	addm %r2,%r9,%r17,%r4	; records lane #2 in the instruction
	addm %r3,%r10,%r18,%r4

; if the elements remaining is less than the number of elements
; in a vector register
; the follwoing generates a mask (alias for bitfield set insn)

	vmfill %r4,$0,$ele_remaining

; It is possible to use a simple instruction sequence to
; generate the mask.
; eg 12 elements in 3 regs

	minu %r5,$12,%r6		; where r6 is counting down # ele
	set %r4,$0,$0,%r5,$-1		; vmfill %r4,$0,%r5
	sub %r6,%r6,%r5			; count down # ele
	bne %r5,$0,.loop_again
Technical Details
Message-ID: <11crsp0$11gka$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11cpqih$acf5$1@dont-email.me> <11cr2g5$q796$2@dont-email.me> <11crh64$ug0s$1@dont-email.me> <11crili$ur2d$1@dont-email.me> <11crrs5$118ll$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Robert Finch <robfi680@gmail.com>
Newsgroups: comp.arch
Subject: Re: vector length CSR?
Date: Mon, 9 Nov 2026 02:29:33 -0500
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <11crsp0$11gka$1@dont-email.me>
References: <11cpqih$acf5$1@dont-email.me> <11cr2g5$q796$2@dont-email.me>
 <11crh64$ug0s$1@dont-email.me> <11crili$ur2d$1@dont-email.me>
 <11crrs5$118ll$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 09 Nov 2026 07:29:37 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1098378"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18Fbk56n73xdQHs1MM/xve4FKCrA7KdLms="; posting-host="2e396b754c26470c88c1ae32dc5f2441"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:EGFmZpxSq2e/WzXYgy1Wfb3R//o= sha256:Gv6Bcr19Yn+NQnZ/yv8Rf/M8tlAncQQcuBZpTkfN+kQ=
	sha1:2Cbl1f0y5VnSA0mecswL8vGdUkY= sha256:/Pb7g15J4ZmQ+CCw1cH8U+MMQKPlKQOM+pCM6WzSZ+U=
Content-Language: en-US
In-Reply-To: <11crrs5$118ll$1@dont-email.me>