bc_calc_len() family should return unsigned long, not int.

svn path=/trunk/yasm/; revision=436
0.3
Peter Johnson 23 years ago
parent 04ed33ca73
commit e2f2ede90c
  1. 6
      libyasm/arch.h
  2. 2
      libyasm/bytecode.c
  3. 6
      libyasm/bytecode.h
  4. 6
      modules/arch/x86/x86-int.h
  5. 4
      modules/arch/x86/x86bc.c
  6. 6
      src/arch.h
  7. 6
      src/arch/x86/x86-int.h
  8. 4
      src/arch/x86/x86bc.c
  9. 2
      src/bytecode.c
  10. 6
      src/bytecode.h

@ -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;
};

@ -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))
{

@ -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)

@ -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,

@ -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))

@ -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;
};

@ -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,

@ -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))

@ -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))
{

@ -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)

Loading…
Cancel
Save