When issuing warnings for EA displacements, use the *EA* operand
authorH. Peter Anvin <hpa@zytor.com>
Fri, 24 Oct 2008 03:49:09 +0000 (20:49 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 24 Oct 2008 03:49:09 +0000 (20:49 -0700)
When issuing warnings for EA displacements during address generation,
actually look a the proper operand!

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
assemble.c

index aea3a5e..3f72991 100644 (file)
@@ -1808,7 +1808,7 @@ static void gencode(int32_t segment, int64_t offset, int bits,
                 case 2:
                 case 4:
                     data = ins->oprs[(c >> 3) & 7].offset;
-                   warn_overflow(ea_data.bytes, opx);
+                   warn_overflow(ea_data.bytes, &ins->oprs[(c >> 3) & 7]);
                     s += ea_data.bytes;
                    if (ea_data.rip) {
                        if (ins->oprs[(c >> 3) & 7].segment == segment) {