Index: third_party/yasm/patched-yasm/libyasm/value.c |
=================================================================== |
--- third_party/yasm/patched-yasm/libyasm/value.c (revision 165590) |
+++ third_party/yasm/patched-yasm/libyasm/value.c (working copy) |
@@ -25,7 +25,6 @@ |
* POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include "util.h" |
-/*@unused@*/ RCSID("$Id: value.c 2220 2009-07-24 19:01:35Z peter $"); |
#include "libyasm-stdint.h" |
#include "coretype.h" |
@@ -453,11 +452,18 @@ |
yasm_value_initialize(value, NULL, size); |
return 0; |
} |
+ yasm_value_initialize(value, e, size); |
+ return yasm_value_finalize(value, precbc); |
+} |
- yasm_value_initialize(value, |
- yasm_expr__level_tree(e, 1, 1, 0, 0, NULL, NULL), |
- size); |
+int |
+yasm_value_finalize(yasm_value *value, yasm_bytecode *precbc) |
+{ |
+ if (!value->abs) |
+ return 0; |
+ value->abs = yasm_expr__level_tree(value->abs, 1, 1, 0, 0, NULL, NULL); |
+ |
/* quit early if there was an issue in simplify() */ |
if (yasm_error_occurred()) |
return 1; |
@@ -549,13 +555,6 @@ |
return 0; |
} |
-int |
-yasm_value_finalize(yasm_value *value, yasm_bytecode *precbc) |
-{ |
- unsigned int valsize = value->size; |
- return yasm_value_finalize_expr(value, value->abs, precbc, valsize); |
-} |
- |
yasm_intnum * |
yasm_value_get_intnum(yasm_value *value, yasm_bytecode *bc, int calc_bc_dist) |
{ |