jasmin icon indicating copy to clipboard operation
jasmin copied to clipboard

Dynamic subarray offset

Open defund opened this issue 2 years ago • 3 comments

Feature request: subarrays with a dynamic starting index. Note that Jasmin already supports dynamic indexes for array access. For subarrays, the syntax might look like this:

reg u64 i;
reg ptr u8[N*M] arr;
reg ptr u8[N] sub;

...

i = 0;
while (i < N * M)
{
	sub = arr[i:N];

	...

	i += M;
}

defund avatar Jul 11 '23 08:07 defund

I have a branch somewhere, let me resurrect it.

eponier avatar Jul 11 '23 08:07 eponier

I have just rebased the branch: subarray_unknown_index. @defund I know the branch is a bit buggy, but please try it and report whether it suits your needs or if it has limitations. And please check whether it generates the right assembly. I am not confident that even this part is right.

eponier avatar Jul 13 '23 14:07 eponier

Ping @defund. Have you tried the branch?

eponier avatar Aug 09 '23 16:08 eponier

This feature is now available since 2025.06.0.

vbgl avatar Aug 22 '25 09:08 vbgl