Mercurial > hg > index.cgi
diff win/lwlib.vcxproj @ 505:59b8c8b15bd4
Add integer shifts and fix code template errors for mul/div/mod
One needs to remove stuff from the stack after putting it there. Actually do
that in the code output for multiplication, division, and modulus.
Add integer shifting code output which is optimized for constant shift
counts but calls a routine for non-constant shift counts. Shifting by a
negative amount is a no-op. Shifting by more than the size of an integer
results in 0 (for left shifts) or -1 (for right shifts). Both negative shift
counts and shift counts larger than the base type are undefined in the C
standard so this behaviour is allowed.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sat, 26 Oct 2019 22:01:55 -0600 |
parents | 4130ffdeb5c8 |
children |