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

Decoded SQRTSS xmm1, xmm2 appears to read from xmm1 #542

Open
McSinyx opened this issue Dec 6, 2024 · 0 comments
Open

Decoded SQRTSS xmm1, xmm2 appears to read from xmm1 #542

McSinyx opened this issue Dec 6, 2024 · 0 comments

Comments

@McSinyx
Copy link

McSinyx commented Dec 6, 2024

Reproduced with this disasm-sqrtss.c:

#include <assert.h>
#include <stdio.h>
#include <Zydis/Zydis.h>

int main(void)
{
    const ZyanU8 data[] = {0xF3, 0x0F, 0x51, 0xCA};

    ZydisDisassembledInstruction instruction;
    assert(ZYAN_SUCCESS(ZydisDisassembleIntel(ZYDIS_MACHINE_MODE_LONG_64,
                                              0,
                                              data,
                                              sizeof(data),
                                              &instruction)));
    printf("%s\n", instruction.text);
    printf("first operand action read: %d\n",
           instruction.operands[0].actions & ZYDIS_OPERAND_ACTION_READ);

    return 0;
}
$ gcc -lZydis disasm-sqrtss.c 
$ ./a.out 
sqrtss xmm1, xmm2
first operand action read: 1

From the x86 manual, vol. 2B 4-665 (page 1891), xmm1 should be write-only.

@McSinyx McSinyx changed the title Decoded SQRTSS xmm1, xmm2 appear to read form xmm1 Decoded SQRTSS xmm1, xmm2 appears to read from xmm1 Dec 6, 2024
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

No branches or pull requests

1 participant