Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Shift opcodes #4569

Closed
wants to merge 3 commits into from
Closed

Shift opcodes #4569

wants to merge 3 commits into from

Conversation

gcolvin
Copy link
Contributor

@gcolvin gcolvin commented Oct 2, 2017

SHL and SHR are well tested by test/unittests/performance/rc5.sol. SAR is only lightly tested.
The #define EIP_145 true in VMConfig.h will need to be turned off once all tests pass here.

@gcolvin gcolvin requested a review from axic October 2, 2017 04:57
@axic
Copy link
Member

axic commented Oct 2, 2017

Thanks @gcolvin! Would it be possible to merge in the changes into #4054 ?

@gcolvin
Copy link
Contributor Author

gcolvin commented Oct 2, 2017

@axic @chfast It appears we have been working independently on these opcodes here and in #4054, and that we have come up with different implementations. So one or the other of these should be merged, but not both. If I don't hear from you today perhaps we can discuss it after the staff meeting tomorrow.

@gcolvin
Copy link
Contributor Author

gcolvin commented Oct 3, 2017

Mostly redundant with #4054, differences to be kept should be merged there.

@gcolvin gcolvin closed this Oct 3, 2017
{
uint64_t amount = uint64_t(m_SP[0]);
m_SPP[0] = shiftee >> amount;
m_SPP[0] |= allbits << (256 - amount);
Copy link
Member

@chfast chfast Oct 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you have to check shiftee & hibit here as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants