-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Selftest: Add support for Armv7-M thumb
Previously, the selftest would fail for Armv7-M when the code under test uses both 16-bit and 32-bit instructions. This had multiple reasons: - Bad architecture an mode parameters for LLVM-MC and Unicorn in arch_v7m.py. - Missing `.thumb` and `.type _, %function` in the kernels assembled by the local selftest, leading to unset low-bits indicating the type of the code. A further issue existed on Mac: Even when assembling non-native architectures, LLVM-MC on Mac still emits a Mach-O object format, and Mach-O does not support the `.type` directive. To remedy, the `.type` directive is dynamically commented out from kernels to assembly, and the low-bit of the function symbol addresses set manually for thumb architectures. Signed-off-by: Hanno Becker <[email protected]>
- Loading branch information
1 parent
4c7b177
commit 1c46170
Showing
3 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters