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

Incorrect broadcast format in MASM formatter #522

Open
sneves opened this issue Sep 4, 2024 · 1 comment
Open

Incorrect broadcast format in MASM formatter #522

sneves opened this issue Sep 4, 2024 · 1 comment
Labels
A-formatter Area: Formatter C-bug Category: This is a bug (or a fix for a bug, when applied to PRs) P-medium Priority: Medium

Comments

@sneves
Copy link

sneves commented Sep 4, 2024

Disassembling (for example) the byte sequence 62 f2 55 5b 64 5c 24 20 using the ZYDIS_FORMATTER_STYLE_INTEL_MASM formatting style yields

vpblendmd zmm3 {k3}, zmm5, dword ptr [rsp+80h] {1to16}

However this is not the correct format for MASM, and MASM will complain about it. The correct format for this would be

vpblendmd zmm3 {k3}, zmm5, dword bcst [rsp+80h]

as described in the MASM documentation.

@flobernd flobernd added C-bug Category: This is a bug (or a fix for a bug, when applied to PRs) A-formatter Area: Formatter P-medium Priority: Medium labels Sep 4, 2024
@flobernd
Copy link
Member

flobernd commented Sep 4, 2024

Hi @sneves, thanks for reporting.

So basically MASM syntax uses bcst instead of ptr to indicate broadcasting and as well omits the regular Intel style broadcast decorator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-formatter Area: Formatter C-bug Category: This is a bug (or a fix for a bug, when applied to PRs) P-medium Priority: Medium
Projects
None yet
Development

No branches or pull requests

2 participants