Fix Disassembler-output on ARM Thumb2
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2018 22:53:26 +0000 (22:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2018 22:53:26 +0000 (22:53 +0000)
commitf9b81e36fd730eb33062b71d580f6a146f674486
tree8e96c1b6faab5af2308f63ab04052c9d71b9fc8a
parent2f6f87ae23ee5f9bb5e6aaced9095cc708622e45
Fix Disassembler-output on ARM Thumb2
https://bugs.webkit.org/show_bug.cgi?id=190203

On ARMv7 with Thumb2 addresses have bit 0 set to 1 to force
execution in thumb mode for jumps and calls. The actual machine
instructions are still aligned to 2-bytes though. Use dataLocation() as
start address for disassembling since it unsets the thumb bit.
Until now the disassembler would start at the wrong address (off by 1),
resulting in the wrong disassembled machine instructions.

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-10-02
Reviewed by Mark Lam.

* disassembler/CapstoneDisassembler.cpp:
(JSC::tryToDisassemble):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/disassembler/CapstoneDisassembler.cpp