On Wed, Aug 9, 2017 at 10:41 PM, Dibyendu Majumdar <mobile@xxxxxxxxxxxxxxx> wrote: > Hi, > > When assigning values to bitfields I have noticed that some times > Sparse generates a CAST instruction with an odd bit size - i.e. not a > standard integer size. I was wondering if there are specific scenarios > that lead to this. While LLVM handles the odd cast - I am working with > another backend (Nanojit) that doesn't. Yes, I know. There is already one less with: [PATCH v4 5/9] change the masking when loading bitfields" Otherwise, it's really a question of translating then into the right instruction(s) to truncate/zero extend/sign extend part of a word (but the casts instructions in sparse's IR are a bit strange and need special care when the src or the dest is not an integer but a float or a pointer). I have an unfinished series that clean this a bit but it will be after the currently pending series. -- Luc -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html