62 typedef struct yasm_arch_base {
106 yasm_arch * (*create) (
const char *machine,
const char *parser,
133 (
yasm_arch *arch,
const char *id,
size_t id_len,
unsigned long line,
146 const unsigned char ** (*get_fill) (
const yasm_arch *arch);
152 unsigned char *buf,
size_t destsize,
153 size_t valsize,
size_t shift,
int warn);
159 unsigned char *buf,
size_t destsize,
size_t valsize,
172 unsigned long regindex);
264 const char *machine,
const char *parser,
308 (
yasm_arch *arch,
const char *
id,
size_t id_len,
unsigned long line,
324 (
yasm_arch *arch,
const char *
id,
size_t id_len,
349 unsigned char *buf,
size_t destsize,
350 size_t valsize,
size_t shift,
int warn);
369 unsigned char *buf,
size_t destsize,
370 size_t valsize,
int shift,
389 unsigned long regindex);
425 FILE *f,
int indent_level);
440 #define yasm_arch_name(arch) \
441 (((yasm_arch_base *)arch)->module->name)
442 #define yasm_arch_keyword(arch) \
443 (((yasm_arch_base *)arch)->module->keyword)
444 #define yasm_arch_wordsize(arch) \
445 (((yasm_arch_base *)arch)->module->wordsize)
446 #define yasm_arch_min_insn_len(arch) \
447 (((yasm_arch_base *)arch)->module->min_insn_len)
449 #define yasm_arch_create(module, machine, parser, error) \
450 module->create(machine, parser, error)
452 #define yasm_arch_destroy(arch) \
453 ((yasm_arch_base *)arch)->module->destroy(arch)
454 #define yasm_arch_get_machine(arch) \
455 ((yasm_arch_base *)arch)->module->get_machine(arch)
456 #define yasm_arch_get_address_size(arch) \
457 ((yasm_arch_base *)arch)->module->get_address_size(arch)
458 #define yasm_arch_set_var(arch, var, val) \
459 ((yasm_arch_base *)arch)->module->set_var(arch, var, val)
460 #define yasm_arch_parse_check_insnprefix(arch, id, id_len, line, bc, prefix) \
461 ((yasm_arch_base *)arch)->module->parse_check_insnprefix \
462 (arch, id, id_len, line, bc, prefix)
463 #define yasm_arch_parse_check_regtmod(arch, id, id_len, data) \
464 ((yasm_arch_base *)arch)->module->parse_check_regtmod \
465 (arch, id, id_len, data)
466 #define yasm_arch_get_fill(arch) \
467 ((yasm_arch_base *)arch)->module->get_fill(arch)
468 #define yasm_arch_floatnum_tobytes(arch, flt, buf, destsize, valsize, shift, \
470 ((yasm_arch_base *)arch)->module->floatnum_tobytes \
471 (arch, flt, buf, destsize, valsize, shift, warn)
472 #define yasm_arch_intnum_tobytes(arch, intn, buf, destsize, valsize, shift, \
474 ((yasm_arch_base *)arch)->module->intnum_tobytes \
475 (arch, intn, buf, destsize, valsize, shift, bc, warn)
476 #define yasm_arch_get_reg_size(arch, reg) \
477 ((yasm_arch_base *)arch)->module->get_reg_size(arch, reg)
478 #define yasm_arch_reggroup_get_reg(arch, regg, regi) \
479 ((yasm_arch_base *)arch)->module->reggroup_get_reg(arch, regg, regi)
480 #define yasm_arch_reg_print(arch, reg, f) \
481 ((yasm_arch_base *)arch)->module->reg_print(arch, reg, f)
482 #define yasm_arch_segreg_print(arch, segreg, f) \
483 ((yasm_arch_base *)arch)->module->segreg_print(arch, segreg, f)
484 #define yasm_arch_ea_create(arch, e) \
485 ((yasm_arch_base *)arch)->module->ea_create(arch, e)
486 #define yasm_arch_ea_destroy(arch, ea) \
487 ((yasm_arch_base *)arch)->module->ea_destroy(ea)
488 #define yasm_arch_ea_print(arch, ea, f, i) \
489 ((yasm_arch_base *)arch)->module->ea_print(ea, f, i)
490 #define yasm_arch_create_empty_insn(arch, line) \
491 ((yasm_arch_base *)arch)->module->create_empty_insn(arch, line)