Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new memory instructions and native alignment #102

Merged
merged 2 commits into from
Jan 3, 2024

Commits on Dec 28, 2023

  1. Remove unused passes

    Signed-off-by: Mikhail Sherstennikov <[email protected]>
    shermike committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    d4733ba View commit details
    Browse the repository at this point in the history
  2. Support new memory instructions and native alignment

    All frontend fixes related to 256-bit alignment were removed.
    
    The main components affected by the new aligment:
    - Lowering: several nodes require custom lowering due to operands with unsuitable
      types(not i256).
    - Stack allocation: it still uses 256-bits slots for spill/fills, but memory for
      the local data could not be aligned in 256-bits. Thus, it should be taken into
      account and properly handled by EVMStackAllocation and EVMConvertRegToStack.
    - MC and Linker: now we can't treat all integers as 256-bits, therefore the MC
      emitter produces object files with more detailed description of data. Linker
      in turn supports this new description and support init data, which is not
      256-bit aligned now.
    
    Also added ability to use `evmone` as a VM for testing. But it has a drawback:
    it doesn't support precompiled contracts, so test for __evm_builtin_modpow is
    disabled for a while.
    
    Also, due to proper data size and alignment, `memset` function is working
    correctly now. So it's test was enabled.
    
    Signed-off-by: Mikhail Sherstennikov <[email protected]>
    shermike committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    4aa36c1 View commit details
    Browse the repository at this point in the history