Flatten x86_targetval into x86_new_jmprel_data, as the former is no longer used

in the parser.

svn path=/trunk/yasm/; revision=685
0.3
Peter Johnson 23 years ago
parent cd573321b3
commit 2c090517fc
  1. 9
      modules/arch/x86/x86arch.h
  2. 8
      modules/arch/x86/x86bc.c
  3. 9
      src/arch/x86/x86arch.h
  4. 8
      src/arch/x86/x86bc.c

@ -62,12 +62,6 @@ typedef enum {
JR_NEAR_FORCED
} x86_jmprel_opcode_sel;
typedef struct x86_targetval {
expr *val;
x86_jmprel_opcode_sel op_sel;
} x86_targetval;
void x86_ea_set_segment(/*@null@*/ effaddr *ea, unsigned char segment);
effaddr *x86_ea_new_reg(unsigned char reg);
effaddr *x86_ea_new_imm(/*@keep@*/expr *imm, unsigned char im_len);
@ -105,7 +99,8 @@ bytecode *x86_bc_new_insn(x86_new_insn_data *d);
* Pass 0 for the opcode_len if that version of the opcode doesn't exist.
*/
typedef struct x86_new_jmprel_data {
/*@keep@*/ x86_targetval *target;
/*@keep@*/ expr *target;
x86_jmprel_opcode_sel op_sel;
unsigned char short_op_len;
unsigned char short_op[3];
unsigned char near_op_len;

@ -88,12 +88,12 @@ x86_bc_new_jmprel(x86_new_jmprel_data *d)
bc = bc_new_common((bytecode_type)X86_BC_JMPREL, sizeof(x86_jmprel));
jmprel = bc_get_data(bc);
jmprel->target = d->target->val;
jmprel->op_sel = d->target->op_sel;
jmprel->target = d->target;
jmprel->op_sel = d->op_sel;
if ((d->target->op_sel == JR_SHORT_FORCED) && (d->near_op_len == 0))
if ((d->op_sel == JR_SHORT_FORCED) && (d->near_op_len == 0))
Error(_("no SHORT form of that jump instruction exists"));
if ((d->target->op_sel == JR_NEAR_FORCED) && (d->short_op_len == 0))
if ((d->op_sel == JR_NEAR_FORCED) && (d->short_op_len == 0))
Error(_("no NEAR form of that jump instruction exists"));
jmprel->shortop.opcode[0] = d->short_op[0];

@ -62,12 +62,6 @@ typedef enum {
JR_NEAR_FORCED
} x86_jmprel_opcode_sel;
typedef struct x86_targetval {
expr *val;
x86_jmprel_opcode_sel op_sel;
} x86_targetval;
void x86_ea_set_segment(/*@null@*/ effaddr *ea, unsigned char segment);
effaddr *x86_ea_new_reg(unsigned char reg);
effaddr *x86_ea_new_imm(/*@keep@*/expr *imm, unsigned char im_len);
@ -105,7 +99,8 @@ bytecode *x86_bc_new_insn(x86_new_insn_data *d);
* Pass 0 for the opcode_len if that version of the opcode doesn't exist.
*/
typedef struct x86_new_jmprel_data {
/*@keep@*/ x86_targetval *target;
/*@keep@*/ expr *target;
x86_jmprel_opcode_sel op_sel;
unsigned char short_op_len;
unsigned char short_op[3];
unsigned char near_op_len;

@ -88,12 +88,12 @@ x86_bc_new_jmprel(x86_new_jmprel_data *d)
bc = bc_new_common((bytecode_type)X86_BC_JMPREL, sizeof(x86_jmprel));
jmprel = bc_get_data(bc);
jmprel->target = d->target->val;
jmprel->op_sel = d->target->op_sel;
jmprel->target = d->target;
jmprel->op_sel = d->op_sel;
if ((d->target->op_sel == JR_SHORT_FORCED) && (d->near_op_len == 0))
if ((d->op_sel == JR_SHORT_FORCED) && (d->near_op_len == 0))
Error(_("no SHORT form of that jump instruction exists"));
if ((d->target->op_sel == JR_NEAR_FORCED) && (d->short_op_len == 0))
if ((d->op_sel == JR_NEAR_FORCED) && (d->short_op_len == 0))
Error(_("no NEAR form of that jump instruction exists"));
jmprel->shortop.opcode[0] = d->short_op[0];

Loading…
Cancel
Save