opAddmod Multiplexed verification memory algorithm if z equals max uint
(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack)
| 286 | |
| 287 | // opAddmod Multiplexed verification memory algorithm if z equals max uint |
| 288 | func opAddmod(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { |
| 289 | x, y, z := stack.pop(), stack.pop(), stack.pop() |
| 290 | if z.Cmp(bigZero) > 0 { |
| 291 | x.Add(x, y) |
| 292 | x.Mod(x, z) |
| 293 | stack.push(math.U256(x)) |
| 294 | } else { |
| 295 | stack.push(x.SetUint64(0)) |
| 296 | } |
| 297 | evm.interpreter.intPool.put(y, z) |
| 298 | return nil, nil |
| 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() |