BeaEngine / beaengine

BeaEngine disasm project
515 stars 122 forks source link

Incorrect decode of vextract128 #25

Closed EricGrange closed 4 years ago

EricGrange commented 4 years ago

The vextract128 family destination register is disassembled in reversed order with a spurious ymm0 register, for instance

c4 c3 7d 19 c0 01 vextractf128 xmm8,ymm0,0x1

is disassembled as

vextractf128 ymm0, ymm0, xmm8, 01h

pfautrero commented 4 years ago

hmm, yes... all family vextractf is concerned. fix in progress

https://github.com/BeaEngine/beaengine/blob/master/tests/0f3a19.py https://github.com/BeaEngine/beaengine/blob/master/tests/0f3a1b.py

BeaEngine commented 4 years ago

fixed in commit BeaEngine/beaengine@93c728e

BeaEngine commented 4 years ago

you can check beta4 version here:

https://github.com/BeaEngine/beaengine/releases/tag/v5.0-beta4

EricGrange commented 4 years ago

Thanks! Using the Win64 DLL, the order appears fixed, but the spurious "ymm0" is still there ?

BeaEngine commented 4 years ago
    Buffer = 'c4c37d19c001'.decode('hex')
    myDisasm = Disasm(Buffer)
    myDisasm.read()
    assert_equal(myDisasm.infos.Instruction.Opcode, 0x19)
    assert_equal(myDisasm.infos.Instruction.Mnemonic, 'vextractf128 ')
    assert_equal(myDisasm.infos.repr, 'vextractf128 xmm8, ymm0, 01h')

that is not correct ?

EricGrange commented 4 years ago

Sorry, it is correct, I fat-fingered when extracting or copying the DLL :/ Thanks again!