Commit Graph

473 Commits

Author SHA1 Message Date
billow
072b70fab4
feat: Add and remove TriCore instructions.
- Add 3 new TriCore instructions
- Remove TriCore instruction "TriCore_INS_INIT"
- Alphabetized and rearranged various TriCore instructions
- Commented out code remains in the diff but is not part of the program.
2023-04-14 00:35:34 +08:00
billow
0aeed244df
add tricore_feature support 2023-04-14 00:35:33 +08:00
billow
29ced4e735
refactor: Refactor TriCore instruction decoding and register definition.
- Update TriCore processor register definitions with auto-generated file `TriCoreGenCSRegEnum.inc`
- Add several new TriCore processor instructions with auto-generated file `TriCoreGenCSInsnEnum.inc`
- Update TriCore_OP_GROUP enumeration with auto-generated file `TriCoreGenCSOpGroup.inc`
- Rename and restructure TriCore processor register classes
- Remove unused register class definitions and related code
2023-04-14 00:35:32 +08:00
billow
b1f77e406f
add some tricore v1.1 inst 2023-04-14 00:35:27 +08:00
billow
18954aa9ea
fix 2023-04-14 00:35:09 +08:00
billow
8fc6eccd82
- add tricore to python binding
- try fix `test_corpus.py`
2023-04-14 00:34:59 +08:00
billow
c776b8c84f
fix build 2023-04-14 00:34:52 +08:00
billow
abf826a2a4
update TriCore*.inc 2023-04-14 00:34:51 +08:00
billow
c6138aca25
Fix build and test 2023-04-14 00:34:28 +08:00
billow
6b4d73191d
Fix rebase error 2023-04-14 00:34:27 +08:00
Sidney Pontes Filho
dfd368f691
Transfer modifications of TriDis/llvm-tricore on Feb, 04 2017 2023-04-14 00:34:25 +08:00
Sidney Pontes Filho
1a5d594a4e
Adjustments in TriCore and add more instructions into tests/test_tricore.c 2023-04-14 00:34:22 +08:00
Sidney Pontes Filho
87f935dae7
Transfer modifications of TriDis/llvm-tricore on Oct 05, 2016 2023-04-14 00:34:20 +08:00
Sidney Pontes Filho
82fcf25a5c
Remove all compiler warnings 2023-04-14 00:34:17 +08:00
Sidney Pontes Filho
a351c48ddc
Add group name maps 2023-04-14 00:34:12 +08:00
Sidney Pontes Filho
6374a774d4
Modify Makefiles for TriCore architecture 2023-04-14 00:34:08 +08:00
Sidney Pontes Filho
7449ebc836
Add TriCore Architecture 2023-04-14 00:34:07 +08:00
Wu ChenXu
6eb1db9c04
Merge pull request #1927 from ysat0/superh 2023-01-27 14:58:24 +08:00
ζeh Matt
7939e88ada
Update comment 2022-11-22 22:25:22 +02:00
ζeh Matt
6d6debeae2
Add post_index to arm 2022-11-22 22:25:08 +02:00
ζeh Matt
1e416c8e71
Add post_index field for cs_arm64 2022-11-22 19:23:32 +02:00
Yoshinori Sato
a819f6b8be SH: Add missing sh.h
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2022-10-20 13:04:56 +09:00
Yoshinori Sato
39f10cc243 Merge remote-tracking branch 'origin/next' into superh 2022-10-13 12:30:15 +09:00
Yoshinori Sato
c68acf3540 SH: Add superh support for common part.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2022-10-12 20:11:05 +09:00
Wu ChenXu
662bb3f6cc
Merge pull request #1907 from FinnWilkinson/AArch64-Armv9.2-update 2022-10-06 17:27:20 +08:00
Finn Wilkinson
d090c76703 Updated arm64.h to refelct changes to architecture in Armv9.2 and LLVM
14.0.5, and introduced new arm64 operand types.

New operand type for svcr MSR/MRS/SMSTART/SMSTOP instructions to
facilitate easier cstool printing.

New operand type for SME instructions with a matrix register that is
indexed.
2022-09-30 16:21:58 +01:00
Richard Patel
1a2dad1fae Add PPC paired-singles ext 2022-07-23 08:50:26 +02:00
Richard Patel
c5903cc46b Add eBPF callx instruction 2022-06-06 11:56:40 +02:00
Adam Seitz
3e23b60af0 Combine aarch64 sys operand enums 2022-03-18 14:15:46 -04:00
Adam Seitz
4b43021ab6 Build SYS operand for AArch64 sys operations 2022-03-18 09:43:13 -04:00
Jesús A. Álvarez
baa1f94cfd
mos65xx: use address on mem operands for relative addressing (#1702)
* mos65xx: use imm field for immediate operand value

using the wrong field works on little-endian hosts, but on big-endian the wrong value would be read

* mos65xx: set operand mem field to address also in relative modes

previously the last operand would have an offset, which doesn't match the printed operand

* mos65xx: add bpl instruction to test

this demonstrates an address operand with relative addressing
2021-03-10 08:21:31 +08:00
Carlo Marcelo Arenas Belón
298864e025 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:03:28 +08:00
junchao-loongson
f8b1b83301 fix CS_ mips_ OP structure comment error (#1674) 2020-08-06 09:37:19 +08:00
Mahesh Madhav
d956ceddab
Change include path to fix error with embedded cmake builds (#1649)
Co-authored-by: Mahesh Madhav <mahesh@amperecomputing.com>
2020-06-25 09:22:47 +08:00
elp0t0r1c0
e3f106739a
Add ARM64_GRP_PAC group for Pointer Authentication (#1607)
* Add ARM64_GRP_PAC group for Pointer Authentication

* Lowercase the group's name
2020-03-30 08:37:11 +08:00
Morten Kristensen
7432164722 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:44 +08:00
Jiayi Zhao
ae273a172d build: add xlc and AIX support (#1559) 2019-10-31 04:02:31 +08:00
keenk
d7536f0679 Remove binding breaking statements (#1543)
* 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.
2019-10-08 10:41:35 +08:00
ksherlock
05b3fbf2d7 updated 6502 support. (#1498)
* updated 6502 support. some improvements to the base 6502 support but also adds support for 65c02, w65c02, and 65816.

* add CS_OPT_SYNTAX_MOTOROLA.

This will use "$" as a hex prefix instead of "0x"

* remove excess blank lines
2019-06-03 23:20:51 +08:00
Nguyen Anh Quynh
c36674a5c3 remove deprecated API cs_disasm_ex() 2019-05-06 18:05:30 +08:00
Nguyen Anh Quynh
11206deb78 ppc: sync with llvm 7.0.1 2019-04-30 13:50:42 +08:00
Nguyen Anh Quynh
25b6704978 merge next-arm64 to next 2019-04-10 17:46:07 +08:00
Nguyen Anh Quynh
9d292268a9 arm64: sync with LLVM 7.0.1 2019-04-10 14:17:08 +08:00
Travis Finkenauer
7f7cda6429 Fix CS_ERR_X86_MASM doc typo (#1455) 2019-04-01 10:52:47 +08:00
blacktop
caa4a98e34 Update AARCH64 to ARMv8.1-4 (minus tablegen stuff) (#1425)
* updates for armv8.1-4

* Update AArch64Disassembler.c

* adding clang-format

* fix tabs

* fix indents

* fix tabs

* Update AArch64Disassembler.c

* Update AArch64Disassembler.c

* Update AArch64Disassembler.c

* Update AArch64Disassembler.c

* fix tables

* revert disass

* Update AArch64Disassembler.c

* Update AArch64Disassembler.c

* add AArch64InstPrinter new func stubs

* Update AArch64Mapping.c

* add baseinfo

* fix dates

* add AddressingModes.h

* Update AArch64Disassembler.c

* Update AArch64InstPrinter.c
2019-03-18 13:29:45 +08:00
Nguyen Anh Quynh
124f91b303 arm: sync with llvm 7.0.1 2019-03-16 15:22:15 +08:00
z
a012f75754 RISCV support ISRV32/ISRV64 (#1401)
* Added RISCV dir to contain the RISCV architecture engine code. Adding the TableGen files generated from llvm-tblgen. Add Disassembler.h

* Started working on RISCVDisassembler.c - RISCV_init(), RISCVDisassembler_getInstruction, and RISCV_getInstruction

* Added all functions to RISCVDisassembler.c and needed modifications to RISCVGenDisassemblerTables.inc. Add and modified RISCVGenSubtargetInfo.inc. Start creation of RISCVInstPrinter.h

* Finished RISCVGenAsmWriter.inc. Finished RISCVGenRegisterInfo.inc. Minor fixes to RISCVDisassembler.c. Working on RISCVInstPrinter

* Finished RISCVInstPrinter, RISCVMapping, RISCVBaseInfo, RISCVGenInstrInfo.inc, RISCVModule.c. Working on riscv.h

* Backport it from: 0db412ce3b

* All RISCV files added. Compiled correctly and initial test for ADD, ADDI, AND works properly.

* Add refactored cs.c for RISCV

* Testing all I instructions in test_riscv.c

* Modify the orignal backport for RISCVGenRegisterInfo.inc, capstone.h and test_iter to work w/ the current code strcuture

* Fix issue with RISCVGenRegisterInfo.inc - RISCVRegDesc[] (Excess elements in struct initializer). Added RISCV tests to test_iter.c

* fixed bug related to incorrect initialization of memory after malloc

* fix compile bug

* Fix compile errors.

* move riscv.h to include/capstone

* fix indentation issues

* fix coding style issues

* Fix indentation issues

* fix coding style

* Move variable declaration to the top of the block

* Fix coding indentation

* Move some stuff into RISCVMappingInsn.inc

* Fix code sytle

* remove cs_mode support for RISCV

* update asmwriter-inc to LLVM upstream

* update the .inc files to riscv upstream

* update riscv disassembler function for suport 16bit instructions

* update printer & tablegen inc files which have fixed arguments mismatch

* update headers and mapping source

* add riscv architecture specific test code

* fix all RISCV tons of compiler errors

* pass final tests

* add riscv tablegen patchs

* merge with upstream/next

* fix cstool missing riscv file

* fix root Makefile

* add new TableGen patchs for riscv

* fix cmakefile.txt of missing one riscv file

* fix declaration conflict

* fix incompatible declaration type

* change riscvc from arch to mode

* fix test_riscv warnning

* fix code style and add riscv part of test_basic

* add RISCV64 mode

* add suite for riscv

* crack fuzz test

* fix getfeaturebits test add riscvc

* fix test missing const qualifier warnning

* fix testcase type mismatch

* fix return value missing

* change getfeaturebits test

* add test cs files

* using a winder type contain the decode string

* fix a copy typo

* remove useless mode for riscv

* change cs file blank type

* add repo for update_riscv & fix cstool missing riscv mode

* fix typo

* add riscv for cstool useage

* add TableGen patch for riscv asmwriter

* clean ctags file

* remove black comment line

* fix fuzz related something

* fix missing RISCV string of fuzz

* update readme, etc..

* add riscv *.s.cs file

* add riscv *.s.cs file & clear ctags

* clear useless array declarations at capstone_test

* update to 5e4069f

* update readme change name more formal

* change position of riscv after bpf and modify copyright more uniform

* clear useless ctags file

* change blank with tab in riscv.h

* add riscv python bindings

* add riscv in __init__.py

* fix riscv define value for python binding

* fix test_riscv.py typo

* add missing riscvc in __init__.py of python bindings

* fix alias-insn printer bug, remove useless newline

* change inst print delimter from tab to bankspace for travis

* add riscv tablegen patch

* fix inst output more consistency

* add TableGen patch which fix inst output formal

* crack the effective address output for detail and change register print function

* fix not detail crash bug

* change item declaration position at cs_riscv

* update riscv.py

* change function name more meaningfull

* update python binding makefile

* fix register enum sequence according to riscvgenreginfo.inc

* test function name

* add enum s0/fp in riscv.h & update riscv_const.py

* add register name enum
2019-03-09 08:41:12 +08:00
Nguyen Anh Quynh
da152c7918 x86: add BND registers. this fixes OSS-fuzz issue 13467 2019-03-02 14:58:29 +08:00
Nguyen Anh Quynh
dd91f03fef x86: update ISA & mapping tables 2019-03-01 01:05:52 +08:00
Nguyen Anh Quynh
5a99624074 sync with LLVM 7.0.1. X86 is first 2019-02-26 15:19:51 +08:00