QGL
QGL copied to clipboard
Bitmask in APS2Pattern.Instruction.flatten is too short
The bitmask used to select the payload in Instruction.flatten
is only 48 bits wide, instead of 56.
Some of the TDM instructions may use the top 8 bits of the payload, so they won't "flatten" correctly.
Apparently there no ordinary APS2 instructions that use those 8 bits (or those instructions are never flattened anywhere) because the mask has been incomplete for years and nobody noticed. (perhaps someone is using those 8 bits for scratch space and relying on the fact that they'll be scrubbed out later...)
I'm ambivalent about fixing this because it seems that this error only has an impact on the TDM version of the driver (and it's already fixed there). If we ever decide to unify the APS2 and APS2TDM drivers, however, this change might be necessary.