diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-02-27 21:47:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 21:47:07 +0800 |
commit | 2abc5be7e628c18562f1df546137fcb0748ecbb2 (patch) | |
tree | c4e1ed226c84414bbc9ed971aae79ed8f81bac9c /docs | |
parent | 6512bfbcea2fb76145b2163c9962599c2f09e0b9 (diff) | |
parent | 73c5d99bfaa4d17a97d4554a89d1005b25e62f98 (diff) | |
download | dexon-solidity-2abc5be7e628c18562f1df546137fcb0748ecbb2.tar.gz dexon-solidity-2abc5be7e628c18562f1df546137fcb0748ecbb2.tar.zst dexon-solidity-2abc5be7e628c18562f1df546137fcb0748ecbb2.zip |
Merge pull request #2541 from ethereum/asm-bitshift
Add bit shifting opcodes (EIP145)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/assembly.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/assembly.rst b/docs/assembly.rst index 46416142..cf9bf840 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -206,6 +206,12 @@ 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 y by x bits | ++-------------------------+-----+---+-----------------------------------------------------------------+ +| shr(x, y) | | C | logical shift right y by x bits | ++-------------------------+-----+---+-----------------------------------------------------------------+ +| sar(x, y) | | C | arithmetic shift right y by x 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 | |