From: programmerjake Date: Wed, 12 Feb 2020 17:30:43 +0000 (+0000) Subject: add note that upper bits of shift amount are specifically ignored X-Git-Tag: convert-csv-opcode-to-binary~3446 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2f46ff00c986fda0962ed5d0de13e8fed9a35c9;p=libreriscv.git add note that upper bits of shift amount are specifically ignored --- 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