]> granicus.if.org Git - yasm/commitdiff
* value.c (value_finalize_expr): Check for purely -1*symrec cases; these
authorPeter Johnson <peter@tortall.net>
Sun, 19 Mar 2006 18:31:00 +0000 (18:31 -0000)
committerPeter Johnson <peter@tortall.net>
Sun, 19 Mar 2006 18:31:00 +0000 (18:31 -0000)
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
modules/arch/x86/tests/fwdequ64.asm

index 8b398197e5c663c5638059521ae75d8e200fcd21..c5757604cea99781dce530b51ad967f217eafe27 100644 (file)
@@ -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
index 4418fa4f5201afd25e793524d5c9b859abd248e2..ac096a5fae2891fca94b9d3deba6463d3671caaa 100644 (file)
@@ -1,4 +1,4 @@
 [bits 64]
 l1:
 inc dword [l2]
-l2 equ 4-l1
+l2 equ 4-(l1-$$)