Commit Graph

235 Commits

Author SHA1 Message Date
Nikita 0dc008920f
Allow to override PYTHON[23] in Makefiles (#1639)
$(PYTHON2) and/or $(PYTHON3) might differ from python and/or python3,
accordingly. Allow to override these variables by user choice.
2020-05-30 10:51:02 +08:00
mquigley 66808143db #1246 - Fix Java bindings to use pointers instead of longs (#1516)
Previously, a long was used instead of a pointer in the JNA binding library.
This would work until the allocated pointers exceeded 32-bits. On modern JVMs,
allocations may produce pointers in excess of 32-bits which would result in
invalid memory access errors.

This also updates the binding version to 5.0.
2019-07-11 17:34:06 +08:00
Erik Hemming 5fdc7de0d9 Fix a couple of corner-cases with rarely used m68k instructions. (#1344)
* Bump the "cs_insn.bytes[]" size to 24 (from 16) to support M680x0 instructions with full EA (maximum 11 words)
Added a test for this in test_m68k.s

* Bump the "cs_detail.regs_read[]" size to 16 (from 12) to support M680x0 instructions with full REG_BITS (Dn+An = 16)

* m68k: use immediate mode syntax (#$0) for movem/fmovem instructions with empty register list

* update bindings to match changes to cs_insn and cs_detail
2019-01-21 17:42:28 +08:00
mephi42 d9b8079aba Update SystemZ to LLVM commit 5ad902a6 (#1306) 2018-12-16 21:48:51 +08:00
Nguyen Anh Quynh 2b4aec9c76 bindings: make bindings/const_generator.py compatible with recent reformat of C headers 2018-10-01 20:29:39 +08:00
Nguyen Anh Quynh a732cb0ca1 bindings: update PPC constants 2018-09-17 21:01:01 +08:00
xambroz 5c168e515d introduce PYTHON2 and PYTHON3 variables in the makefiles (#1236)
This change makes it possible to be explicit during the build time
on what python version/binary use to compile.
2018-08-29 12:26:53 +08:00
Nguyen Anh Quynh afffa5d741 merge next to master 2018-07-20 12:36:50 +08:00
keenk d03cab449d Update TestX86.java (#1208)
* Fix java bindings for encoding

Fix java bindings broken with addition of encoding struct in #1194

* Add files via upload


Update TestX86.java for printing encoding struct and register access

* Add files via upload

Added conditions to only print encoding class info when needed.
Formatting.

* Add files via upload

Another space
2018-07-13 15:52:19 +07:00
keenk e90af81ac8 Fix java bindings for encoding (#1202)
Fix java bindings broken with addition of encoding struct in #1194
2018-07-09 08:26:33 +07:00
Nguyen Anh Quynh ba25ab0fe1 Java: pump number of Mips operands to 10. see #1183 2018-06-19 09:36:38 +08:00
Nguyen Anh Quynh 519d526641 x86: support new instructions endbr64 & endbr32 2018-06-01 22:57:53 +08:00
Nguyen Anh Quynh 863ec0aba8 EVM: add missing files 2018-03-31 17:32:22 +08:00
Nguyen Anh Quynh bdbc57de63 m68k: update bindings after #1068 2018-01-06 20:16:58 +08:00
Nguyen Anh Quynh b5d366784a bindings: update after #1064 2017-12-21 09:15:24 +08:00
Nguyen Anh Quynh f48111db0e bindings: update after #1064 2017-12-21 09:14:05 +08:00
keenk df6b8e024f Fix type of eflags (#1063)
changed eflags to long
2017-12-20 22:15:22 +08:00
Wolfgang Schwotzer 22b4d0eb41 M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301

* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT

* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.

* M680X: Add python bindings. Added python tests.

* M680X: Added cpu types to usage message.

* cstool: Avoid segfault for invalid <arch+mode>.

* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.

* M680X: Update CMake/make for m680x support. Update .gitignore.

* M680X: Reduce compiler warnings.

* M680X: Reduce compiler warnings.

* M680X: Reduce compiler warnings.

* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).

* M680X: Add ocaml bindings and tests.

* M680X: Add java bindings and tests.

* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml

* M680X: Naming, use page1 for PAGE1 instructions (without prefix).

* M680X: Naming, use page1 for PAGE1 instructions (without prefix).

* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.

* M680X: Added access property to cs_m680x_op.

* M680X: Added operand size.

* M680X: Remove compiler warnings.

* M680X: Added READ/WRITE access property per operator.

* M680X: Make reg_inherent_hdlr independent of CPU type.

* M680X: Add HD6309 support + bug fixes

* M680X: Remove errors and warning.

* M680X: Add Bcc/LBcc to group BRAREL (relative branch).

* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.

* M680X: Remove LBRN from group BRAREL.

* M680X: Refactored cpu_type initialization for better readability.

* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.

* M680X: Remove typo in cstool.c

* M680X: Some format improvements in changed_regs.

* M680X: Remove insn id string list from tests (C/python/java/ocaml).

* M680X: SEXW, set access of reg. D to WRITE.

* M680X: Sort changed_regs in increasing m680x_insn order.

* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.

* M680X: cstool, also write '(in mnemonic)' for second reg. operand.

* M680X: Add BRN/LBRN to group JUMP and BRAREL.

* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.

* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.

* M680X: Rename some instruction handlers.

* M680X: Add M68HC05 support.

* M680X: Dont print prefix '<' for direct addr. mode.

* M680X: Add M68HC08 support + resorted tables + bug fixes.

* M680X: Add Freescale HCS08 support.

* M680X: Changed group names, avoid spaces.

* M680X: Refactoring, rename addessing mode handlers.

* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.

* M680X: Rename some M6809/HD6309 specific functions.

* M680X: Add CPU12 (68HC12/HCS12) support.

* M680X: Correctly display illegal instruction as FCB .

* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.

* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.

* M680X: Better support for changing insn id within handler for addessing mode.

* M680X: Remove warnings.

* M680X: In set_changed_regs_read_write_counts use own access_mode.

* M680X: Split cpu specific tables into separate *.inc files.

* M680X: Remove warnings.

* M680X: Removed address_mode. Addressing mode is available in operand.type

* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.

* M680X: Remove register TMP1. It is first visible in CPU12X.

* M680X: Performance improvement + bug fixes.

* M680X: Performance improvement, make cpu_tables const static.

* M680X: Simplify operand decoding by using two handlers.

* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.

* M680X: Format with astyle.

* M680X: Update documentation.

* M680X: Corrected author for m680x specific files.

* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
Nguyen Anh Quynh 0652e62cd8 binding: update following addition of GRP_BRANCH_RELATIVE 2017-07-30 19:06:29 +08:00
Francesco Tamagni 1fb2b53620 Add CS_MODE_MIPS2 to opt-in for COP3 instructions (#939)
* Add CS_MODE_MIPS2 to opt-in for COP3 instructions

* Fix indentation

* Get rid of `+`
2017-06-27 20:56:54 +08:00
Nguyen Anh Quynh bde76ebb40 x86: fix FPU flags so const_generator.py can generate proper Python symbols 2017-05-31 21:42:02 +08:00
Nguyen Anh Quynh 640bf3814e bindings: update FPU flags & FPU group for x86 after the last merge 2017-05-31 21:19:50 +08:00
Nguyen Anh Quynh 64328e3f56 x86: add UD0 instruction 2017-05-07 11:17:23 +08:00
Nguyen Anh Quynh 6f8bd55830 binding: add Ocaml & Java const files for TMS320C64x 2017-04-17 21:24:06 +08:00
Andreas Kirschbaum 7a8c7afd12 Java: Support cs_strerror() and cs_regs_access() 2016-11-27 13:59:12 +01:00
Andreas Kirschbaum 37b81f21cb Java: Fix a bug where Arm.OpInfo.memBarrier and Arm.OpInfo.op is wrongly calculated 2016-11-27 10:13:57 +01:00
Andreas Kirschbaum d31f94f7a1 Java: Fix a bug where Arm.Operand is wrongly calculated for the second and following operands 2016-11-26 13:15:53 +01:00
Nguyen Anh Quynh efd8b14471 bindings: regenerate consts 2016-10-25 14:30:13 +08:00
Nguyen Anh Quynh 10618e3e6a add CS_VERSION_{MAJOR, MINOR, EXTRA} 2016-10-25 14:29:21 +08:00
Nguyen Anh Quynh ffbb083f31 bindings: update some consts 2016-10-22 23:32:13 +08:00
Nguyen Anh Quynh 557495eb16 Merge pull request #766 from akihikodaki/next_test
java: Rename Test class to TestBasic
2016-09-04 15:36:53 +08:00
Akihiko Odaki 01f6dda00a java: Rename Test class to TestBasic 2016-09-04 12:39:20 +09:00
mrexodia f38cc69aac
changed fcompi to fcomip and fucompi to fucomip 2016-08-30 23:10:04 +02:00
Nguyen Anh Quynh e147e3a051 arm64: add NEGS & NGCS alias instructions. this fixes issue #752 2016-08-23 14:01:17 +08:00
Nguyen Anh Quynh dabc9f2990 x86: properly handle SSE/AVX instructions 2016-07-15 20:37:19 +08:00
Niels Boehm 7d4c660959 Fix typo in m68k constant for immediate operand. 2016-06-15 08:25:59 +02:00
Nguyen Anh Quynh 2f3241d376 Merge pull request #669 from zachriggle/next-mips
Add MIPS_GRP_INT and MIPS_GRP_CALL
2016-05-14 09:36:49 +08:00
Nguyen Anh Quynh 86e9dd494c bindings: update Java & Ocaml after recent change on M68k interface 2016-05-12 21:47:48 +08:00
Zach Riggle 5cb3fe320e Add MIPS_GRP_XXX aliases for generic types. 2016-05-03 07:30:31 -07:00
Nguyen Anh Quynh 7114a6258e binding: remove cx_x86_op::fp following the change in the core 2016-04-24 00:16:08 +08:00
Nguyen Anh Quynh c509fd10b1 m68k: fix conflicts when merging with #625 2016-04-12 19:58:29 +07:00
Nguyen Anh Quynh 1ab6455422 bindings: update after recent changes on some M68k enums 2016-04-12 18:47:19 +08:00
Nicolas PLANEL f670a23753 update generated bindings 2016-04-11 23:05:11 +10:00
Nguyen Anh Quynh f99bf5a320 java: return empty instead of NULL for disasm(). patch by Keve Müller 2015-11-14 18:50:37 +08:00
Nguyen Anh Quynh f752e9905a indentation 2015-11-14 18:40:11 +08:00
Keve Müller 0440c6708f Fix NPE when first instruction to disassemble is broken.
Return null instead.
2015-11-14 18:38:40 +08:00
Keve Müller 2ef8ef79e5 return empty instead null 2015-11-14 09:56:20 +01:00
Keve Müller 4a098bbd5d Fix NPE when first instruction to disassemble is broken.
Return null instead.
2015-11-12 22:51:57 +01:00
Nguyen Anh Quynh 57bf77af66 bindings: add M68k_const.java & m68k_const.ml 2015-10-03 11:32:24 +08:00
learn_more db5403d681 Missing definition 2015-08-02 20:13:29 +02:00