Branch: Tag:

2015-01-05

2015-01-05 16:27:12 by Arne Goedeke <el@laramies.com>

peep: add some neccessary overflow checks

82:      // Ok, this is ridiculously specific, but it is generated by for(..)   // when the variable is not used, like above, but for globals: - ASSIGN_GLOBAL_NUMBER_AND_POP[$1b > -0x80000000L] GLOBAL_LVALUE($1a) DEC: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b - 1) NUMBER($1b - 1) + ASSIGN_GLOBAL_NUMBER_AND_POP[!INT32_SUB_OVERFLOW($1b, 1)] GLOBAL_LVALUE($1a) DEC: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b - 1) NUMBER($1b - 1)    - ASSIGN_GLOBAL_NUMBER_AND_POP[$1b < 0x7fffffff] GLOBAL_LVALUE($1a) INC: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b + 1) NUMBER($1b + 1) + ASSIGN_GLOBAL_NUMBER_AND_POP[!INT32_ADD_OVERFLOW($1b, 1)] GLOBAL_LVALUE($1a) INC: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b + 1) NUMBER($1b + 1)    - ASSIGN_GLOBAL_NUMBER_AND_POP[$1b > -0x80000000L] GLOBAL_LVALUE($1a) DEC_AND_POP: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b - 1) - ASSIGN_GLOBAL_NUMBER_AND_POP[$1b < 0x7fffffff] GLOBAL_LVALUE($1a) INC_AND_POP: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b + 1) + ASSIGN_GLOBAL_NUMBER_AND_POP[!INT32_SUB_OVERFLOW($1b, 1)] GLOBAL_LVALUE($1a) DEC_AND_POP: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b - 1) + ASSIGN_GLOBAL_NUMBER_AND_POP[!INT32_ADD_OVERFLOW($1b, 1)] GLOBAL_LVALUE($1a) INC_AND_POP: ASSIGN_GLOBAL_NUMBER_AND_POP($1a, $1b + 1)      LOCAL_LVALUE LOCAL ADD_TO_AND_POP : ADD_LOCALS_AND_POP($1a,$2a)   LOCAL_LVALUE NUMBER ADD_TO_AND_POP: ADD_LOCAL_INT_AND_POP($1a,$2a)