radare2/test/db/asm
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
..
6502 Merge asm.6502 into anal.6502 ##refactor 2022-06-15 14:51:53 +02:00
6502.cs Remove asm.6502_cs and merge disasm into the anal (#19632) 2022-01-26 16:37:19 +01:00
8051 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
alpha Fix alpha tests 2023-02-24 18:00:38 +01:00
amd29k_29000_32 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
arc_16 Fix ARC tests and improve r2r.asm output ##tests 2022-07-08 21:42:28 +02:00
arc_32 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
arm_16 Implement i4004 assembler ##asm (#18111) 2020-12-26 23:54:11 +01:00
arm_32 Add some test for ARM assembler ##test 2022-12-29 11:39:15 +01:00
arm_64 Fix tb instruction for ARM assembler ##asm 2023-03-19 13:08:25 +01:00
arm_cortex_16 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
arm.gnu_32 move asm.arm_windebg to anal.arm_wd ##refactor 2022-09-06 14:24:55 +02:00
arm.gnu_cortex_16 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
arm.gnu_wd_32 move asm.arm_windebg to anal.arm_wd ##refactor 2022-09-06 14:24:55 +02:00
arm.v35_64 Move arm64v35 tests from extras to main 2021-09-08 23:53:04 -07:00
avr Fix indent issues, pass out buffer size and fix disasm return value 2021-12-09 09:51:29 +01:00
bpf_32 Move the bpf plugins ##arch 2023-02-20 12:48:25 +01:00
bpf_64 Fix bpf's lddw <reg>, <imm> tests 2022-06-09 20:06:13 +02:00
bpf.mr Add a few tests for cBPF conditional jumps. ##tests 2022-08-10 09:23:39 +02:00
chip8 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
cr16 Fix spaces in cr16 tests 2023-03-13 17:42:32 +01:00
dalvik Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
ebc Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
evm Rename evm.cs to evm ##arch 2023-01-29 21:22:18 +01:00
gb fix #16995, #16994 and some other stuff 2020-06-10 02:24:03 +02:00
h8300 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
i4004_8 Honor plugin name in rate matching for RArch.use ##arch 2022-11-07 19:19:21 +01:00
i8080 Merge asm.i8080 into anal.i8080 and add a test ##refactor 2022-06-17 11:24:29 +02:00
java Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
lh5801 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
m68k Remove asm.m68k and merge disasm into the anal (#19637) 2022-01-28 09:30:15 +01:00
mips_64 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
mips_v2_64 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
mips.gnu_64 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
msp430 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
or1k Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
pdp11 Merge asm.pdp11 into anal.pdp11 ##refactor 2022-06-16 01:40:22 +02:00
pic_pic18_8 Fix some warnings on windows and unbreak few tests 2023-03-15 12:03:06 +01:00
riscv_32 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
riscv_64 Fix asm.acur supporting arch, anal and asm plugins ##arch 2022-11-26 17:49:10 +01:00
sh More refactorings and api redesigns in r_arch ##api 2022-11-10 16:01:57 +01:00
snes_16 Add tests for snes (#17988) ##arch 2020-12-03 09:49:36 +01:00
sparc Merge asm.sparc into anal.sparc ##refactor 2022-06-26 20:07:23 +02:00
tms320_c55x_32 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
tms320_c55x+_32 Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
v810_32 Move anal.v810 into arch.v810 ##arch 2022-11-14 23:45:59 +01:00
v850 Merge asm.v850 into anal.v850 and add a test ##refactor 2022-06-16 18:17:27 +02:00
v850_32 Fix ARC tests and improve r2r.asm output ##tests 2022-07-08 21:42:28 +02:00
wasm Implement Wasm SIMD instruction disassembly (#16928) 2020-05-22 13:58:56 +02:00
ws Fix ws test 2022-06-27 11:52:41 +02:00
x86_16 Fix #19489 - Implement assembler for jrcxz ##asm 2022-03-15 17:42:48 +01:00
x86_32 Remove 64-bit instruction from 32-bit test file 2022-10-19 20:47:36 +02:00
x86_64 Fix and move failing tests, reorder lib build ##arch 2022-11-30 15:43:54 +01:00
z80 Fix OOB access in z80 disasm for "OP [ixy+nn]" instructions. (#17268) 2020-07-14 11:58:16 +03:00