From b0c546269408e0ea7df4a6b6d9b1dc7a294e7307 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 28 Oct 2007 23:21:46 -0700 Subject: [PATCH] Fix bogus flagging of effective addresses as invalid Ah, what a difference a single ~ makes... such as flagging invalid EAs as valid and vice versa. --- assemble.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assemble.c b/assemble.c index 83a9a8a0..18cc7cff 100644 --- a/assemble.c +++ b/assemble.c @@ -1931,7 +1931,7 @@ static ea *process_ea(operand * input, ea * output, int bits, ix = 0; } - if (b != -1 && b >= EXPR_REG_START && b < REG_ENUM_LIMIT) { + if (b >= EXPR_REG_START && b < REG_ENUM_LIMIT) { bt = regvals[b]; bx = reg_flags[b]; } else { @@ -1957,7 +1957,7 @@ static ea *process_ea(operand * input, ea * output, int bits, return NULL; /* Invalid register */ if (~sok & bx & SIZE_MASK) return NULL; /* Invalid size */ - sok &= ~bx; + sok &= bx; } /* While we're here, ensure the user didn't specify -- 2.11.4.GIT