Browse Source

test cases for JUMPS/phi nodes

cl-refactor
artur-zawlocki 10 years ago
parent
commit
86949720b1
  1. 1
      evmcc/test/jump/loop1.evm
  2. 27
      evmcc/test/jump/loop1.lll
  3. 1
      evmcc/test/jump/loop2.evm
  4. 28
      evmcc/test/jump/loop2.lll

1
evmcc/test/jump/loop1.evm

@ -0,0 +1 @@
600a600181038060025900

27
evmcc/test/jump/loop1.lll

@ -0,0 +1,27 @@
;; Produces 1 2 3 4 5 6 7 8 9 10 on the stack and exits
(asm
10
;; 2
1
DUP2
SUB
DUP1
2
JUMPI
;; stack = 1 2 3 4 5 6 7 8 9 10
;;0
;;MSTORE
;;1
;;MSTORE
;;2
;;MSTORE
;;3
;;MSTORE
STOP
)

1
evmcc/test/jump/loop2.evm

@ -0,0 +1 @@
600a80600160800360a060025900

28
evmcc/test/jump/loop2.lll

@ -0,0 +1,28 @@
;; Produces 1 2 3 4 5 6 7 8 9 10 on the stack and exits
(asm
10
;; 2
DUP1
1
SWAP
SUB
DUP
2
JUMPI
;; stack = 1 2 3 4 5 6 7 8 9 10
;;0
;;MSTORE
;;1
;;MSTORE
;;2
;;MSTORE
;;3
;;MSTORE
STOP
)
Loading…
Cancel
Save