Skip to content

Commit 7c47273

Browse files
author
H. Peter Anvin
committed
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>
1 parent 86142b0 commit 7c47273

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

asm/nasm.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -1564,18 +1564,15 @@ static void forward_refs(insn *instruction)
15641564
int i;
15651565
struct forwrefinfo *fwinf;
15661566

1567-
instruction->forw_ref = false;
1568-
15691567
if (!optimizing.level)
1570-
return; /* For -O0 don't bother */
1568+
return; /* For -O1 don't bother */
15711569

15721570
if (!forwref)
15731571
return;
15741572

15751573
if (forwref->lineno != globallineno)
15761574
return;
15771575

1578-
instruction->forw_ref = true;
15791576
do {
15801577
instruction->oprs[forwref->operand].opflags |= OPFLAG_FORWARD;
15811578
forwref = saa_rstruct(forwrefs);

asm/parser.c

-4
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,6 @@ insn *parse_line(char *buffer, insn *result)
637637

638638
restart_parse:
639639
first = true;
640-
result->forw_ref = false;
641640

642641
stdscan_reset();
643642
stdscan_set(buffer);
@@ -988,9 +987,6 @@ insn *parse_line(char *buffer, insn *result)
988987
value = evaluate(stdscan, NULL, &tokval,
989988
&op->opflags, critical, &hints);
990989
i = tokval.t_type;
991-
if (op->opflags & OPFLAG_FORWARD) {
992-
result->forw_ref = true;
993-
}
994990
if (!value) /* Error in evaluator */
995991
goto fail;
996992

include/nasm.h

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

0 commit comments

Comments
 (0)