]> git.sur5r.net Git - cc65/commitdiff
Added a comment.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 7 Jul 2012 19:09:23 +0000 (19:09 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 7 Jul 2012 19:09:23 +0000 (19:09 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5769 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/coptshift.c

index 6489ab1d32a2002654a3fff4f5694c0ed46d4d38..95ad1bb4fcffc313d09d43c677dfa064209464c7 100644 (file)
@@ -444,6 +444,11 @@ unsigned OptShift4 (CodeSeg* S)
                  *     dey
                  *     bpl     L1
                  *     rol     a
+                 * 
+                 * A negative shift count or one that is greater or equal than 
+                 * the bit width of the left operand (which is promoted to 
+                 * integer before the operation) causes undefined behaviour, so
+                 * above transformation is safe.
                  */
                 CodeLabel* L;