>>>>> "Jakub" == Jakub Jelinek <ja...@redhat.com> writes:
Tom> Should DW_OP_bra be restricted to integral types? Several other opcodes Jakub> Yes. If you want to test other types, just compare them against 0 Jakub> using DW_OP_ne etc. Great, thanks. Tom> Currently, the comparison operators are all defined as performing signed Tom> operations. So, what should happen in this case: Tom> Tom> DW_OP_lit0 Tom> DW_OP_GNU_convert <unsigned int> Tom> DW_OP_GNU_const_type <unsigned int> -1 Tom> DW_OP_gt Tom> Tom> That is, should this ignore the type (perhaps just using the type Tom> width), or is this a bug in the spec? Jakub> Whenever you have explicit type, use that type for comparisons, Jakub> including its signedness. DW_OP_mod also need special treatment. What my patch does now is that it generally uses a signed integer type of the appropriate width for "legacy" DWARF values. Then, for mod, if the value's type is this special type, it converts it to an identically-sized unsigned type, and converts back after the operation. For DW_OP_shr, I always convert the LHS to an appropriately-sized unsigned type first. Tom