(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack)
| 93 | } |
| 94 | |
| 95 | func opMod(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { |
| 96 | x, y := stack.pop(), stack.pop() |
| 97 | if y.Sign() == 0 { |
| 98 | stack.push(x.SetUint64(0)) |
| 99 | } else { |
| 100 | stack.push(math.U256(x.Mod(x, y))) |
| 101 | } |
| 102 | evm.interpreter.intPool.put(y) |
| 103 | return nil, nil |
| 104 | } |
| 105 | |
| 106 | func opSmod(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { |
| 107 | x, y := math.S256(stack.pop()), math.S256(stack.pop()) |