Don't warn for segmented references

Don't warn for overflow in segmented references; those are linker
references and it is up to the backend or the linker to warn if they
overflow their permitted size.
This commit is contained in:
H. Peter Anvin 2007-10-29 22:56:08 -07:00
parent 2ce0274303
commit 10e2727133

View File

@ -1247,7 +1247,9 @@ static void gencode(int32_t segment, int32_t offset, int bits,
else
size = (bits == 16) ? 2 : 4;
data = ins->oprs[c - 034].offset;
warn_overflow(size, data);
if (ins->oprs[c - 034].segment == NO_SEG &&
ins->oprs[c - 034].wrt == NO_SEG)
warn_overflow(size, data);
out(offset, segment, &data, OUT_ADDRESS + size,
ins->oprs[c - 034].segment, ins->oprs[c - 034].wrt);
offset += size;
@ -1269,7 +1271,9 @@ static void gencode(int32_t segment, int32_t offset, int bits,
case 047:
data = ins->oprs[c - 044].offset;
size = ins->addr_size >> 3;
warn_overflow(size, data);
if (ins->oprs[c - 044].segment == NO_SEG &&
ins->oprs[c - 044].wrt == NO_SEG)
warn_overflow(size, data);
out(offset, segment, &data, OUT_ADDRESS + size,
ins->oprs[c - 044].segment, ins->oprs[c - 044].wrt);
offset += size;