Table for multiplication by two
(stack: &mut StackTracker)
| 52 | |
| 53 | /// Table for multiplication by two |
| 54 | pub fn u4_push_shift_for_blake(stack: &mut StackTracker) -> StackVariable { |
| 55 | stack.custom( |
| 56 | script! { |
| 57 | OP_14 |
| 58 | OP_12 |
| 59 | OP_10 |
| 60 | OP_8 |
| 61 | OP_6 |
| 62 | OP_4 |
| 63 | OP_2 |
| 64 | OP_0 |
| 65 | OP_14 |
| 66 | OP_12 |
| 67 | OP_10 |
| 68 | OP_8 |
| 69 | OP_6 |
| 70 | OP_4 |
| 71 | OP_2 |
| 72 | OP_0 |
| 73 | }, |
| 74 | 0, |
| 75 | false, |
| 76 | 0, |
| 77 | "", |
| 78 | ); |
| 79 | stack.define(16, "lshift1") |
| 80 | } |
| 81 | |
| 82 | /// Assuming the u4 numbers X and Y are on top of the stack, calculates (16 * Y + X) >> n modulo 16 |
| 83 | pub fn u4_2_nib_shift_stack( |
no outgoing calls