Calculates n'th right shift of the top u4 element with both tables
(stack: &mut StackTracker, tables: StackVariable, n: u32)
| 36 | |
| 37 | /// Calculates n'th right shift of the top u4 element with both tables |
| 38 | pub fn u4_rshift_stack(stack: &mut StackTracker, tables: StackVariable, n: u32) -> StackVariable { |
| 39 | assert!((1..4).contains(&n)); |
| 40 | if n == 3 { |
| 41 | stack.number(8); |
| 42 | return stack.op_greaterthanorequal(); |
| 43 | } |
| 44 | stack.get_value_from_table(tables, Some(32 * (n - 1))) |
| 45 | } |
| 46 | |
| 47 | /// Calculates n'th left shift of the top u4 element with both tables |
| 48 | pub fn u4_lshift_stack(stack: &mut StackTracker, tables: StackVariable, n: u32) -> StackVariable { |
no outgoing calls