view COPYING @ 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 659e0e4ce50c
children
line wrap: on
line source

See the file GPL3 for a copy of the GNU General Public License, version 3,
under which the majority of this distribution is licensed. Any exceptions
will be noted in the relevant source files.