diff options
author | Peter Wu <lekensteyn@gmail.com> | 2011-11-28 19:17:30 +0000 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2011-11-28 19:17:30 +0000 |
commit | 83d005c9c6937236523ae15eaef792c8ef3dae06 (patch) | |
tree | 6b158ced67556fe1947032cf720800184adb386a /README | |
parent | 0086c2a0a421df52be49817293fcdab0221e010f (diff) | |
download | pp2cc-83d005c9c6937236523ae15eaef792c8ef3dae06.tar.gz |
Fix shifting and document is better
Left shift was interpreted as right and left shift did not work properly for
negative values
Diffstat (limited to 'README')
-rw-r--r-- | README | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -54,7 +54,10 @@ function calls - supported, result is stored in register R0 (for int functions) A7.4 Unary Operators - supported: ++ -- + - ~ ! Unsupported: sizeof & * A7.5 Casts - unsupported A7.6-A7.7, A7.9-7.13 - supported: * / % + - < > <= >= == != & ^ | Left to right -A7.8 Shift - << >> is supported, if negative, no shift will be performed +A7.8 Shift - << >> is supported, if the second operand is negative, no shift +will be performed. The shift treats the first operand as an unsigned integer. +Example in bits assuming 4-bit words: 1000 (-8) >> 2 becomes 0010 (2), 0110 (6) +<< 1 becomes 1100 (-4) A7.14-A7.15 Logical AND && and OR || are supported. Result is indeed 0 or 1 A7.16 Conditional operator ? : - supported A7.17 Assignment - supported: = Unsupported: *= /= %= += -= <<= >>= &= ^= |= |