|
|
@ -427,12 +427,12 @@ template <class Ext> dev::bytesConstRef dev::eth::VM::go(Ext& _ext, OnOpFunc con |
|
|
|
break; |
|
|
|
case Instruction::SIGNEXTEND: |
|
|
|
{ |
|
|
|
unsigned k = m_stack.back(); |
|
|
|
unsigned k = m_stack.back().convert_to<unsigned>(); |
|
|
|
m_stack.pop_back(); |
|
|
|
auto& b = m_stack.back(); |
|
|
|
if (k <= 31) |
|
|
|
if ((b >> (k * 8)) & 0x80) |
|
|
|
for (int i = 31; i > k; --i) |
|
|
|
for (unsigned i = 31; i > k; --i) |
|
|
|
b |= (u256(0xff) << i); |
|
|
|
break; |
|
|
|
} |
|
|
|