Skip to content

Conversation

@OBarronCS
Copy link

@OBarronCS OBarronCS commented Nov 9, 2025

This PR will upgrade WebAssembly to the new auto-sync mechanism. This is work-in-progress as I learn the auto-sync mechanism and the internals of Capstone.

The Capstone PR is capstone-engine/capstone#2816

std::move(OpDataTypes), AccessFlag});
}

if (InsOps.size() > 15) {
Copy link
Author

@OBarronCS OBarronCS Nov 9, 2025

Choose a reason for hiding this comment

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

Certain WebAssembly vector instructions can have 16 operands, like v128.const that takes 16 8-bit integers as the operand.

What was the original rationale for setting the maximum count of operands to 15?

Copy link
Collaborator

@Rot127 Rot127 Nov 9, 2025

Choose a reason for hiding this comment

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

No idea.

You can increase it as you wish. Just save the constant in a macro named NUM_WASM_OPS, this is a naming convention required for functions in Mapping.h

Please make yourself familiar with the helper functions in Mapping.h, MathExtras.h and utils.h. So you don't implemented something twice.

Sorry, wrong repo. I thought this was the Capstone PR :D

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is <capstone-repo>/Mapping.h::MAX_NO_INSN_MAP_OPS.
Can you please rename it here and add comment why it is set to this value.

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