Commit graph

3985 commits

Author SHA1 Message Date
Rot127
d7e459d026
Add CS_aarch64 macro without parameter. (#2220) 2023-12-18 08:37:11 +08:00
Rot127
dec87d6190
Add tests for rename macros. (#2202) 2023-11-20 11:08:16 +08:00
Rot127
975a4f1467
Add meta-programming macros for ARM64/AArch64 name change to capstone.h (#2200) 2023-11-19 23:28:32 +08:00
Wu ChenXu
0efa3cc530
Merge pull request #1801 from kazarmy/clang-Wunneeded-decl-fix
M680X - remove unused s_cpu_type (#1695)
2021-12-02 16:24:39 +08:00
Anton Kochkov
0351008e6e M680X - remove unused s_cpu_type (#1695) 2021-12-01 19:21:25 +08:00
Quentin Buathier
a7cac8352f
Fix register accesses on x86 'test' instruction (#1751) 2021-05-17 22:55:01 +08:00
Khairul Azhar Kasmiran
8635f65661
Fix -Wstringop-truncation warnings (#1730) 2021-05-11 23:33:30 +08:00
Nguyen Anh Quynh
aa74f5d1ba code style fix 2020-12-03 16:12:21 +08:00
Michal Schulz
f886bb1c85 Honour direction bit in fmove instruction (#1709)
Co-authored-by: Michal Schulz <michal@Michals-iMac-Pro.local>
2020-12-03 16:12:09 +08:00
Catena cyber
20005dfdee python: only use ascii character (#1704)
Otherwise python setup.py install from bindings/python
will fail with
SyntaxError: Non-ASCII character '\xe2' in file setup.py on line 223,
but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
2020-11-18 00:11:48 +08:00
chfl4gs
b183f152ac fix conflicts 2020-11-15 08:50:53 +08:00
Keegan Saunders
b9889b447f Option to generate install target (#1698)
Co-authored-by: meme <meme@users.noreply.github.com>
2020-10-27 12:01:32 +08:00
StalkR
7ca653c7bd MCInst: fix uninitialized value in operand value (#1685)
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14912

Same as https://github.com/aquynh/capstone/pull/1684 for next branch
2020-09-16 17:07:15 +08:00
Carlo Marcelo Arenas Belón
918e9c431a include: avoid UB with signed overflow/shift (#1675)
if integer is 32-bit, and numeric literals default to int type,
the following applies (from The C Standard, 6.5.7, paragraph 4
[ISO/IEC 9899:2011]):

If E1 has a signed type and nonnegative value, and E1 × 2^E2 is
representable in the result type, then that is the resulting value;
otherwise, the behavior is undefined.

which means that the only way to safely shift is unsigned, so
use 1U to indicate the shifted bit is unsigned.
2020-09-16 17:02:53 +08:00
Carlo Marcelo Arenas Belón
32f17c2658 systemz: pad instruction width up to 6 bytes (#1679)
instructions could be 2, 4 or 6 bytes so pad accordingly as it
was done on the other CISC architecture.
2020-09-16 17:02:27 +08:00
junchao-loongson
659c01aa98 fix CS_ mips_ OP structure comment error (#1674) 2020-08-06 09:37:42 +08:00
Sergei Trofimovich
aeff08fea2 capstone.pc.in: use CMAKE_INSTALL_LIBDIR for libdir (#1659)
On x86_64-linux gentoo system capstone was installing
it's files to 'lib64' libdir, but was referring 'lib' libdir:

```
$ cat /usr/lib64/pkgconfig/capstone.pc
...
libdir=${prefix}/lib
...
```

On radare2 built it means injecting -L/usr/lib into a 64-build
and pulling in 32-bit libraries. 'ld.lld' is not able to resolve
the ambiguity.

It happens because @LIBSUFFIX@ is not present in cmake-3.17.3.

Let's fix the paths by using @CMAKE_INSTALL_LIBDIR@.
This variable is already used in capstone's build system,
thus should be safe to rely on.

Reported-by: Agostino Sarubbo
Bug: https://bugs.gentoo.org/730722
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2020-07-19 17:08:23 +08:00
Daniel Collin
2edae851d9 Fixed incorrect read of 32-bit imm for bsr (#1644) 2020-06-12 23:02:07 +08:00
Nikita
b1a46a48e6 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:52:25 +08:00
Nguyen Anh Quynh
1d23053284 update SPONSORS.TXT for v4.0.2 2020-05-08 18:03:30 +08:00
Nguyen Anh Quynh
f1590aaa9d ChangeLog and ReleaseNotes for 4.0.2 2020-05-07 22:03:36 +08:00
Nguyen Anh Quynh
4b7c130cbb update .gitignore 2020-05-07 22:01:56 +08:00
Disconnect3d
f6505950f1 Add __repr__ for capstone.CsInsn (#1625)
* Add __repr__ for capstone.CsInsn

Currently, a `print(instruction)` displays a not very useful string like `<capstone.CsInsn object at 0x7f3759d88128>`.

This PR enhances adds a `__repr__` magic method to the `capstone.CsInsn` class so it displays as follows:
```
<cs.CsInsn: address=0x5555555545fa, size=1, mnemonic=push, op_str=rbp>
```

* Update __init__.py
2020-05-05 01:54:09 +08:00
Summus
77bd07a305 Fix Makefile CAPSTONE_BUILD_CORE_ONLY (#1617)
Co-authored-by: Romain Lesteven <romain.lesteven@armaturetech.com>
2020-05-05 01:13:03 +08:00
NancyLi1013
df0d2b00fd Add vcpkg installation instructions (#1602) 2020-03-24 16:28:41 +08:00
Eric Schulte
94a6eb8409 Add Common Lisp bindings (#1605) 2020-03-23 09:14:41 +08:00
Morten Kristensen
98130bbb69 Fixed anon type in anon union error in m68k.h (#1597)
Apple Clang 11.0.0 error:
```
capstone/include/capstone/m68k.h:160:3: error: anonymous types declared in an anonymous union are an extension [-Werror,-Wnested-anon-types]
                struct {                    ///< register pair in one operand
                ^
```
2020-03-19 09:20:13 +08:00
david942j
154f91a5ff Add Ruby binding by david942j (#1599) 2020-03-10 20:16:31 +08:00
Leo Neat
c80b6aaf97 CIFuzz action (#1590) 2020-02-24 10:20:53 +08:00
Nicolas Derumigny
0932f167fd Bug solved: SSE variant of MOVSD incorrectly decoded as REPNE MOVSD (#1540) 2020-02-21 10:00:35 +08:00
Mateusz Piotrowski
cb2ba54477 Fix installation path on FreeBSD and DragonFly (#1589) 2020-02-19 12:34:42 +08:00
Nguyen Anh Quynh
abd310f5c4 python: classifier Python3 for setup.py 2020-01-26 13:28:00 +08:00
c0rejump
d57e7af368 resolve conflicts 2020-01-04 23:47:45 +08:00
c0rejump
13ef3f74bc Add missing bracket in top-level README.md file (#1579) 2020-01-04 23:46:22 +08:00
Nguyen Anh Quynh
b3e980668b Update .travis.yml
remove bionic gcc PPC (broken at Travis)
2020-01-04 23:46:22 +08:00
Anton Kochkov
8cfca1d759 Add ARM64, System Z & PowerPC CI (#1574)
* Add ARM64, System Z & PowerPC CI

* Install unzip
2020-01-04 23:46:22 +08:00
c0rejump
c7fe0f8aaa Update top-level COMPILE.TXT file (#1577)
Update section 2 - add missing mos65xx.h header and force
alphabetical order of core files.
2019-12-26 12:32:15 +08:00
meme
2553a75500 Add missing ENDBR32, ENDBR64 in reduce (#1555) 2019-12-26 12:31:52 +08:00
Schrijvers Luc
873c3e3454 Use GNUInstallDirs for the headers too (#1570) 2019-12-26 12:30:59 +08:00
Jiayi Zhao
a22aef2a18 systemz: fix base/index printing (#1561)
- In cases where base is 0 but index is not, Capstone doesn't print anything
2019-11-05 11:50:12 +08:00
Tom Kelly
c7d2b984af Fix for x86_op record for ocaml bindings (#1539) 2019-09-26 16:45:50 +08:00
Wu ChenXu
1592943592 Update README (#1534) 2019-08-30 23:38:15 +08:00
Scott Knight
caacf11822 Update Go binding information (#1532) 2019-08-28 14:22:56 +08:00
naq
c25923bc99 tests: fix typo in test_detail.c 2019-08-15 15:29:17 +08:00
Cen Zhang
7d63dc2de7 fix for make clean fail (#1524)
* fix for make.sh for android

* remove commented line

* fix make clean fail issue
2019-07-29 17:39:01 +08:00
Cen Zhang
6126800f4c fix for make.sh for android (#1523)
* fix for make.sh for android

* remove commented line
2019-07-27 00:54:58 +08:00
mquigley
1ccf14960f #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:35:06 +08:00
naq
9418acdfa7 systemz: fix truncated 64bit imm operand in issue #1515 2019-07-10 17:37:34 +08:00
Nguyen Anh Quynh
fbceb84271 tests: cleanup 2019-05-30 20:44:08 +08:00
Nguyen Anh Quynh
120847ea9e Merge branch 'v4' of github.com:aquynh/capstone into v4 2019-05-20 11:23:34 +08:00