28 Commits

Author SHA1 Message Date
Edward Larson 4f5401601b Fix for issue #427 (#429)
* Add support for MSP430

* Fix test-all.sh

* Use corrected TableGen output files

* Fix bindings for EVM and MSP430

* Remove LLVM_CONSTEXPR (like upstream LLVM did) and fix Java binding

See https://github.com/llvm-mirror/llvm/commit/6feedc56f7855aa24baf759f3bc17112ecbf5699#diff-d14f03e012a2bdbf93486dc1c4ce95ec

* Revert bindings

* Remove added files as well

* Add back changes for bindings created by const_gnerator

* Add back changes for other bindings

* Update CREDITS.TXT

* Fix ADRP instruction encoding

* Trigger checks on PR again, it failed for some reason unrelated to my code

* Add correct offset checks back in

* added llvm support post jan 2

* Remove bounds check on ppc branch instructions target address (fix issue 423)

* Fix vm address reset in aliased PPC instructions

* Fix vm address reset in aliased PPC instructions

(cherry picked from commit 06425a32f3)

* Remove bounds check on ppc branch instructions target address (fix issue 423)

(cherry picked from commit 06afb493e0)

* Clean up test for issue #427

Co-authored-by: Trey Keown <trey@redballoonsecurity.com>
Co-authored-by: Dan Pesce <dan@redballoonsecurity.com>
Co-authored-by: Trey Keown <jfktrey@gmail.com>
Co-authored-by: Nguyen Anh Quynh <aquynh@gmail.com>
2020-06-14 16:04:10 +08:00
Ta Thanh Dinh 6a444fc633 fix gcc's memaccess warning (#373) 2018-09-11 21:48:54 +08:00
Peter Matula 1815d79beb rename namespace "llvm" to "llvm_ks" (#333)
This prevents symbol collisions when the Keystone library is linked with the LLVM libraries.

Renaming was done by the following repository-wide substitutions:
* `namespace llvm` -> `namespace llvm_ks`
* `llvm::` -> `llvm_ks::`
2018-01-23 11:29:52 +08:00
Jatin Kataria c513bef6f2 added support to get current fragment size in the streamer interface. This fixes the address update issue in case of directive emitting values in between instructions and breaking the follow up relative jumps 2017-01-16 16:53:50 -05:00
Nguyen Anh Quynh 7623db887d support symbol resolving at run-time by adding new setup option KS_OPT_SYM_RESOLVER. see issue #244 2016-10-02 13:54:37 +08:00
Nguyen Anh Quynh eac9cc9d67 support new syntax RADIX16. see issue #11 2016-09-10 02:04:54 +08:00
Nguyen Anh Quynh eabf8a7434 fix issue #148 2016-06-05 18:19:13 +08:00
Nguyen Anh Quynh 1dc1e88a50 x86: fix issue #149 2016-06-05 15:36:21 +08:00
Nguyen Anh Quynh 4ea8d32d55 x86: fix issue #170 2016-06-05 14:02:42 +08:00
Nguyen Anh Quynh 834b08c374 x86: fix #157 & #160 by propagating error back to ks_asm() 2016-06-04 01:14:03 +08:00
Nguyen Anh Quynh 54685282e7 do boundary check for MCContext::Instances[]. this fixes crash-01-x64-empty-tombstone-value-shouldnt-be-inserted-into-map.c 2016-06-03 01:12:38 +08:00
Nguyen Anh Quynh 070b5add69 x86: fix crash-21-x64-llvm-error-expected-absolute-expression.c 2016-05-31 15:08:32 +08:00
Nguyen Anh Quynh 499f78265e handle error in peekTok(). this fixes c-crashes/crash-04-hexagon-readcount-not-equal-to-one.c 2016-05-31 00:43:35 +08:00
Nguyen Anh Quynh 64bea08278 x86: propagate error to ks_asm() to fix some testcases in c-crashes 2016-05-30 21:55:50 +08:00
Nguyen Anh Quynh 63317d5757 handle equal directive. this fixes c-crashes/crash-12-x64-cannot-set-a-variable-that-has-already-been-used.c 2016-05-30 01:52:44 +08:00
Nguyen Anh Quynh 6eb7703b3c handle error in applyFixup(). this fixes c-crashes/crash-23-x64-value-does-not-fit-in-the-fixup-field.c 2016-05-30 00:55:46 +08:00
Nguyen Anh Quynh e644380b1b handle parser error in getIntVal(), getAPIntVal() & Lex(). this fixes some crashes in c-crashes 2016-05-30 00:04:26 +08:00
Nguyen Anh Quynh 993edf92be handle error of EmitIntValue() to fix some ARM assertation bugs 2016-05-29 10:57:02 +08:00
Nguyen Anh Quynh f719c95bee remove assert() from AsmToken::getStringContents() 2016-05-22 19:03:54 +08:00
Nguyen Anh Quynh 3955891035 propagate error from encodeInstruction() back to ks_asm(). this fixes an issue in #9 2016-05-22 16:32:28 +08:00
Nguyen Anh Quynh fbea39ccd7 propagate the error of missing symbol back to ks_asm(). this adds new error code KS_ERR_ASM_SYMBOL_NOTFOUND. fix issue #61 2016-05-18 01:56:02 +08:00
Ingmar Steen 4bbe172aad Implement and test NASM default rel/abs directives 2016-05-14 10:45:06 +02:00
Ingmar Steen 3efea29173 Fix absolute symbol addresses.
By adding BaseAddress to MCContext, passing it from ks_asm and using it
to initialise the address of the first fragment we make sure that
symbols get the right absolute offset.
2016-05-12 20:33:09 +02:00
Nguyen Anh Quynh 27b03a29ad x86: ';' is now considered comment until EOL 2016-05-07 21:21:14 +08:00
Nguyen Anh Quynh 68e3ed8802 x86: support for NASM directive in db/dw/dd/dq 2016-05-07 17:53:29 +08:00
Nguyen Anh Quynh 104b1836a8 x86: fix issue #5 for AT&T syntax 2016-05-04 00:36:03 +08:00
Nguyen Anh Quynh bf695283e0 x86: initial support for NASM syntax 2016-04-30 17:54:01 +08:00
Nguyen Anh Quynh 9f1a353f68 import 2016-04-28 21:06:49 +08:00