struct insn: remove unused forw_ref flag

The forw_ref flag in struct insn was being set but never actually read
anywhere.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2024-08-10 15:01:43 -07:00
parent 86142b00e1
commit 7c47273c45
3 changed files with 1 additions and 9 deletions

View File

@ -1564,10 +1564,8 @@ static void forward_refs(insn *instruction)
int i;
struct forwrefinfo *fwinf;
instruction->forw_ref = false;
if (!optimizing.level)
return; /* For -O0 don't bother */
return; /* For -O1 don't bother */
if (!forwref)
return;
@ -1575,7 +1573,6 @@ static void forward_refs(insn *instruction)
if (forwref->lineno != globallineno)
return;
instruction->forw_ref = true;
do {
instruction->oprs[forwref->operand].opflags |= OPFLAG_FORWARD;
forwref = saa_rstruct(forwrefs);

View File

@ -637,7 +637,6 @@ insn *parse_line(char *buffer, insn *result)
restart_parse:
first = true;
result->forw_ref = false;
stdscan_reset();
stdscan_set(buffer);
@ -988,9 +987,6 @@ restart_parse:
value = evaluate(stdscan, NULL, &tokval,
&op->opflags, critical, &hints);
i = tokval.t_type;
if (op->opflags & OPFLAG_FORWARD) {
result->forw_ref = true;
}
if (!value) /* Error in evaluator */
goto fail;

View File

@ -759,7 +759,6 @@ typedef struct insn { /* an instruction itself */
extop *eops; /* extended operands */
int eops_float; /* true if DD and floating */
int32_t times; /* repeat count (TIMES prefix) */
bool forw_ref; /* is there a forward reference? */
bool rex_done; /* REX prefix emitted? */
int rex; /* Special REX Prefix */
int vexreg; /* Register encoded in VEX prefix */