jit/decoder: Fix decoder hash logic

Fixes `relevant_mask` calculation in arm32_init() to use bitwise AND
instead of OR. The previous logic incorrectly validated bits outside the
hash region, preventing valid instructions like 'BX` from being added to
the lookup table.

Increased LOOKUP_TABLE_MAX_BUCKET_SIZE from 8 to 16. Instructions with
wildcard bits in the hash region (eg, AND, EOR) must map to multiple
buckets to ensure O(1) lookup.

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar 2025-11-29 07:47:49 -04:00
parent 27710ca8c9
commit 2ea7647dc2
No known key found for this signature in database
GPG key ID: 04307C401999C596
3 changed files with 339 additions and 10 deletions

View file

@ -12,6 +12,7 @@ int main()
pound::jit::decoder::arm32_decode(0xE2800001);
/* Sub r0, r0, #1 */
pound::jit::decoder::arm32_decode(0xE2400001);
pound::jit::decoder::arm32_decode(0xE12FFF1E);
//pound::jit::ir::opcode_init();
#if 0