Browse Source

BNOT instruction [Delivers #81700198]

cl-refactor
Paweł Bylica 10 years ago
parent
commit
dd75da2d3a
  1. 1
      evmcc/test/arith/arith_bnot.evm
  2. 14
      evmcc/test/arith/arith_bnot.lll
  3. 11
      libevmjit/Compiler.cpp

1
evmcc/test/arith/arith_bnot.evm

@ -0,0 +1 @@
6201e2406000546000530960005460206000f2

14
evmcc/test/arith/arith_bnot.lll

@ -0,0 +1,14 @@
(asm
123456
0
MSTORE
0
MLOAD
BNOT
0
MSTORE
32
0
RETURN
)

11
libevmjit/Compiler.cpp

@ -372,14 +372,11 @@ void Compiler::compileBasicBlock(BasicBlock& basicBlock, bytesConstRef bytecode,
break;
}
/*case Instruction::NEG:
case Instruction::BNOT:
{
auto top = stack.pop();
auto zero = Constant::get(0);
auto res = m_builder.CreateSub(zero, top);
stack.push(res);
break;
}*/
auto value = stack.pop();
auto ret = m_builder.CreateXor(value, llvm::APInt(256, -1, true), "bnot");
}
case Instruction::LT:
{

Loading…
Cancel
Save