]> granicus.if.org Git - yasm/commitdiff
bc_calc_len() family should return unsigned long, not int.
authorPeter Johnson <peter@tortall.net>
Wed, 9 Jan 2002 05:05:21 +0000 (05:05 -0000)
committerPeter Johnson <peter@tortall.net>
Wed, 9 Jan 2002 05:05:21 +0000 (05:05 -0000)
svn path=/trunk/yasm/; revision=436

libyasm/arch.h
libyasm/bytecode.c
libyasm/bytecode.h
modules/arch/x86/x86-int.h
modules/arch/x86/x86bc.c
src/arch.h
src/arch/x86/x86-int.h
src/arch/x86/x86bc.c
src/bytecode.c
src/bytecode.h

index ece57e1bc55e9f9d789b48378d36bd994720353a..48f04aadb1b2bfd1688975b4e049f5c4e423e9db 100644 (file)
@@ -40,9 +40,9 @@ struct arch {
        void (*bc_print) (FILE *f, const bytecode *bc);
 
        /* See bytecode.h comments on bc_calc_len() */
-       int (*bc_calc_len) (bytecode *bc, /*@only@*/ /*@null@*/
-                           intnum *(*resolve_label) (section *sect, /*@null@*/
-                                                     bytecode *bc));
+       unsigned long (*bc_calc_len) (bytecode *bc, /*@only@*/ /*@null@*/
+                                     intnum *(*resolve_label) (section *sect,
+                                         /*@null@*/ bytecode *bc));
     } bc;
 };
 
index c35a71d61103ae69a7b5353f2bddca73ba455ec4..225966caf2703e0ab2fde1ae93f0104e14f61dd6 100644 (file)
@@ -307,7 +307,7 @@ bc_print(FILE *f, const bytecode *bc)
     fprintf(f, "%*sOffset=%lx\n", indent_level, "", bc->offset);
 }
 
-int
+unsigned long
 bc_calc_len(bytecode *bc,
            intnum *(*resolve_label) (section *sect, /*@null@*/ bytecode *bc))
 {
index e8607c12f5ff9782b76af2175decb884fc26349c..3cb06718db4b43e68413f97b4f6c1df6be578230 100644 (file)
@@ -63,9 +63,9 @@ void bc_print(FILE *f, const bytecode *bc);
  * resolve_label is the function used to determine the value (offset) of a
  *  in-file label (eg, not an EXTERN variable, which is indeterminate).
  */
-int bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/
-               intnum *(*resolve_label) (section *sect,
-                                         /*@null@*/ bytecode *bc));
+unsigned long bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/
+                         intnum *(*resolve_label) (section *sect,
+                                                   /*@null@*/ bytecode *bc));
 
 /* void bcs_initialize(bytecodehead *headp); */
 #define        bcs_initialize(headp)   STAILQ_INIT(headp)
index a75c9995dcf65bfeb4c61d9523b356b1df9e7a9e..f8d79ed50afdfe23ddc523ce9e51c87d6a204ebe 100644 (file)
@@ -96,9 +96,9 @@ typedef struct x86_jmprel {
 
 void x86_bc_delete(bytecode *bc);
 void x86_bc_print(FILE *f, const bytecode *bc);
-int x86_bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/
-                   intnum *(*resolve_label) (section *sect,
-                                             /*@null@*/ bytecode *bc));
+unsigned long x86_bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/
+                             intnum *(*resolve_label) (section *sect,
+                                 /*@null@*/ bytecode *bc));
 
 int x86_expr_checkea(expr **ep, unsigned char *addrsize, unsigned char bits,
                     unsigned char nosplit, unsigned char *displen,
index a423771345329e8c67d307b9d4538b884daabeb4..2f1602da6683b4f828463fdaafd2576a6607632f 100644 (file)
@@ -460,7 +460,7 @@ x86_bc_print(FILE *f, const bytecode *bc)
     }
 }
 
-static int
+static unsigned long
 x86_bc_calc_len_insn(x86_insn *insn, /*@only@*/ /*@null@*/
                     intnum *(*resolve_label) (section *sect,
                                               /*@null@*/ bytecode *bc))
@@ -518,7 +518,7 @@ x86_bc_calc_len_insn(x86_insn *insn, /*@only@*/ /*@null@*/
     return 0;
 }
 
-int
+unsigned long
 x86_bc_calc_len(bytecode *bc,
                intnum *(*resolve_label) (section *sect,
                                          /*@null@*/ bytecode *bc))
index ece57e1bc55e9f9d789b48378d36bd994720353a..48f04aadb1b2bfd1688975b4e049f5c4e423e9db 100644 (file)
@@ -40,9 +40,9 @@ struct arch {
        void (*bc_print) (FILE *f, const bytecode *bc);
 
        /* See bytecode.h comments on bc_calc_len() */
-       int (*bc_calc_len) (bytecode *bc, /*@only@*/ /*@null@*/
-                           intnum *(*resolve_label) (section *sect, /*@null@*/
-                                                     bytecode *bc));
+       unsigned long (*bc_calc_len) (bytecode *bc, /*@only@*/ /*@null@*/
+                                     intnum *(*resolve_label) (section *sect,
+                                         /*@null@*/ bytecode *bc));
     } bc;
 };
 
index a75c9995dcf65bfeb4c61d9523b356b1df9e7a9e..f8d79ed50afdfe23ddc523ce9e51c87d6a204ebe 100644 (file)
@@ -96,9 +96,9 @@ typedef struct x86_jmprel {
 
 void x86_bc_delete(bytecode *bc);
 void x86_bc_print(FILE *f, const bytecode *bc);
-int x86_bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/
-                   intnum *(*resolve_label) (section *sect,
-                                             /*@null@*/ bytecode *bc));
+unsigned long x86_bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/
+                             intnum *(*resolve_label) (section *sect,
+                                 /*@null@*/ bytecode *bc));
 
 int x86_expr_checkea(expr **ep, unsigned char *addrsize, unsigned char bits,
                     unsigned char nosplit, unsigned char *displen,
index a423771345329e8c67d307b9d4538b884daabeb4..2f1602da6683b4f828463fdaafd2576a6607632f 100644 (file)
@@ -460,7 +460,7 @@ x86_bc_print(FILE *f, const bytecode *bc)
     }
 }
 
-static int
+static unsigned long
 x86_bc_calc_len_insn(x86_insn *insn, /*@only@*/ /*@null@*/
                     intnum *(*resolve_label) (section *sect,
                                               /*@null@*/ bytecode *bc))
@@ -518,7 +518,7 @@ x86_bc_calc_len_insn(x86_insn *insn, /*@only@*/ /*@null@*/
     return 0;
 }
 
-int
+unsigned long
 x86_bc_calc_len(bytecode *bc,
                intnum *(*resolve_label) (section *sect,
                                          /*@null@*/ bytecode *bc))
index c35a71d61103ae69a7b5353f2bddca73ba455ec4..225966caf2703e0ab2fde1ae93f0104e14f61dd6 100644 (file)
@@ -307,7 +307,7 @@ bc_print(FILE *f, const bytecode *bc)
     fprintf(f, "%*sOffset=%lx\n", indent_level, "", bc->offset);
 }
 
-int
+unsigned long
 bc_calc_len(bytecode *bc,
            intnum *(*resolve_label) (section *sect, /*@null@*/ bytecode *bc))
 {
index e8607c12f5ff9782b76af2175decb884fc26349c..3cb06718db4b43e68413f97b4f6c1df6be578230 100644 (file)
@@ -63,9 +63,9 @@ void bc_print(FILE *f, const bytecode *bc);
  * resolve_label is the function used to determine the value (offset) of a
  *  in-file label (eg, not an EXTERN variable, which is indeterminate).
  */
-int bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/
-               intnum *(*resolve_label) (section *sect,
-                                         /*@null@*/ bytecode *bc));
+unsigned long bc_calc_len(bytecode *bc, /*@only@*/ /*@null@*/
+                         intnum *(*resolve_label) (section *sect,
+                                                   /*@null@*/ bytecode *bc));
 
 /* void bcs_initialize(bytecodehead *headp); */
 #define        bcs_initialize(headp)   STAILQ_INIT(headp)