(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack)
| 299 | } |
| 300 | |
| 301 | func opMulmod(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { |
| 302 | x, y, z := stack.pop(), stack.pop(), stack.pop() |
| 303 | if z.Cmp(bigZero) > 0 { |
| 304 | x.Mul(x, y) |
| 305 | x.Mod(x, z) |
| 306 | stack.push(math.U256(x)) |
| 307 | } else { |
| 308 | stack.push(x.SetUint64(0)) |
| 309 | } |
| 310 | evm.interpreter.intPool.put(y, z) |
| 311 | return nil, nil |
| 312 | } |
| 313 | |
| 314 | // opSHL implements Shift Left |
| 315 | // The SHL instruction (shift left) pops 2 values from the stack, first arg1 and then arg2, |