On Mon, Aug 29, 2011 at 12:45 PM, Pekka Enberg <penberg@xxxxxxxxxx> wrote: >> However, i'm not 100% sure that's sufficient. Is OP_CAST always zero-extend >> or do we need to check for something specific here? On Mon, Aug 29, 2011 at 11:32 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > OP_CAST is always a zero-extend, OP_SCAST is a sign-extending one. > > (Of course, they may be *truncating* casts too, which don't need to > generate any code on most architectures). > > OP_PTRCAST should act as OP_CAST. OK, makes perfect sense. We don't support OP_SCAST or OP_PTRCAST yet so those should be fine. I fixed OP_CAST like this: https://github.com/penberg/sparse-llvm/commit/2dea6f7fb07cd18255cf1d73079638dc96bdd08b So comparison operators should be OK now. On Mon, Aug 29, 2011 at 11:32 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > NOTE! The casting is dubious. We only have a single OP_FPCAST, for > example, and that's just broken. Right now "OP_FPCAST" means that the > *source* was a FP value. But if we cast *to* a FP value, it ends up > showing up as OP_[S]CAST, which is just bogus. The FPCAST should be > for any FP operation (to or from or both), and then the FPCAST logic > would have to decide how it handles it. > > The FP support in general is pretty weak. The kernel doesn't do FP, I > never really cared about it. Good to know. I've added support for simple FP ops though and they seem to be fine. Pekka -- 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