Commit Graph

115 Commits

Author SHA1 Message Date
Lzu Tao
25758fa5f6 Fix and sil, <mem8> ##asm 2024-09-17 13:40:31 +02:00
Lzu Tao
e54aecc935 cleanup: Remove +9 hack for extended regs ##asm,x86 2024-09-17 13:39:14 +02:00
Lzu Tao
d976b65274 Fix #23326: handle sil/dil and r[0-9]b extended regs
Some checks failed
build / tarball (push) Failing after 0s
build / linux-static (push) Failing after 0s
build / check_abi_compatibility (push) Has been skipped
build / linux-acr-rpm-64 (push) Failing after 0s
build / linux-acr-deb (amd64) (push) Failing after 0s
build / linux-acr-deb (arm64, aarch64-linux-gnu) (push) Failing after 0s
build / linux-acr-deb (i386, multilib) (push) Failing after 0s
build / android-acr (16, arm) (push) Failing after 0s
build / android-acr (aarch64) (push) Failing after 0s
build / android-meson (x86_64) (push) Has been skipped
CI / linux-acr-oldlibsbug (push) Failing after 0s
CI / linux-nocs (push) Failing after 0s
CI / linux-acr-gperf (push) Failing after 0s
CI / linux-sys-capstone (push) Failing after 0s
CI / linux-acr-resymlink (push) Failing after 0s
CI / linux-test (push) Failing after 0s
CI / linux-static-meson (push) Failing after 0s
CI / linux-rpath (push) Failing after 0s
CI / linux-meson-spaces (push) Failing after 0s
CI / linux-tinyasan-fuzz (push) Failing after 0s
CI / linux-asan-fuzz (push) Failing after 0s
CI / w32-mingw (push) Failing after 0s
CI / w64-mingw (push) Failing after 0s
Code scanning - action / CodeQL-Build (push) Failing after 0s
Coverity Scan / latest (push) Failing after 0s
tcc / ubuntu-tcc-newabi (push) Failing after 0s
tcc / ubuntu-tcc-test (push) Failing after 0s
tcc / ubuntu-tcc-nodbg (push) Failing after 0s
tcc / r2pm-tcc (push) Failing after 0s
tcc / ubuntu-tcc-syslibs (push) Failing after 0s
2024-09-17 08:34:39 +02:00
pancake
5c1e26ae12 Fix #23322 - assembler for 'mov r(number), [reg+delta]' ##arch 2024-09-16 12:16:45 +02:00
kyufie
edb85d60c9 Add a bunch of tests (ARM) ##asm 2024-04-17 14:50:27 +02:00
pancake
6538a4f984 Fix assembling 'mov ax, bx' for x86-16 ##arch 2024-03-17 21:13:32 +01:00
Nathan
168be38dc4
Add Initial Support for assembling ARM MTE Instructions ##arch
* add init support for IRG ins, fails tests
* update irg instruction correctness, might still be issue with sp test case
* add third test example for irg based on binja
* remove unness masking, fix xzr value in irg
* add init support for addg, fails tests
* refactor irg encoding
* fix test formatting
* add addg instruction - passes test
* enable assembler tests for more mte instructions
* cleanup some error checking, add skele for detecting stg ins
* add init support for subg
* Add support for GMI instruction
* Add more tests for different kinds of store tag addr modes
* Add a few more instructions (subp, stg)

STG passes for pre-index and signed immediate tests, but still has an issue with post-indexing

* Add ldg instruction
* Add CMPP / SUBPS instruction that passes test
* Activate tests for more mte instructions

Currently disable subp as the encoding appears to be off and requires further investigation

* Add LDGM instruction
2024-03-07 22:15:03 +01:00
Kacper Słomiński
f3ef5d5fd2 Fix MVN handling in SNES plugin and add tests
Fix #22653.
2024-02-28 06:00:22 +01:00
pancake
1b3ba94036 Fix another oobread in the nds32 disassembler and add tests ##crash 2024-02-25 13:35:58 +01:00
pancake
dcfd86f794 Implement 'add r#, K' in the x86 assembler ##arch 2023-09-02 19:38:21 +02:00
pancake
c006c10f7b
Update arch from Config while finding best matches ##arch 2023-08-01 20:58:25 +02:00
pancake
f6b908c247 Fix #22061 - Add 'auipc' instruction for the RV64 assembler ##arch 2023-07-17 02:47:44 +02:00
pancake
b3469bb6cf Migrate the LAST and final boss X86 plugin ##arch
* anal.cc tests are the only tests marked as broken
* Bonus points: minor code cleanup here and there
* Thanks to Luc for all the work and chats to make it happen
2023-06-29 23:46:48 +02:00
pancake
6d16d55c00 Enhance RHex API preconditions and fix asan unit tests 2023-06-21 21:20:10 +02:00
pancake
9a32f3db86 Redesigned IO cache with layers ##io
* io.cache.read|write are now true by default
* io.cache-related unit tests disabled for now
2023-06-14 18:26:12 +02:00
pancake
f6b4acf809
Migrate the gameboy plugin ##arch 2023-06-14 14:27:10 +02:00
Murphy
a54704e95d
Migrate i8080 with full refactor ##arch 2023-05-31 19:26:22 +02:00
pancake
4fde137ff8 Improve adrp instruction assembler and add more tests ##asm
* Still far from perfect, but a bit more covered
2023-05-24 12:50:11 +02:00
pancake
72ad88a71e Implement 'call [rip+X]' for x86.nz and add tests ##asm 2023-05-04 12:14:33 +02:00
Yuvraj Saxena
9ad89fd980
Fix tb instruction for ARM assembler ##asm
Current code unconditionally drops last 2 bits without checking if those 2 bits are set or cleared,
if ignored these 2 bits are eventually lost and not encoded in machine instruction
and it's dangerous to assume destination supplied is valid to correct this I implemented a check.
Last 2 bits are discarded when final machine instruction is generated
and later in the decode phase this 14 bit immediate value (destination) is shifted left 2 bit positions,
and later sign extended to 64 bits that means we can actually encode a number with 16 bits but current code encodes only upto 14 bits. Thus, wasting 2 bits.
Also, Current code unconditionally parses last 5 bits from immediate 1, which is nothing but bit number to be tested in the register. Therefore, it must be within range 0-31 if 32 bit register is used, range must 0-63 if 64 bit register is used.
Also, in the case of 64 bit register only last 5 bits are encoded because it's later concatenated with MSB hence rendering a 6 bit number that can be used to denote bit positions between 0-63. To tackle this a check for this is implemented.
At last testcases are added to demonstrate these checks.
2023-03-19 13:08:25 +01:00
pancake
b340dea630 Fix some warnings on windows and unbreak few tests 2023-03-15 12:03:06 +01:00
pancake
b8bd90585f Fix spaces in cr16 tests 2023-03-13 17:42:32 +01:00
Yuvraj Saxena
046486862a
Add more conditional branch instructions for the arm64 assembler ##asm
* Add testcase and aliases for bhs conditional branch instruction for the arm64 assembler
* bcs and b.cs are aliases for bhs instruction
2023-03-05 18:06:59 +01:00
pancake
3b74c121b6 Implement conditional branch instruction for the arm64 assembler ##asm 2023-03-02 17:11:07 +01:00
pancake
b758db499a Fix alpha tests 2023-02-24 18:00:38 +01:00
pancake
c809882f38
Move the bpf plugins ##arch 2023-02-20 12:48:25 +01:00
pancake
96eee63285 Improve armass64 for tbz/tbnz to handle relative instructions ##asm 2023-02-13 22:53:22 +01:00
pancake
83ab8e718c
Rename evm.cs to evm ##arch 2023-01-29 21:22:18 +01:00
kyufie
1aa6cf6464 Add some test for ARM assembler ##test 2022-12-29 11:39:15 +01:00
pancake
19a377bbda Fix and move failing tests, reorder lib build ##arch 2022-11-30 15:43:54 +01:00
pancake
d5027d07d3 Support reg+idx and idx+reg in x86.nz assembler ##arch 2022-11-30 15:43:54 +01:00
pancake
37b279b6f4
Fix asm.acur supporting arch, anal and asm plugins ##arch
* Fix asm.acur supporting arch, anal and asm plugins ##arch

* Fixes the arch/bits combo selection order issue for riscv tests
* Move the riscv arch plugin to the new plugin structure
* Deprecate r_asm_setup ()
2022-11-26 17:49:10 +01:00
pancake
9243a98ae7
Move anal.v810 into arch.v810 ##arch 2022-11-14 23:45:59 +01:00
pancake
c9b90b8926
More refactorings and api redesigns in r_arch ##api 2022-11-10 16:01:57 +01:00
pancake
539c5aee90 Honor plugin name in rate matching for RArch.use ##arch
* Fixes amd29k regressions
2022-11-07 19:19:21 +01:00
Peter Meerwald-Stadler
e55a7bd605 Remove 64-bit instruction from 32-bit test file 2022-10-19 20:47:36 +02:00
Peter Meerwald-Stadler
444530137c
Fix rasm2 x86.nz for "xchg eax,eax" and add tests ##asm
rasm2 -a x86.nz -b 64 "xchg eax,eax" -> 87c0
rasm2 -a x86.nz -b 32 "xchg eax,eax" -> 90
2022-10-12 03:03:27 +02:00
pancake
36d13a1165 Fix sh asan issue 2022-10-09 00:55:18 +02:00
pancake
220bb2515b Fix asm tests for latest arm64 on capstone5-next 2022-10-06 20:32:30 +02:00
Sylvain Pelissier
847e453cad Start moving EVM analysis from extras to core ##arch 2022-09-20 18:11:27 +02:00
Sylvain Pelissier
76fa8dd2a2
Add push32 test for EVM (#20731)
Co-authored-by: Sylvain Pelissier <sylvain.pelissier@nagra.com>
2022-09-13 12:27:58 +02:00
pancake
578e42ffcb
move asm.arm_windebg to anal.arm_wd ##refactor 2022-09-06 14:24:55 +02:00
Denis Ovsienko
2c0951d44c Add a few tests for cBPF conditional jumps. ##tests
This should cover the recent bugfix for unsigned jump offsets.
2022-08-10 09:23:39 +02:00
pancake
652f96aadc
Fix ARC tests and improve r2r.asm output ##tests 2022-07-08 21:42:28 +02:00
pancake
bd3cc5f205 Disable failing test 2022-07-05 16:40:53 +02:00
Richard Patel
88c5447da9 Re-enable the bpf.mr assembler ##arch 2022-07-05 12:47:53 +02:00
condret
8c7dee3016 Remove all instances of "ptr " in x86 cs assembly output ##asm 2022-07-04 04:42:07 +02:00
pancake
5054382ec2 Fix ws test 2022-06-27 11:52:41 +02:00
pancake
f5fd629603
Merge asm.sparc into anal.sparc ##refactor
Co-authored-by: Richard Patel <me@terorie.dev>
Co-authored-by: pancake <pancake@nopcode.org>
2022-06-26 20:07:23 +02:00
Richard Patel
b7a3300596 Merge asm.alpha into anal.alpha ##refactor 2022-06-26 20:06:51 +02:00