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

Add support for new EVM opcodes #23878

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andelf
Copy link

@andelf andelf commented Jan 12, 2025

  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some lines in the book (optional)

This is blocked by: capstone-engine/capstone#2602

The repo URL is temperorily changed to my fork, use the following to build with the new EVM support:

sys/install.sh --with-capstone-next

Description

  • The Ethereum Virtual Machine (EVM) has introduced new opcodes since the original whitepaper's publication. This pull request incorporates these missing opcodes.
  • Opcode types are now revised for better visual distinction. All chain-related opcodes are marked as "CRYPTO" for easier identification.

Question

It is required to back-port these changes to capstone v4 and v5 using patch files?

@trufae
Copy link
Collaborator

trufae commented Jan 13, 2025

Screenshot from 2025-01-13 18-01-52

@trufae
Copy link
Collaborator

trufae commented Jan 13, 2025

if you think it's worth backporting (i dont think so) you can do it. i would opt for wrapping those cases with an ifdef depending on the version of capstone linked to radare2. I think it's fine to assume that r2 wont be able to use those instructions if you are linking to capstone 4 or 5 because distros need to update those packages when cs6 is out (dunno when will this happen).

@andelf
Copy link
Author

andelf commented Jan 13, 2025

@trufae Thanks for the heads up! I'll plan to add the required patches once capstone-engine/capstone#2602 lands.

UPDATE/EDIT: I was thinking it's required to make evm.c/evm.h compatible with the arch.evm plugin(capstone part). If it doesn't matter, then ifdef approach is acceptable.

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

Successfully merging this pull request may close these issues.

2 participants