diff options
author | Victor van den Elzen <victor.vde@gmail.com> | 2009-02-25 17:32:00 +0100 |
---|---|---|
committer | Victor van den Elzen <victor.vde@gmail.com> | 2009-02-25 17:32:00 +0100 |
commit | 154e5920a1ee2c816e502b70fe0c4ab3ea6ab7c1 (patch) | |
tree | 7c20d04a4f5b12241c58b54fd03d0d0ea3a030e0 /parser.c | |
parent | babebffb71f42e1d55095afea96f41e15acc28b1 (diff) | |
download | nasm-154e5920a1ee2c816e502b70fe0c4ab3ea6ab7c1.tar.gz nasm-154e5920a1ee2c816e502b70fe0c4ab3ea6ab7c1.tar.bz2 nasm-154e5920a1ee2c816e502b70fe0c4ab3ea6ab7c1.zip |
Do not confuse segmentless adresses and unknown forward references
Also be optimistic with immediate forward references.
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -737,6 +737,7 @@ restart_parse: return result; } else { if (e->type == EXPR_UNKNOWN) { + result->oprs[operand].opflags |= OPFLAG_UNKNOWN; o = 0; /* doesn't matter what */ result->oprs[operand].wrt = NO_SEG; /* nor this */ result->oprs[operand].segment = NO_SEG; /* or this */ @@ -818,9 +819,16 @@ restart_parse: if (is_just_unknown(value)) { /* it's immediate but unknown */ result->oprs[operand].type |= IMMEDIATE; + result->oprs[operand].opflags |= OPFLAG_UNKNOWN; result->oprs[operand].offset = 0; /* don't care */ result->oprs[operand].segment = NO_SEG; /* don't care again */ result->oprs[operand].wrt = NO_SEG; /* still don't care */ + + if(optimizing >= 0 && !(result->oprs[operand].type & STRICT)) + { + /* Be optimistic */ + result->oprs[operand].type |= SBYTE16 | SBYTE32 | SBYTE64; + } } else if (is_reloc(value)) { /* it's immediate */ result->oprs[operand].type |= IMMEDIATE; result->oprs[operand].offset = reloc_value(value); |