From d9e94740a5ca5ed79594afb9db7c1c5c92872a48 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Wed, 19 Jan 2022 13:48:08 -0400 Subject: opcode-bitmask-gen: Fixed bug that occurred when masking out unwanted bits when inverting the addressing mode bitmask. --- opcode-bitmask-gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opcode-bitmask-gen.c b/opcode-bitmask-gen.c index f59969f..9781e2f 100644 --- a/opcode-bitmask-gen.c +++ b/opcode-bitmask-gen.c @@ -436,7 +436,7 @@ uint32_t get_addr_mode_bits(const char **list, int *ext) { } is_ext = (bits & ext_mask) ? 1 : is_ext; - addr_modes |= (is_inv) ? ~(bits) & (max_addr_mode_mask & (is_ext) ? -1 : ~ext_mask) : bits; + addr_modes |= (is_inv) ? ~(bits) & (max_addr_mode_mask & ((is_ext) ? -1 : ~ext_mask)) : bits; addr_modes &= (is_ext && (bits & ~(AM_ORTHO|AM_ORTHO2))) ? ~(AM_ORTHO|AM_ORTHO2) : -1; if (is_ext) { -- cgit v1.2.3-13-gbd6f