Logo Search packages:      
Sourcecode: yasm version File versions  Download package

arch.h File Reference


Detailed Description

YASM architecture interface.

Id
arch.h 1168 2004-10-31 01:07:52Z peter

Copyright (C) 2002 Peter Johnson

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file arch.h.

Go to the source code of this file.

Classes

struct  yasm_arch_base
struct  yasm_arch_machine
struct  yasm_arch_module

Defines

#define yasm_arch_create(module, machine)   module->create(machine)
#define yasm_arch_destroy(arch)   ((yasm_arch_base *)arch)->module->destroy(arch)
#define yasm_arch_ea_create(arch, e)   ((yasm_arch_base *)arch)->module->ea_create(arch, e)
#define yasm_arch_floatnum_tobytes(arch, flt, buf, destsize, valsize, shift, warn, line)
#define yasm_arch_get_machine(arch)   ((yasm_arch_base *)arch)->module->get_machine(arch)
#define yasm_arch_get_reg_size(arch, reg)   ((yasm_arch_base *)arch)->module->get_reg_size(arch, reg)
#define yasm_arch_intnum_fixup_rel(arch, intn, valsize, bc, line)
#define yasm_arch_intnum_tobytes(arch, intn, buf, destsize, valsize, shift, bc, warn, line)
#define yasm_arch_keyword(arch)   (((yasm_arch_base *)arch)->module->keyword)
#define yasm_arch_name(arch)   (((yasm_arch_base *)arch)->module->name)
#define yasm_arch_parse_check_id(arch, data, id, line)   ((yasm_arch_base *)arch)->module->parse_check_id(arch, data, id, line)
#define yasm_arch_parse_cpu(arch, cpuid, line)   ((yasm_arch_base *)arch)->module->parse_cpu(arch, cpuid, line)
#define yasm_arch_parse_directive(arch, name, valparams, objext_valparams, object, line)
#define yasm_arch_parse_insn(arch, data, num_operands, operands, prev_bc, line)
#define yasm_arch_parse_prefix(arch, bc, data, line)   ((yasm_arch_base *)arch)->module->parse_prefix(arch, bc, data, line)
#define yasm_arch_parse_seg_override(arch, ea, segreg, line)
#define yasm_arch_parse_seg_prefix(arch, bc, segreg, line)   ((yasm_arch_base *)arch)->module->parse_seg_prefix(arch, bc, segreg, line)
#define yasm_arch_reg_print(arch, reg, f)   ((yasm_arch_base *)arch)->module->reg_print(arch, reg, f)
#define yasm_arch_segreg_print(arch, segreg, f)   ((yasm_arch_base *)arch)->module->segreg_print(arch, segreg, f)
#define yasm_arch_set_var(arch, var, val)   ((yasm_arch_base *)arch)->module->set_var(arch, var, val)
#define YASM_ARCH_VERSION   3
#define yasm_arch_wordsize(arch)   (((yasm_arch_base *)arch)->module->wordsize)

Typedefs

typedef struct yasm_insn_operand yasm_insn_operand
typedef struct yasm_insn_operands yasm_insn_operands

Enumerations

enum  yasm_arch_check_id_retval {
  YASM_ARCH_CHECK_ID_NONE = 0, YASM_ARCH_CHECK_ID_INSN, YASM_ARCH_CHECK_ID_PREFIX, YASM_ARCH_CHECK_ID_REG,
  YASM_ARCH_CHECK_ID_SEGREG, YASM_ARCH_CHECK_ID_TARGETMOD
}
enum  yasm_arch_syntax_flavor { YASM_ARCH_SYNTAX_FLAVOR_NASM = 1, YASM_ARCH_SYNTAX_FLAVOR_GAS }

Functions

yasm_archyasm_arch_create (const yasm_arch_module *module, const char *machine)
void yasm_arch_destroy (yasm_arch *arch)
yasm_effaddryasm_arch_ea_create (yasm_arch *arch, yasm_expr *e)
int yasm_arch_floatnum_tobytes (yasm_arch *arch, const yasm_floatnum *flt, unsigned char *buf, size_t destsize, size_t valsize, size_t shift, int warn, unsigned long line)
const char * yasm_arch_get_machine (const yasm_arch *arch)
unsigned int yasm_arch_get_reg_size (yasm_arch *arch, unsigned long reg)
int yasm_arch_intnum_fixup_rel (yasm_arch *arch, yasm_intnum *intn, size_t valsize, const yasm_bytecode *bc, unsigned long line)
int yasm_arch_intnum_tobytes (yasm_arch *arch, const yasm_intnum *intn, unsigned char *buf, size_t destsize, size_t valsize, int shift, const yasm_bytecode *bc, int warn, unsigned long line)
const char * yasm_arch_keyword (const yasm_arch *arch)
const char * yasm_arch_name (const yasm_arch *arch)
yasm_arch_check_id_retval yasm_arch_parse_check_id (yasm_arch *arch, unsigned long data[4], const char *id, unsigned long line)
void yasm_arch_parse_cpu (yasm_arch *arch, const char *cpuid, unsigned long line)
int yasm_arch_parse_directive (yasm_arch *arch, const char *name, yasm_valparamhead *valparams, yasm_valparamhead *objext_valparams, yasm_object *object, unsigned long line)
yasm_bytecodeyasm_arch_parse_insn (yasm_arch *arch, const unsigned long data[4], int num_operands, yasm_insn_operands *operands, yasm_bytecode *prev_bc, unsigned long line)
void yasm_arch_parse_prefix (yasm_arch *arch, yasm_bytecode *bc, const unsigned long data[4], unsigned long line)
void yasm_arch_parse_seg_override (yasm_arch *arch, yasm_effaddr *ea, unsigned long segreg, unsigned long line)
void yasm_arch_parse_seg_prefix (yasm_arch *arch, yasm_bytecode *bc, unsigned long segreg, unsigned long line)
void yasm_arch_reg_print (yasm_arch *arch, unsigned long reg, FILE *f)
void yasm_arch_segreg_print (yasm_arch *arch, unsigned long segreg, FILE *f)
int yasm_arch_set_var (yasm_arch *arch, const char *var, unsigned long val)
unsigned int yasm_arch_wordsize (const yasm_arch *arch)
yasm_insn_operandyasm_operand_create_imm (yasm_expr *val)
yasm_insn_operandyasm_operand_create_mem (yasm_effaddr *ea)
yasm_insn_operandyasm_operand_create_reg (unsigned long reg)
yasm_insn_operandyasm_operand_create_segreg (unsigned long segreg)
yasm_insn_operandyasm_operand_next (yasm_insn_operand *cur)
void yasm_operand_print (const yasm_insn_operand *op, FILE *f, int indent_level, yasm_arch *arch)
yasm_insn_operandyasm_ops_append (yasm_insn_operands *headp, yasm_insn_operand *op)
yasm_insn_operandsyasm_ops_create (void)
void yasm_ops_destroy (yasm_insn_operands *headp, int content)
yasm_insn_operandyasm_ops_first (yasm_insn_operands *headp)
void yasm_ops_print (const yasm_insn_operands *headp, FILE *f, int indent_level, yasm_arch *arch)


Generated by  Doxygen 1.6.0   Back to index