add note that upper bits of shift amount are specifically ignored
authorprogrammerjake <programmerjake@web>
Wed, 12 Feb 2020 17:30:43 +0000 (17:30 +0000)
committerIkiWiki <ikiwiki.info>
Wed, 12 Feb 2020 17:30:43 +0000 (17:30 +0000)
3d_gpu/architecture/dynamic_simd/shift.mdwn

index 7042e7a7ea406b60985e565f8b568ae1913a6d50..b4a3419cead159f12443d04ef427f57539e84883 100644 (file)
@@ -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