You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix evaluation of expressions during first assembler pass
During the first assembler pass, the SymbolTable does not yet have all
symbols. During a symbol lookup the SymbolTable has so far returned a
fake symbol for non-existing symbols, to make the assembler happy
(values are not really being used during the first pass, so it's ok).
However now that expressions are supported, when the symbol lookup
encountered expressions during pass 1, it assumed those expressions were
"not-yet-existing-symbols", which is of course incorrect as they will
eventually be evaluated to integer values. Some opcodes were unhappy with
receiving an expression during pass 1 (e.g. the req_wr opcode, which
expects a sane address as a first argument).
This commit simply skips creating instructions during the first pass,
because all instructions are 32-bit (4 bytes) long anyway, so the content
doesn't matter during that first assembler pass, which only measures
section sizes.
0 commit comments