diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-07 06:42:27 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-02-27 20:42:28 +0800 |
commit | 9e0446a22c78e8a293a742492f2d2d7cd67af4bd (patch) | |
tree | f5fef11ba10375f046d5d20fef568838d1bda481 /docs | |
parent | 59e6ea601b90577e39fe22a4c504f09e862dc40e (diff) | |
download | dexon-solidity-9e0446a22c78e8a293a742492f2d2d7cd67af4bd.tar.gz dexon-solidity-9e0446a22c78e8a293a742492f2d2d7cd67af4bd.tar.zst dexon-solidity-9e0446a22c78e8a293a742492f2d2d7cd67af4bd.zip |
Document bitwise shift operators in assembly
Diffstat (limited to 'docs')
-rw-r--r-- | docs/assembly.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/assembly.rst b/docs/assembly.rst index 46416142..245b5383 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -206,6 +206,16 @@ In the grammar, opcodes are represented as pre-defined identifiers. +-------------------------+-----+---+-----------------------------------------------------------------+ | byte(n, x) | | F | nth byte of x, where the most significant byte is the 0th byte | +-------------------------+-----+---+-----------------------------------------------------------------+ +| shl(x, y) | | C | logical shift left x by y bits | ++-------------------------+-----+---+-----------------------------------------------------------------+ +| shr(x, y) | | C | logical shift right x by y bits | ++-------------------------+-----+---+-----------------------------------------------------------------+ +| sar(x, y) | | C | arithmetic shift right x by y bits | ++-------------------------+-----+---+-----------------------------------------------------------------+ +| ror(x, y) | | C | rotate right x by y bits | ++-------------------------+-----+---+-----------------------------------------------------------------+ +| rol(x, y) | | C | rotate left x by y bits | ++-------------------------+-----+---+-----------------------------------------------------------------+ | addmod(x, y, m) | | F | (x + y) % m with arbitrary precision arithmetics | +-------------------------+-----+---+-----------------------------------------------------------------+ | mulmod(x, y, m) | | F | (x * y) % m with arbitrary precision arithmetics | |