summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-04-30 20:59:21 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-04-30 20:59:21 +0000
commitaf535c16cf3f9f628384ec834e3aa325709cb37b (patch)
treec582b65fc34ae4e66aa559ebe901c76aefa05bd5 /parser.c
parent41bf8002b2fa402bd344a290fcc9f65de328859c (diff)
downloadnasm-af535c16cf3f9f628384ec834e3aa325709cb37b.tar.gz
nasm-af535c16cf3f9f628384ec834e3aa325709cb37b.tar.bz2
nasm-af535c16cf3f9f628384ec834e3aa325709cb37b.zip
NASM 0.98.03
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/parser.c b/parser.c
index 1a9c9e4..0a85c9e 100644
--- a/parser.c
+++ b/parser.c
@@ -647,8 +647,13 @@ insn *parse_line (int pass, char *buffer, insn *result,
result->oprs[operand].offset = reloc_value(value);
result->oprs[operand].segment = reloc_seg(value);
result->oprs[operand].wrt = reloc_wrt(value);
- if (is_simple(value) && reloc_value(value)==1)
- result->oprs[operand].type |= UNITY;
+ if (is_simple(value)) {
+ if (reloc_value(value)==1)
+ result->oprs[operand].type |= UNITY;
+ if (reloc_value(value) >= -128 &&
+ reloc_value(value) <= 127)
+ result->oprs[operand].type |= SBYTE;
+ }
}
else /* it's a register */
{