From f2f46ff00c986fda0962ed5d0de13e8fed9a35c9 Mon Sep 17 00:00:00 2001 From: programmerjake Date: Wed, 12 Feb 2020 17:30:43 +0000 Subject: [PATCH] add note that upper bits of shift amount are specifically ignored --- 3d_gpu/architecture/dynamic_simd/shift.mdwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/3d_gpu/architecture/dynamic_simd/shift.mdwn b/3d_gpu/architecture/dynamic_simd/shift.mdwn index 7042e7a7e..b4a3419ce 100644 --- a/3d_gpu/architecture/dynamic_simd/shift.mdwn +++ b/3d_gpu/architecture/dynamic_simd/shift.mdwn @@ -87,6 +87,10 @@ For o3: Where for o0 the output is simple a0b0 for all partition permutations. +## Note + +One important part to remember is that the upper bits of the shift amount need to specifically *ignored* rather than assuming that they are zeros, this is because, for shift instructions: `a << b` actually is `a << (b % bit_len(a))` + # Static Partitioned Shift Static shift is pretty straightforward: the input is the entire number -- 2.30.2