From 21e1b864d8a08c00823238870fd05fe2a2b22af2 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sun, 19 Mar 2006 18:31:00 +0000 Subject: [PATCH] * value.c (value_finalize_expr): Check for purely -1*symrec cases; these are also invalid. * fwdequ64.asm: This test actually had a "4-label" expression; the correct way to write this is "4-(label-$$)" (same output generated). svn path=/trunk/yasm/; revision=1422 --- libyasm/value.c | 2 ++ modules/arch/x86/tests/fwdequ64.asm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libyasm/value.c b/libyasm/value.c index 8b398197..c5757604 100644 --- a/libyasm/value.c +++ b/libyasm/value.c @@ -153,6 +153,8 @@ value_finalize_scan(yasm_value *value, yasm_expr *e, int ssym_not_ok) break; /* stop looking */ } } + if (j == e->numterms) + return 1; /* We didn't find a match! */ } /* Look for unmatched symrecs. If we've already found one or diff --git a/modules/arch/x86/tests/fwdequ64.asm b/modules/arch/x86/tests/fwdequ64.asm index 4418fa4f..ac096a5f 100644 --- a/modules/arch/x86/tests/fwdequ64.asm +++ b/modules/arch/x86/tests/fwdequ64.asm @@ -1,4 +1,4 @@ [bits 64] l1: inc dword [l2] -l2 equ 4-l1 +l2 equ 4-(l1-$$) -- 2.40.0