BR 2413272: Warn about byte displacement overflow

Remove the special case for single byte displacements,
which was already in out() anyway.
This commit is contained in:
Victor van den Elzen 2008-12-10 13:04:58 +01:00
parent 2b5ad13bc1
commit 352fe06e02

View File

@ -1820,20 +1820,9 @@ static void gencode(int32_t segment, int64_t offset, int bits,
case 0:
break;
case 1:
if (opy->segment != NO_SEG) {
data = opy->offset;
out(offset, segment, &data, OUT_ADDRESS, 1,
opy->segment, opy->wrt);
} else {
*bytes = opy->offset;
out(offset, segment, bytes, OUT_RAWDATA, 1,
NO_SEG, NO_SEG);
}
s++;
break;
case 8:
case 2:
case 4:
case 8:
data = opy->offset;
warn_overflow(ea_data.bytes, opy);
s += ea_data.bytes;
@ -1852,6 +1841,12 @@ static void gencode(int32_t segment, int64_t offset, int bits,
ea_data.bytes, opy->segment, opy->wrt);
}
break;
default:
/* Impossible! */
errfunc(ERR_PANIC,
"Invalid amount of bytes (%d) for offset?!",
ea_data.bytes);
break;
}
offset += s;
}