Fix issue with SIGNEXTEND and refactor arithmetic
Our SIGNEXTEND was broken on positive numbers because for these numbers
it `Add`ed the sign extension mask rather than `And`ing it.
I took the opportunity to tidy up the arithmetical opcodes and add some
test.
Signed-off-by:
Silas Davis <silas@monax.io>
Showing
- binary/integer.go 44 additions, 1 deletionbinary/integer.go
- binary/integer_test.go 158 additions, 0 deletionsbinary/integer_test.go
- binary/word256.go 4 additions, 1 deletionbinary/word256.go
- binary/word256_test.go 4 additions, 0 deletionsbinary/word256_test.go
- execution/evm/common.go 0 additions, 40 deletionsexecution/evm/common.go
- execution/evm/stack.go 20 additions, 0 deletionsexecution/evm/stack.go
- execution/evm/vm.go 73 additions, 129 deletionsexecution/evm/vm.go
- execution/execution.go 9 additions, 9 deletionsexecution/execution.go
- logging/config/filter_test.go 16 additions, 0 deletionslogging/config/filter_test.go
- logging/lifecycle/lifecycle.go 1 addition, 3 deletionslogging/lifecycle/lifecycle.go
Loading
Please register or sign in to comment