Turnstone Operating System
Loading...
Searching...
No Matches
asm_encoder.64.c File Reference

64-bit assembler encoder. More...

#include <compiler/asm_encoder.h>
#include <compiler/asm_parser.h>
#include <compiler/asm_instructions.h>
#include <strings.h>
#include <int_limits.h>
#include <logging.h>

Classes

struct  asm_register_map_t
 

Macros

#define ASM_REGISTER_COUNT   (sizeof(asm_register_map) / sizeof(asm_register_map_t))
 

Typedefs

typedef struct asm_register_map_t asm_register_map_t
 

Functions

 MODULE ("turnstone.compiler.assembler")
 
boolean_t asm_parse_number (char_t *data, uint64_t *result)
 
boolean_t asm_parse_instruction_param (const asm_token_t *tok, asm_instruction_param_t *param)
 
boolean_t asm_parse_register_param (char_t *reg_str, uint8_t reg_idx, asm_instruction_param_t *param)
 
boolean_t asm_parse_immediate_param (char_t *data, asm_instruction_param_t *param)
 
boolean_t asm_parse_memory_param (char_t *data, asm_instruction_param_t *param)
 
boolean_t asm_encode_modrm_sib (asm_instruction_param_t op, boolean_t *need_sib, uint8_t *modrm, uint8_t *sib, boolean_t *need_rex, uint8_t *rex, boolean_t *has_displacement, uint8_t *disp_size)
 
boolean_t asm_encode_instruction (iterator_t *it, buffer_t *outbuf, list_t *relocs)
 
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)
 

Variables

const asm_register_map_t asm_register_map []
 

Detailed Description

64-bit assembler encoder.