What would the tradeoffs be for, instead of using immediate opcodes, using the first element(s) of the stack for the DUP / SWAP as suggested here? EIP-? : Introduce Opcodes B0 DUPN and B1 SWAPN - #2 by gumb0
The immediate argument idea seems simpler to implement, so I assume it’s the best choice.
SWAP_N_M
as suggested by @charles-cooper would allow optimizing and cleaning a lot of EVM compiler code. Would it be in scope to add these three?
DUP_N
SWAP_N
SWAP_N_M