Go to the source code of this file.
Data Structures | |
| struct | yasm_stdmac |
| Standard macro structure for modules that allows association of a set of standard macros with a parser/preprocessor combination. More... | |
| struct | yasm_assoc_data_callback |
| YASM associated data callback structure. More... | |
| struct | yasm_value |
| A value. More... | |
Defines | |
| #define | YASM_VALUE_RSHIFT_MAX 127 |
| Maximum value of yasm_value.rshift. | |
Typedefs | |
| typedef yasm_arch | yasm_arch |
| Architecture instance (mostly opaque type). | |
| typedef yasm_preproc | yasm_preproc |
| Preprocessor interface. | |
| typedef yasm_parser | yasm_parser |
| Parser instance (mostly opaque type). | |
| typedef yasm_objfmt | yasm_objfmt |
| Object format interface. | |
| typedef yasm_dbgfmt | yasm_dbgfmt |
| Debug format interface. | |
| typedef yasm_listfmt | yasm_listfmt |
| List format interface. | |
| typedef yasm_objfmt_module | yasm_objfmt_module |
| Object format module interface. | |
| typedef yasm_dbgfmt_module | yasm_dbgfmt_module |
| Debug format module interface. | |
| typedef yasm_errwarns | yasm_errwarns |
| Set of collected error/warnings (opaque type). | |
| typedef yasm_bytecode | yasm_bytecode |
| Bytecode. | |
| typedef yasm_object | yasm_object |
| Object. | |
| typedef yasm_section | yasm_section |
| Section (opaque type). | |
| typedef yasm_symtab | yasm_symtab |
| Symbol table (opaque type). | |
| typedef yasm_symrec | yasm_symrec |
| Symbol record (opaque type). | |
| typedef yasm_expr | yasm_expr |
| Expression. | |
| typedef yasm_intnum | yasm_intnum |
| Integer value (opaque type). | |
| typedef yasm_floatnum | yasm_floatnum |
| Floating point value (opaque type). | |
| typedef yasm_linemap | yasm_linemap |
| Line number mapping repository (opaque type). | |
| typedef yasm_valparam | yasm_valparam |
| Value/parameter pair (opaque type). | |
| typedef yasm_valparamhead | yasm_valparamhead |
| List of value/parameters (opaque type). | |
| typedef yasm_directive | yasm_directive |
| Directive list entry. | |
| typedef yasm_effaddr | yasm_effaddr |
| An effective address. | |
| typedef yasm_insn | yasm_insn |
| An instruction. | |
| typedef int(*) | yasm_output_value_func (yasm_value *value, unsigned char *buf, unsigned int destsize, unsigned long offset, yasm_bytecode *bc, int warn, void *d) |
| Convert yasm_value to its byte representation. | |
| typedef int(*) | yasm_output_reloc_func (yasm_symrec *sym, yasm_bytecode *bc, unsigned char *buf, unsigned int destsize, unsigned int valsize, int warn, void *d) |
| Convert a symbol reference to its byte representation. | |
Enumerations | |
| enum | yasm_expr_op { YASM_EXPR_IDENT, YASM_EXPR_ADD, YASM_EXPR_SUB, YASM_EXPR_MUL, YASM_EXPR_DIV, YASM_EXPR_SIGNDIV, YASM_EXPR_MOD, YASM_EXPR_SIGNMOD, YASM_EXPR_NEG, YASM_EXPR_NOT, YASM_EXPR_OR, YASM_EXPR_AND, YASM_EXPR_XOR, YASM_EXPR_XNOR, YASM_EXPR_NOR, YASM_EXPR_SHL, YASM_EXPR_SHR, YASM_EXPR_LOR, YASM_EXPR_LAND, YASM_EXPR_LNOT, YASM_EXPR_LXOR, YASM_EXPR_LXNOR, YASM_EXPR_LNOR, YASM_EXPR_LT, YASM_EXPR_GT, YASM_EXPR_EQ, YASM_EXPR_LE, YASM_EXPR_GE, YASM_EXPR_NE, YASM_EXPR_NONNUM, YASM_EXPR_SEG, YASM_EXPR_WRT, YASM_EXPR_SEGOFF } |
| Expression operators usable in yasm_expr expressions. More... | |
Functions | |
| YASM_LIB_DECL int | yasm__mergesort (void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)) |
| Sort an array using merge sort algorithm. | |
| YASM_LIB_DECL char * | yasm__strsep (char **stringp, const char *delim) |
| Separate string by delimiters. | |
| YASM_LIB_DECL int | yasm__strcasecmp (const char *s1, const char *s2) |
| Compare two strings, ignoring case differences. | |
| YASM_LIB_DECL int | yasm__strncasecmp (const char *s1, const char *s2, size_t n) |
| Compare portion of two strings, ignoring case differences. | |
| YASM_LIB_DECL char * | yasm__xstrdup (const char *str) |
| strdup() implementation using yasm_xmalloc(). | |
| YASM_LIB_DECL char * | yasm__xstrndup (const char *str, size_t max) |
| strndup() implementation using yasm_xmalloc(). | |
Variables | |
| YASM_LIB_DECL void *(*) | yasm_xmalloc (size_t size) |
| Error-checking memory allocation. | |
| YASM_LIB_DECL void *(*) | yasm_xcalloc (size_t nelem, size_t elsize) |
| Error-checking memory allocation (with clear-to-0). | |
| YASM_LIB_DECL void *(*) | yasm_xrealloc (void *oldmem, size_t size) |
| Error-checking memory reallocation. | |
| YASM_LIB_DECL void(*) | yasm_xfree (void *p) |
| Error-checking memory deallocation. | |
Definition in file coretype.h.
Architecture instance (mostly opaque type).
Definition at line 42 of file coretype.h.
| typedef struct yasm_bytecode yasm_bytecode |
Bytecode.
Definition at line 97 of file coretype.h.
| typedef struct yasm_dbgfmt yasm_dbgfmt |
| typedef struct yasm_dbgfmt_module yasm_dbgfmt_module |
Debug format module interface.
Definition at line 57 of file coretype.h.
| typedef struct yasm_directive yasm_directive |
Directive list entry.
Definition at line 209 of file coretype.h.
| typedef struct yasm_effaddr yasm_effaddr |
An effective address.
Definition at line 214 of file coretype.h.
| typedef struct yasm_errwarns yasm_errwarns |
Set of collected error/warnings (opaque type).
Definition at line 94 of file coretype.h.
Expression.
Definition at line 112 of file coretype.h.
| typedef struct yasm_floatnum yasm_floatnum |
Floating point value (opaque type).
Definition at line 118 of file coretype.h.
| typedef struct yasm_intnum yasm_intnum |
Integer value (opaque type).
Definition at line 114 of file coretype.h.
| typedef struct yasm_linemap yasm_linemap |
Line number mapping repository (opaque type).
Definition at line 196 of file coretype.h.
| typedef struct yasm_listfmt yasm_listfmt |
| typedef struct yasm_object yasm_object |
Object.
Definition at line 100 of file coretype.h.
| typedef struct yasm_objfmt yasm_objfmt |
| typedef struct yasm_objfmt_module yasm_objfmt_module |
Object format module interface.
Definition at line 55 of file coretype.h.
| typedef int(*) yasm_output_reloc_func(yasm_symrec *sym, yasm_bytecode *bc, unsigned char *buf, unsigned int destsize, unsigned int valsize, int warn, void *d) |
Convert a symbol reference to its byte representation.
Usually implemented by object formats and debug formats to keep track of relocations generated by themselves.
| sym | symbol | |
| bc | current bytecode (usually passed into higher-level calling function) | |
| buf | buffer for byte representation | |
| destsize | destination size (in bytes) | |
| valsize | size (in bits) | |
| warn | enables standard warnings: zero for none; nonzero for overflow/underflow floating point warnings; negative for signed integer warnings, positive for unsigned integer warnings | |
| d | objfmt-specific data (passed into higher-level calling function) |
Definition at line 299 of file coretype.h.
| typedef int(*) yasm_output_value_func(yasm_value *value,unsigned char *buf, unsigned int destsize, unsigned long offset, yasm_bytecode *bc, int warn,void *d) |
Convert yasm_value to its byte representation.
Usually implemented by object formats to keep track of relocations and verify legal expressions. Must put the value into the least significant bits of the destination, unless shifted into more significant bits by the shift parameter. The destination bits must be cleared before being set.
| value | value | |
| buf | buffer for byte representation | |
| destsize | destination size (in bytes) | |
| offset | offset (in bytes) of the expr contents from the start of the bytecode (needed for relative) | |
| bc | current bytecode (usually passed into higher-level calling function) | |
| warn | enables standard warnings: zero for none; nonzero for overflow/underflow floating point warnings | |
| d | objfmt-specific data (passed into higher-level calling function) |
Definition at line 278 of file coretype.h.
| typedef struct yasm_parser yasm_parser |
Parser instance (mostly opaque type).
Definition at line 46 of file coretype.h.
| typedef struct yasm_preproc yasm_preproc |
| typedef struct yasm_section yasm_section |
Section (opaque type).
Definition at line 103 of file coretype.h.
| typedef struct yasm_symrec yasm_symrec |
Symbol record (opaque type).
Definition at line 109 of file coretype.h.
| typedef struct yasm_symtab yasm_symtab |
Symbol table (opaque type).
Definition at line 106 of file coretype.h.
| typedef struct yasm_valparam yasm_valparam |
Value/parameter pair (opaque type).
Definition at line 201 of file coretype.h.
| typedef struct yasm_valparamhead yasm_valparamhead |
List of value/parameters (opaque type).
Definition at line 205 of file coretype.h.
| enum yasm_expr_op |
Expression operators usable in yasm_expr expressions.
Definition at line 222 of file coretype.h.
| YASM_LIB_DECL int yasm__mergesort | ( | void * | base, | |
| size_t | nmemb, | |||
| size_t | size, | |||
| int(*)(const void *, const void *) | compar | |||
| ) |
Sort an array using merge sort algorithm.
For internal use only.
| base | base of array | |
| nmemb | number of elements in array | |
| size | size of each array element | |
| compar | element comparison function |
| YASM_LIB_DECL int yasm__strcasecmp | ( | const char * | s1, | |
| const char * | s2 | |||
| ) |
Compare two strings, ignoring case differences.
For internal use only.
| s1 | string 1 | |
| s2 | string 2 |
| YASM_LIB_DECL int yasm__strncasecmp | ( | const char * | s1, | |
| const char * | s2, | |||
| size_t | n | |||
| ) |
Compare portion of two strings, ignoring case differences.
For internal use only.
| s1 | string 1 | |
| s2 | string 2 | |
| n | maximum number of characters to compare |
| YASM_LIB_DECL char* yasm__strsep | ( | char ** | stringp, | |
| const char * | delim | |||
| ) |
Separate string by delimiters.
For internal use only.
| stringp | string | |
| delim | set of 1 or more delimiters |
| YASM_LIB_DECL char* yasm__xstrdup | ( | const char * | str | ) |
strdup() implementation using yasm_xmalloc().
For internal use only.
| str | string |
| YASM_LIB_DECL char* yasm__xstrndup | ( | const char * | str, | |
| size_t | max | |||
| ) |
strndup() implementation using yasm_xmalloc().
For internal use only.
| str | string | |
| max | maximum number of characters to copy |
| YASM_LIB_DECL void*(*) yasm_xcalloc(size_t nelem, size_t elsize) |
Error-checking memory allocation (with clear-to-0).
A default implementation is provided that calls yasm_fatal() on allocation errors. A replacement should never return NULL.
| size | number of elements to allocate | |
| elsize | size (in bytes) of each element |
| YASM_LIB_DECL void(*) yasm_xfree(void *p) |
Error-checking memory deallocation.
A default implementation is provided that calls yasm_fatal() on allocation errors.
| p | memory block to free |
| YASM_LIB_DECL void*(*) yasm_xmalloc(size_t size) |
Error-checking memory allocation.
A default implementation is provided that calls yasm_fatal() on allocation errors. A replacement should never return NULL.
| size | number of bytes to allocate |
| YASM_LIB_DECL void*(*) yasm_xrealloc(void *oldmem, size_t size) |
Error-checking memory reallocation.
A default implementation is provided that calls yasm_fatal() on allocation errors. A replacement should never return NULL.
| oldmem | memory block to resize | |
| elsize | new size, in bytes |
1.5.2