MCPcopy Create free account
hub / github.com/CPChain/chain / opMulmod

Function opMulmod

core/vm/instructions.go:301–312  ·  view source on GitHub ↗
(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack)

Source from the content-addressed store, hash-verified

299}
300
301func 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,

Callers

nothing calls this directly

Calls 4

popMethod · 0.80
CmpMethod · 0.80
pushMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected