These 2 routines were adding and subtracting 1 to a range bound, and checking for overflow. Signed 1 bit values have a range of [-1, 0]. Adding or subtracting 1 cannot be properly represented resulting in the overflow being set.  This caused us to set UNDEFINED when we shouldn't. This patch changes it such that signed values always have -1 added or subtracted as appropriate, allowing for proper representation and overflow setting. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew