Turnstone Operating System
Loading...
Searching...
No Matches
asm_encoder.h File Reference

assembler encoder functions and types More...

#include <types.h>
#include <buffer.h>
#include <list.h>
#include <linker.h>

Classes

struct  asm_register_t
 
struct  asm_instruction_param_t
 
struct  asm_relocation_t
 

Macros

#define ___ASM_ENCODER_H   0
 
#define ASM_INSTRUCTION_PREFIX_LOCK   0xF0
 
#define ASM_INSTRUCTION_PREFIX_REP   0xF3
 
#define ASM_INSTRUCTION_PREFIX_REPNE   0xF2
 
#define ASM_INSTRUCTION_PREFIX_OPERAND_SIZE_OVERRIDE   0x66
 
#define ASM_INSTRUCTION_PREFIX_ADDRESS_SIZE_OVERRIDE   0x67
 
#define ASM_INSTRUCTION_ESCAPE_BYTE   0x0F
 

Typedefs

typedef enum asm_instruction_param_type_t asm_instruction_param_type_t
 
typedef enum asm_register_type_t asm_register_type_t
 
typedef struct asm_register_t asm_register_t
 
typedef struct asm_instruction_param_t asm_instruction_param_t
 
typedef struct asm_relocation_t asm_relocation_t
 

Enumerations

enum  asm_instruction_param_type_t { ASM_INSTRUCTION_PARAM_TYPE_REGISTER , ASM_INSTRUCTION_PARAM_TYPE_MEMORY , ASM_INSTRUCTION_PARAM_TYPE_IMMEDIATE }
 
enum  asm_register_type_t { ASM_REGISTER_TYPE_NORMAL , ASM_REGISTER_TYPE_BASE , ASM_REGISTER_TYPE_INDEX }
 

Functions

boolean_t asm_encode_instructions (list_t *tokens, buffer_t *out, list_t *relocs)
 
void asm_encoder_print_relocs (list_t *relocs)
 
void asm_encoder_destroy_relocs (list_t *relocs)
 

Detailed Description

assembler encoder functions and types

Macro Definition Documentation

◆ ___ASM_ENCODER_H

#define ___ASM_ENCODER_H   0

prevent duplicate header error macro