unicorn-engine / unicorn

Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
http://www.unicorn-engine.org
GNU General Public License v2.0
7.33k stars 1.31k forks source link

xsavec triggers invalid instruction #1885

Closed niansa closed 3 months ago

niansa commented 9 months ago

I have this assembly:

    frame #0: 0x00007ffff7fdd438
->  0x7ffff7fdd438: xsavec 0x40(%rsp)
    0x7ffff7fdd43d: movq   0x10(%rbx), %rsi
    0x7ffff7fdd441: movq   0x8(%rbx), %rdi
    0x7ffff7fdd445: callq  0x7ffff7fdb030

And the marked line is where unicorn stops executing with UC_ERR_INSN_INVALID. Do I need so do something specific to support this instruction?

wtdcode commented 4 months ago

Probably need to switch cpu models

niansa commented 3 months ago

Is this documented anywhere?

wtdcode commented 3 months ago

https://github.com/unicorn-engine/unicorn/wiki/FAQ#emulating-some-instructions-gives-an-error-like-invalid-instruction-what-should-i-do

niansa commented 3 months ago

Ahhh, thank you! I was only looking at the website so far, completely missed the wiki!