forked from capstone-engine/capstone
-
Notifications
You must be signed in to change notification settings - Fork 0
Pulling from upstream #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or 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
* Fix a few registry access mode mappings * Fix rollback of operand access changes Re-fix operand access of three mov instructions * Remove binding breaking #if 0 The python script for generating constants in the bindings does not know how to handle the #if 0 statements included in these files.
- In cases where base is 0 but index is not, Capstone doesn't print anything
* Constify registerinfo.py output Remove two conditionals separating identical bits of code. Add "const" markup to MCRegisterDesc and MCRegisterClass. Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify instrinfo-arch.py output In this case, do not actively strip const. Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the AArch64 backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the EVM backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify M680X backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify M68K backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the Mips backend The Mips backend has not been regenerated from LLVM recently, and there are more fixups required than I'd like. Just apply the fixes to the tables by hand for now. Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the Sparc backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the TMS320C64x backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the X86 backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the XCore backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify systemregister.py output Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the ARM backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the PowerPC backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the MOS65XX backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the SystemZ backend The mapping of system register to indexes is easy to generate read-only. Since we know the indexes are between 0 and 31, use uint8_t instead of unsigned. Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the WASM backend Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify cs.c Signed-off-by: Richard Henderson <rth@twiddle.net> * Constify the BPF backend Signed-off-by: Richard Henderson <rth@twiddle.net>
Update section 2:
- add missing mos65xx.h header
- force alphabetical order (LANG=C) of core files
Update section 4:
- remove trailing space
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
^
```
* Add ARM64_GRP_PAC group for Pointer Authentication * Lowercase the group's name
Co-authored-by: Romain Lesteven <romain.lesteven@armaturetech.com>
* 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
$(PYTHON2) and/or $(PYTHON3) might differ from python and/or python3, accordingly. Allow to override these variables by user choice.
These additions simplify using capstone in cmake projects: find_package(capstone CONFIG REQUIRED) add_executable(main main.cpp) target_link_libraries(main PRIVATE capstone::capstone-static)
Co-authored-by: Mahesh Madhav <mahesh@amperecomputing.com>
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>
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.
instructions could be 2, 4 or 6 bytes so pad accordingly as it was done on the other CISC architecture.
* RISCV: Check CS_MODE_RISCVC in getFeatureBits Enable compressed instruction extension with RISCVC. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> * RISCV: Fix skipdata_size for CS_MODE_RISCVC RISC-V compressed instructions are 2 bytes, not 1. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Co-authored-by: meme <meme@users.noreply.github.com>
* update const generator for swift * groups constants by enum * use pascal case for enum names * use camel case for enum values * values are always literals * add extra options for some enums * use different types for some enums * generate option sets instead of enums for some types * renaming constants according to regex pattern * don't output documentation comments for non-exported defines * add Swift binding to readme
Co-authored-by: Michal Schulz <michal@Michals-iMac-Pro.local>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updating next branch from upstream