diff options
Diffstat (limited to 'tests/alu')
-rw-r--r-- | tests/alu | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -8,6 +8,14 @@ # & : and # | : or # ^ : xor +# << : left shift extended with zeros +# <<1 : left shift extended with ones +# <<- : left shift extended with least significant bit +# <<< : left rotate +# >> : right shift extended with zeros +# 1>> : right shift extended with ones +# ->> : right shift extended with most significant bit +# >>> : right rotate 0x0123 + 0x1234 = 0x1357 Z=0 C=0 0x0123 - 0x1234 = 0xeeef Z=0 C=1 @@ -17,3 +25,19 @@ 0xaf74 & 0x7cc7 = 0x2c44 Z=0 C=0 0xaf74 | 0x7cc7 = 0xfff7 Z=0 C=0 0xaf74 ^ 0x7cc7 = 0xd3b3 Z=0 C=0 +0xfa0a << 0x01 = 0xf414 Z=0 C=0 +0xfa0a << 0x02 = 0xe828 Z=0 C=0 +0xfa0a >> 0x02 = 0x3e82 Z=0 C=0 +0xfa0a >> 0x04 = 0x0fa0 Z=0 C=0 +0xfa0a << 0x04 = 0xa0a0 Z=0 C=0 +0xfa0a <<1 0x04 = 0xa0af Z=0 C=0 +0xfa0a 1>> 0x04 = 0xffa0 Z=0 C=0 +0xfa0a <<- 0x04 = 0xa0a0 Z=0 C=0 +0xfa0a ->> 0x04 = 0xffa0 Z=0 C=0 +0xfa0a >>> 0x04 = 0xafa0 Z=0 C=0 +0xfa0a <<< 0x04 = 0xa0af Z=0 C=0 +0x0001 <<- 0x0e = 0x7fff Z=0 C=0 +0x0001 <<- 0x10 = 0xffff Z=0 C=0 +0x0001 ->> 0x10 = 0x0000 Z=1 C=0 +0x0001 <<- 0xff = 0xffff Z=0 C=0 +0x0001 ->> 0xff = 0x0000 Z=1 C=0 |