2 ms·
Correct. I have routines that take the unsigned values and interpret them as signed, two's-complement values. So you would write this: val = temp1 + temp
by gavinhoward 3y ago
Correct.
I have routines that take the unsigned values and interpret them as signed, two's-complement values.
So you would write this:
val = temp1 + temp2;
if (y_ssize_lt(val, temp1)) y_trap();
That `y_ssize_lt()` function computes whether `val` is less than `temp1` as though they were signed, two's-complement integers. But because they are actually unsigned, the compiler cannot be malicious and delete that code.
- kragen 3y agoi see, thanks maybe we should develop a nonmalicious compiler
- gavinhoward 3y agohttps://groups.google.com/g/boring-crypto/c/48qa1kWignU/m/o8GGp2K1DAAJ https://groups.google.com/g/boring-crypto/c/48qa1kWignU/m/o8...