Paweł Bylica
05952064dc
Use Constant::get() interface to create LLVM constants
10 years ago
Paweł Bylica
16023daf0b
Allocate memory and count gas for RETURN instruction
[#79942174 ]
10 years ago
Paweł Bylica
f9f08d3223
Change the way compiled program returns
10 years ago
Paweł Bylica
9c268561bd
Define constants and return codes
10 years ago
Paweł Bylica
b56a815d2c
Report error if static-analysed stack is too small
10 years ago
artur-zawlocki
86949720b1
test cases for JUMPS/phi nodes
10 years ago
Paweł Bylica
0c708339e5
Do not check gas cost of value 0
[Delivers #80544260 ]
10 years ago
Paweł Bylica
1de697df99
Do not commit gas costs on JUMPDEST instruction
[#80544260 ]
10 years ago
Paweł Bylica
3ec44144e5
Change basic block linking order to get better results (still not perfect)
10 years ago
artur-zawlocki
deb0957087
test cases for JUMP
10 years ago
artur-zawlocki
1afcca2d0b
Implemented indirect JUMPI and fixes for JUMPs to invalid PCs
10 years ago
artur-zawlocki
c968a3b594
test cases for JUMP(I)
10 years ago
Paweł Bylica
c0a7d82b21
Always commit cost blocks
[#79942174 ]
10 years ago
Paweł Bylica
f6eef07d37
Use external counter for gas (external linkage global variable)
[#79942174 ]
10 years ago
Paweł Bylica
a03d47083e
Fix block cost counting (counter not reset)
10 years ago
Paweł Bylica
48710b5e5c
Count gas for additional memory
[#79942174 ]
10 years ago
Paweł Bylica
e1112c11c9
MSIZE test
10 years ago
Paweł Bylica
7c157f68f6
Wrong resize condition fixed
[Delivers #80191662 ]
10 years ago
Paweł Bylica
48ed393fb3
mload function added as implementation of MLOAD
[#80191662 ]
10 years ago
Paweł Bylica
0400b47357
store8 function added as implementation of MSTORE8
[#80191662 ]
10 years ago
Paweł Bylica
2df83af3be
Use mem.store as implementation of MSTORE
[#80191662 ]
10 years ago
Paweł Bylica
4a1511309c
Generate mem.store function and dependencies (currently unused)
[#80191662 ]
10 years ago
Paweł Bylica
35605271f1
Fix for finding jumpTableBlock
10 years ago
Paweł Bylica
4b8d51e23e
Renames & comments
10 years ago
artur-zawlocki
40e73d035c
Indirect jump: jump table generated in separate bblock.
10 years ago
Paweł Bylica
a5e264d385
Fix stack swap or dup not generating PHI nodes
10 years ago
artur-zawlocki
85606447d8
test cases for jumps
10 years ago
Paweł Bylica
936aeab43c
Group gas counting into block of instructions called cost-block.
[#79942174 ]
10 years ago
artur-zawlocki
209640c1f3
test cases for JUMP
10 years ago
artur-zawlocki
e915379539
Implementing JUMP/JUMPDEST (work in progress)
10 years ago
Paweł Bylica
dd3ae798b4
Disable gas checking for now (does not work and makes IR code hard to read)
[#79942174 ]
10 years ago
Paweł Bylica
b63b28b098
Generate gas checking function
10 years ago
Paweł Bylica
6c7de9fa0b
Cleanup LLVM types usage
10 years ago
Paweł Bylica
f8813b2843
Cleanup LLVM types usage
10 years ago
Paweł Bylica
989afa9406
Decrement global gas value by instruction step cost
[#79942174 ]
10 years ago
Paweł Bylica
5e3113e49e
Introducing GasMeter
10 years ago
Paweł Bylica
1a4cbdabef
EXP instruction.
[Delivers #79736422 ]
10 years ago
Paweł Bylica
0ec77d681c
Make the Stack an integral part of BasicBlock
10 years ago
Paweł Bylica
66123e8b35
JUMP test in assembly
10 years ago
Paweł Bylica
bec3e0fb36
Cleanup Compiler
10 years ago
Paweł Bylica
40ebe55a20
Provide end instruction to basic block
10 years ago
Paweł Bylica
0cba3d9005
Improve basic blocks linking implementation
10 years ago
Paweł Bylica
0e7ae8ece9
Remove external stack
10 years ago
Paweł Bylica
b644ff2d71
Stack cleanups
10 years ago
Paweł Bylica
bf7ca5cd01
Cleanups: move basic block linking to separated function
10 years ago
Paweł Bylica
d9c1617e60
Correct the order of basic blocks
10 years ago
Paweł Bylica
07659c441a
Link basic blocks with phi functions
[#80113672 ]
10 years ago
Paweł Bylica
5bf462e03d
Introducing BasicBlock class.
It is a wrapper for llvm::BasicBlock to provide additional information needed by EVM compiler. For now the order of basic blocks might not match bytecode.
[#80113672 ]
10 years ago
Paweł Bylica
3fa3bc8b30
Pop entry state of basic block from external stack, push exit state to external stack.
[Delivers #80113346 ]
10 years ago
Paweł Bylica
1bd7ade08b
Basic stack implementation for basic block. Values on stack are not preserved between basic blocks (jumps)
10 years ago