From 352fe06e02034394107e2ad625018eff731a9b01 Mon Sep 17 00:00:00 2001 From: Victor van den Elzen Date: Wed, 10 Dec 2008 13:04:58 +0100 Subject: [PATCH] BR 2413272: Warn about byte displacement overflow Remove the special case for single byte displacements, which was already in out() anyway. --- assemble.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/assemble.c b/assemble.c index bf4314d1..0277d19e 100644 --- a/assemble.c +++ b/assemble.c @@ -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; } -- 2.11.4.GIT