libyasm
Data Fields
yasm_arch_module Struct Reference

YASM architecture module interface. More...

#include <arch.h>

Data Fields

const char * name
 One-line description of the architecture. More...
 
const char * keyword
 Keyword used to select architecture. More...
 
const yasm_directivedirectives
 NULL-terminated list of directives. More...
 
yasm_arch *(* create )(const char *machine, const char *parser, yasm_arch_create_error *error)
 Create architecture. More...
 
void(* destroy )(yasm_arch *arch)
 Module-level implementation of yasm_arch_destroy(). More...
 
const char *(* get_machine )(const yasm_arch *arch)
 Module-level implementation of yasm_arch_get_machine(). More...
 
unsigned int(* get_address_size )(const yasm_arch *arch)
 Module-level implementation of yasm_arch_get_address_size(). More...
 
int(* set_var )(yasm_arch *arch, const char *var, unsigned long val)
 Module-level implementation of yasm_arch_set_var(). More...
 
yasm_arch_insnprefix(* parse_check_insnprefix )(yasm_arch *arch, const char *id, size_t id_len, unsigned long line, yasm_bytecode **bc, uintptr_t *prefix)
 Module-level implementation of yasm_arch_parse_check_insnprefix(). More...
 
yasm_arch_regtmod(* parse_check_regtmod )(yasm_arch *arch, const char *id, size_t id_len, uintptr_t *data)
 Module-level implementation of yasm_arch_parse_check_regtmod(). More...
 
const unsigned char **(* get_fill )(const yasm_arch *arch)
 Module-level implementation of yasm_arch_get_fill(). More...
 
int(* floatnum_tobytes )(yasm_arch *arch, const yasm_floatnum *flt, unsigned char *buf, size_t destsize, size_t valsize, size_t shift, int warn)
 Module-level implementation of yasm_arch_floatnum_tobytes(). More...
 
int(* 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)
 Module-level implementation of yasm_arch_intnum_tobytes(). More...
 
unsigned int(* get_reg_size )(yasm_arch *arch, uintptr_t reg)
 Module-level implementation of yasm_arch_get_reg_size(). More...
 
uintptr_t(* reggroup_get_reg )(yasm_arch *arch, uintptr_t reggroup, unsigned long regindex)
 Module-level implementation of yasm_arch_reggroup_get_reg(). More...
 
void(* reg_print )(yasm_arch *arch, uintptr_t reg, FILE *f)
 Module-level implementation of yasm_arch_reg_print(). More...
 
void(* segreg_print )(yasm_arch *arch, uintptr_t segreg, FILE *f)
 Module-level implementation of yasm_arch_segreg_print(). More...
 
yasm_effaddr *(* ea_create )(yasm_arch *arch, yasm_expr *e)
 Module-level implementation of yasm_arch_ea_create(). More...
 
void(* ea_destroy )(yasm_effaddr *ea)
 Module-level implementation of yasm_arch_ea_destroy(). More...
 
void(* ea_print )(const yasm_effaddr *ea, FILE *f, int indent_level)
 Module-level implementation of yasm_arch_ea_print(). More...
 
yasm_bytecode *(* create_empty_insn )(yasm_arch *arch, unsigned long line)
 Module-level implementation of yasm_arch_create_empty_insn(). More...
 
const yasm_arch_machinemachines
 NULL-terminated list of machines for this architecture. More...
 
const char * default_machine_keyword
 Default machine keyword. More...
 
unsigned int wordsize
 Canonical "word" size in bits. More...
 
unsigned int min_insn_len
 Worst case minimum instruction length in bytes. More...
 

Detailed Description

YASM architecture module interface.

Note
All "data" in parser-related functions (yasm_arch_parse_*) needs to start the parse initialized to 0 to make it okay for a parser-related function to use/check previously stored data to see if it's been called before on the same piece of data.

Definition at line 88 of file arch.h.

Field Documentation

yasm_arch*(* yasm_arch_module::create)(const char *machine, const char *parser,yasm_arch_create_error *error)

Create architecture.

Module-level implementation of yasm_arch_create(). Call yasm_arch_create() instead of calling this function.

Definition at line 106 of file arch.h.

yasm_bytecode*(* yasm_arch_module::create_empty_insn)(yasm_arch *arch, unsigned long line)

Module-level implementation of yasm_arch_create_empty_insn().

Call yasm_arch_create_empty_insn() instead of calling this function.

Definition at line 202 of file arch.h.

const char* yasm_arch_module::default_machine_keyword

Default machine keyword.

Call yasm_arch_get_machine() to get the active machine of a particular yasm_arch.

Definition at line 215 of file arch.h.

void(* yasm_arch_module::destroy)(yasm_arch *arch)

Module-level implementation of yasm_arch_destroy().

Call yasm_arch_destroy() instead of calling this function.

Definition at line 112 of file arch.h.

const yasm_directive* yasm_arch_module::directives

NULL-terminated list of directives.

NULL if none.

Definition at line 100 of file arch.h.

yasm_effaddr*(* yasm_arch_module::ea_create)(yasm_arch *arch,yasm_expr *e)

Module-level implementation of yasm_arch_ea_create().

Call yasm_arch_ea_create() instead of calling this function.

Definition at line 187 of file arch.h.

void(* yasm_arch_module::ea_destroy)(yasm_effaddr *ea)

Module-level implementation of yasm_arch_ea_destroy().

Call yasm_arch_ea_destroy() instead of calling this function.

Definition at line 192 of file arch.h.

void(* yasm_arch_module::ea_print)(const yasm_effaddr *ea, FILE *f, int indent_level)

Module-level implementation of yasm_arch_ea_print().

Call yasm_arch_ea_print() instead of calling this function.

Definition at line 197 of file arch.h.

int(* yasm_arch_module::floatnum_tobytes)(yasm_arch *arch, const yasm_floatnum *flt, unsigned char *buf, size_t destsize, size_t valsize, size_t shift, int warn)

Module-level implementation of yasm_arch_floatnum_tobytes().

Call yasm_arch_floatnum_tobytes() instead of calling this function.

Definition at line 151 of file arch.h.

unsigned int(* yasm_arch_module::get_address_size)(const yasm_arch *arch)

Module-level implementation of yasm_arch_get_address_size().

Call yasm_arch_get_address_size() instead of calling this function.

Definition at line 122 of file arch.h.

const unsigned char**(* yasm_arch_module::get_fill)(const yasm_arch *arch)

Module-level implementation of yasm_arch_get_fill().

Call yasm_arch_get_fill() instead of calling this function.

Definition at line 146 of file arch.h.

const char*(* yasm_arch_module::get_machine)(const yasm_arch *arch)

Module-level implementation of yasm_arch_get_machine().

Call yasm_arch_get_machine() instead of calling this function.

Definition at line 117 of file arch.h.

unsigned int(* yasm_arch_module::get_reg_size)(yasm_arch *arch, uintptr_t reg)

Module-level implementation of yasm_arch_get_reg_size().

Call yasm_arch_get_reg_size() instead of calling this function.

Definition at line 166 of file arch.h.

int(* yasm_arch_module::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)

Module-level implementation of yasm_arch_intnum_tobytes().

Call yasm_arch_intnum_tobytes() instead of calling this function.

Definition at line 158 of file arch.h.

const char* yasm_arch_module::keyword

Keyword used to select architecture.

Call yasm_arch_keyword() to get the keyword of a particular yasm_arch.

Definition at line 97 of file arch.h.

const yasm_arch_machine* yasm_arch_module::machines

NULL-terminated list of machines for this architecture.

Call yasm_arch_get_machine() to get the active machine of a particular yasm_arch.

Definition at line 209 of file arch.h.

unsigned int yasm_arch_module::min_insn_len

Worst case minimum instruction length in bytes.

Call yasm_arch_min_insn_len() to get the minimum instruction length of a particular yasm_arch.

Definition at line 227 of file arch.h.

const char* yasm_arch_module::name

One-line description of the architecture.

Call yasm_arch_name() to get the name of a particular yasm_arch.

Definition at line 92 of file arch.h.

yasm_arch_insnprefix(* yasm_arch_module::parse_check_insnprefix)(yasm_arch *arch, const char *id, size_t id_len, unsigned long line,yasm_bytecode **bc,uintptr_t *prefix)

Module-level implementation of yasm_arch_parse_check_insnprefix().

Call yasm_arch_parse_check_insnprefix() instead of calling this function.

Definition at line 133 of file arch.h.

yasm_arch_regtmod(* yasm_arch_module::parse_check_regtmod)(yasm_arch *arch, const char *id, size_t id_len,uintptr_t *data)

Module-level implementation of yasm_arch_parse_check_regtmod().

Call yasm_arch_parse_check_regtmod() instead of calling this function.

Definition at line 140 of file arch.h.

void(* yasm_arch_module::reg_print)(yasm_arch *arch, uintptr_t reg, FILE *f)

Module-level implementation of yasm_arch_reg_print().

Call yasm_arch_reg_print() instead of calling this function.

Definition at line 177 of file arch.h.

uintptr_t(* yasm_arch_module::reggroup_get_reg)(yasm_arch *arch, uintptr_t reggroup, unsigned long regindex)

Module-level implementation of yasm_arch_reggroup_get_reg().

Call yasm_arch_reggroup_get_reg() instead of calling this function.

Definition at line 171 of file arch.h.

void(* yasm_arch_module::segreg_print)(yasm_arch *arch, uintptr_t segreg, FILE *f)

Module-level implementation of yasm_arch_segreg_print().

Call yasm_arch_segreg_print() instead of calling this function.

Definition at line 182 of file arch.h.

int(* yasm_arch_module::set_var)(yasm_arch *arch, const char *var, unsigned long val)

Module-level implementation of yasm_arch_set_var().

Call yasm_arch_set_var() instead of calling this function.

Definition at line 127 of file arch.h.

unsigned int yasm_arch_module::wordsize

Canonical "word" size in bits.

Call yasm_arch_wordsize() to get the word size of a particular yasm_arch.

Definition at line 221 of file arch.h.


The documentation for this struct was generated from the following file: