From a63aef39d19438d17d80a04cf29183dce81fc89b Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sun, 23 Apr 2017 11:28:25 +0100 Subject: [PATCH] Remove ROR/ROL --- EIPS/eip-draft_bitwise_shifts.md | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/EIPS/eip-draft_bitwise_shifts.md b/EIPS/eip-draft_bitwise_shifts.md index 0f42f9fc..3047beba 100644 --- a/EIPS/eip-draft_bitwise_shifts.md +++ b/EIPS/eip-draft_bitwise_shifts.md @@ -59,29 +59,7 @@ Notes: - `arg1` is interpreted as unsigned number. - If the shift amount is greater or equal 256 the result is 0 if `arg2` is non-negative or -1 if `arg2` is negative. -### `0x1e`: `ROL` (rotate left) - -The `ROL` instruction (rotate left) pops 2 values from the stack, `arg1` and `arg2`, and pushes on the stack the second popped value `arg2` circular shifted to the left by the number of bits in the first popped value `arg1`. - -``` -(arg1 shl arg2) or (arg1 shr (256 - arg2) -``` - -Notes: -- `arg2 rol arg1` is equivalent of `arg2 rol (arg1 mod 2^256)` - -### `0x1f`: `ROR` (rotate right) - -The `ROL` instruction (rotate right) pops 2 values from the stack, `arg1` and `arg2`, and pushes on the stack the second popped value `arg2` circular shifted to the right by the number of bits in the first popped value `arg1`. - -``` -(arg1 shr arg2) or (arg1 shl (256 - arg2) -``` - -Notes: -- `arg2 ror arg1` is equivalent of `arg2 ror (arg1 mod 2^256)` - -The cost of the shift instructions is set at `verylow` tier (3 gas), while the rotations are 12 gas each. +The cost of the shift instructions is set at `verylow` tier (3 gas). ## Rationale