]> granicus.if.org Git - yasm/commitdiff
Move libyasm-stdint.h include out of util.h, as util.h is included from
authorPeter Johnson <peter@tortall.net>
Sat, 24 Feb 2007 04:16:05 +0000 (04:16 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 24 Feb 2007 04:16:05 +0000 (04:16 -0000)
build platform files.

While here, fix a few warnings by pushing uintptr_t to a few more register
usages.

Noticed by: rugxulo@gmail.com

svn path=/trunk/yasm/; revision=1786

20 files changed:
libyasm/arch.c
libyasm/bc-align.c
libyasm/bc-data.c
libyasm/bc-incbin.c
libyasm/bc-insn.c
libyasm/bc-org.c
libyasm/bc-reserve.c
libyasm/bytecode.c
libyasm/expr-int.h
libyasm/expr.c
libyasm/expr.h
libyasm/hamt.c
libyasm/section.c
libyasm/symrec.c
libyasm/valparam.c
libyasm/value.c
modules/objfmts/coff/coff-objfmt.c
modules/preprocs/nasm/nasm-eval.c
modules/preprocs/nasm/nasm-pp.c
util.h

index 9fc8aea43c936cc66908f6da1ca0890439a88256..dd849ebce5428a70156d28fe14851ab4c36df0da 100644 (file)
@@ -29,6 +29,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 
 #include "expr.h"
@@ -131,7 +132,8 @@ yasm_operand_print(const yasm_insn_operand *op, FILE *f, int indent_level,
            fprintf(f, "\n");
            break;
     }
-    fprintf(f, "%*sTargetMod=%lx\n", indent_level+1, "", op->targetmod);
+    fprintf(f, "%*sTargetMod=%lx\n", indent_level+1, "",
+           (unsigned long)op->targetmod);
     fprintf(f, "%*sSize=%u\n", indent_level+1, "", op->size);
     fprintf(f, "%*sDeref=%d, Strict=%d\n", indent_level+1, "", (int)op->deref,
            (int)op->strict);
index 109d1b4a3e0ac7e62535247a783dde2cd2c151d9..0a3a3a78de020033c331f6ce33558e25790fd86d 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 
 #include "errwarn.h"
index c6b5e37aa13e00f4cb556e65f962eb51791e20e9..8a32f72a8c7b7215e63f8aa0e767170768723ab6 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 
 #include "errwarn.h"
index 1c51764e5ccb4a433f5fd1b52a16e7e405e61551..79c1a9fbc3d732db50b314cb795d824352e0ce9c 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 
 #include "linemap.h"
index c7dd18916e2b163b72dba9a678afb74543aeaff5..b4d9ce1b376d7deda0f2ba6dc2453e8ca6f000ec 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 
 #include "errwarn.h"
index 646d43cc8ec839c58fef319aa42887e28414942c..67b278e85c73854e05364688b1b81c48da41345d 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 #include "file.h"
 
index c8ec7aa0098622d8e0a15002b36f99bbaa019cb8..ab1360bbb8a9ed19ff5e119b60153d0867bbc971 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 
 #include "errwarn.h"
index 7fe31be855b7eeb243ff15b3a18e69836cf17d1d..80fcaa88d40df140e7a34fbc587c7e257a01eaa7 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 
 #include "errwarn.h"
index 64762799a2e9e6e7385424a420c146c0b84cc27c..c5e0689eee8c19540c3fd3128e30b26916e7896b 100644 (file)
@@ -50,7 +50,7 @@ struct yasm_expr__item {
        yasm_expr *expn;
        yasm_intnum *intn;
        yasm_floatnum *flt;
-       unsigned long reg;
+       uintptr_t reg;
        unsigned int subst;
     } data;
 };
index ea0cb133293ca4562c5d69df1e8f9abe4be92cd8..461dd1bce33b0e4bb3099992a0a3035578559be7 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 #include "bitvect.h"
 
@@ -185,7 +186,7 @@ yasm_expr_float(yasm_floatnum *f)
 }
 
 yasm_expr__item *
-yasm_expr_reg(unsigned long reg)
+yasm_expr_reg(uintptr_t reg)
 {
     yasm_expr__item *e = expr_get_item();
     e->type = YASM_EXPR_REG;
@@ -1283,7 +1284,7 @@ yasm_expr_get_symrec(yasm_expr **ep, int simplify)
 /*@=unqualifiedtrans =nullderef -nullstate -onlytrans@*/
 
 /*@-unqualifiedtrans -nullderef -nullstate -onlytrans@*/
-const unsigned long *
+const uintptr_t *
 yasm_expr_get_reg(yasm_expr **ep, int simplify)
 {
     if (simplify)
index 2a9bd968dc63b87f1b39fd03bb3ffce3060105ea..59f0cd00c14be94061e3c87fdefa72c9a7a3f131 100644 (file)
@@ -82,7 +82,7 @@ typedef struct yasm_expr__item yasm_expr__item;
  * \param reg      register
  * \return Newly allocated expression item.
  */
-/*@only@*/ yasm_expr__item *yasm_expr_reg(unsigned long reg);
+/*@only@*/ yasm_expr__item *yasm_expr_reg(uintptr_t reg);
 
 /** Create a new expression tree e=l op r.
  * \param l    expression for left side of new expression
@@ -222,7 +222,7 @@ typedef /*@only@*/ yasm_expr * (*yasm_expr_xform_func)
  * \return NULL if the expression is too complex; otherwise the register value
  *         of the expression.
  */
-/*@dependent@*/ /*@null@*/ const unsigned long *yasm_expr_get_reg
+/*@dependent@*/ /*@null@*/ const uintptr_t *yasm_expr_get_reg
     (yasm_expr **ep, int simplify);
 
 /** Print an expression.  For debugging purposes.
index 2243bc62d49ee618d4c42f38a90c98228d0445d7..746fb904da2a6e1d66a9fe4d491e95872a7f936a 100644 (file)
@@ -33,6 +33,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 #include "hamt.h"
 
index a4bc1464faee6c3991aba6c5cac57e16e0bf24b6..357a69d2c1356fbc1a9fd922d1ce15d378bd0981 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <limits.h>
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 #include "valparam.h"
 #include "assocdat.h"
index 0a536406d3956af486bde3fc394a2b713ea69fd1..2147a5c6a63421f9ad7fee33fe015d5f74b64ef5 100644 (file)
@@ -32,6 +32,7 @@
 # include <limits.h>
 #endif
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 #include "hamt.h"
 #include "assocdat.h"
index 00516b588be8942204a36deaf6a1c323e718edcf..7513b148f78cba4dd64a62f451b123c519e8025f 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 #include "valparam.h"
 
index 2c33da3b6ef4d14a83adedb5790f802cd9d6b510..1e530e9adbb9743237f4e6faa88c3083074c87ab 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 /*@unused@*/ RCSID("$Id$");
 
+#include "libyasm-stdint.h"
 #include "coretype.h"
 #include "bitvect.h"
 
index efbf1749d5eb6ed08d9f6507365bd715883efba7..4d3684df859d2a047bc3a98dbbbd972d46d55319 100644 (file)
@@ -1929,7 +1929,7 @@ dir_pushreg(yasm_objfmt_coff *objfmt_coff, yasm_valparamhead *valparams,
 {
     yasm_valparam *vp = yasm_vps_first(valparams);
     coff_unwind_code *code;
-    const unsigned long *reg;
+    const uintptr_t *reg;
 
     if (!procframe_checkstate(objfmt_coff, "PUSHREG"))
        return;
@@ -1957,7 +1957,7 @@ dir_setframe(yasm_objfmt_coff *objfmt_coff, yasm_valparamhead *valparams,
 {
     yasm_valparam *vp = yasm_vps_first(valparams);
     coff_unwind_code *code;
-    const unsigned long *reg;
+    const uintptr_t *reg;
     yasm_expr *off = NULL;
 
     if (!procframe_checkstate(objfmt_coff, "SETFRAME"))
@@ -2031,7 +2031,7 @@ dir_save_common(yasm_objfmt_coff *objfmt_coff, yasm_valparamhead *valparams,
 {
     yasm_valparam *vp = yasm_vps_first(valparams);
     coff_unwind_code *code;
-    const unsigned long *reg;
+    const uintptr_t *reg;
 
     if (!procframe_checkstate(objfmt_coff, name))
        return;
index 66c5c6ed7b774156015aa2e282d857403ede177e..2b10d7e760168aa33af9504b19f225e6d5b05242 100644 (file)
@@ -8,6 +8,7 @@
  * initial version 27/iii/95 by Simon Tatham
  */
 #include <util.h>
+#include <libyasm-stdint.h>
 #include <libyasm/coretype.h>
 #include <libyasm/intnum.h>
 #include <libyasm/expr.h>
index c1ca6a8037c88bd5b8de03fbc815229702d15279..f2147195c46f8a08d8c8abff149ade1f6244b0d2 100644 (file)
@@ -34,6 +34,7 @@
  * detoken is used to convert the line back to text
  */
 #include <util.h>
+#include <libyasm-stdint.h>
 #include <libyasm/coretype.h>
 #include <libyasm/intnum.h>
 #include <libyasm/expr.h>
diff --git a/util.h b/util.h
index 2b95319765269ea22428c0407fda162e3ec04a4a..842f02118449947431a03b9ea38ac806d35520d0 100644 (file)
--- a/util.h
+++ b/util.h
@@ -60,8 +60,6 @@
 #include <string.h>
 #include <assert.h>
 
-#include <libyasm-stdint.h>
-
 #include <libyasm/coretype.h>
 
 #ifdef lint