|
@ -554,15 +554,11 @@ void Compiler::compileBasicBlock(BasicBlock& basicBlock, bytesConstRef bytecode, |
|
|
|
|
|
|
|
|
case Instruction::ANY_PUSH: |
|
|
case Instruction::ANY_PUSH: |
|
|
{ |
|
|
{ |
|
|
const auto numBytes = static_cast<size_t>(inst) - static_cast<size_t>(Instruction::PUSH1) + 1; |
|
|
auto curr = bytecode.begin() + currentPC; // TODO: replace currentPC with iterator
|
|
|
auto value = llvm::APInt(256, 0); |
|
|
auto value = readPushData(curr, bytecode.end()); |
|
|
for (auto lastPC = currentPC + numBytes; currentPC < lastPC;) |
|
|
currentPC = curr - bytecode.begin(); |
|
|
{ |
|
|
|
|
|
value <<= 8; |
|
|
|
|
|
value |= bytecode[++currentPC]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stack.push(m_builder.getInt(value)); |
|
|
stack.push(Constant::get(value)); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|