#ifndef WONKY_INTEL_ASM_LOCATION_H
#define WONKY_INTEL_ASM_LOCATION_H WONKY_INTEL_ASM_LOCATION_H
#include <intel_location.hh>
#include <intel_asm.h>
#include <stdio.h>
#include <stdlib.h>
#include <wonky_malloc.h>
#include <wonky_stream.h>
struct Intel_Asm_Memory_Location
{
enum Intel_Asm_Memory_Location_Type type;
};
struct Intel_Asm_Memory_Location_By_Register
{
enum Intel_Asm_Memory_Location_Type type;
enum Intel_Asm_Registers reg;
enum Intel_Asm_Memory_Size_Type size;
};
struct Intel_Asm_Memory_Location_Register
{
enum Intel_Asm_Memory_Location_Type type;
enum Intel_Asm_Registers reg;
};
struct Intel_Asm_Memory_Location_By_Label
{
enum Intel_Asm_Memory_Location_Type type;
struct Intel_Asm_Label *label;
};
struct Intel_Asm_Memory_Location_By_Stack_Offset
{
enum Intel_Asm_Memory_Location_Type type;
int offset;
enum Intel_Asm_Memory_Size_Type size;
};
struct Intel_Asm_Memory_Location_Stack_Offset
{
enum Intel_Asm_Memory_Location_Type type;
int offset;
};
struct Intel_Asm_Memory_Location_In_Instruction_Number
{
enum Intel_Asm_Memory_Location_Type type;
int number;
};
void save_intel_asm_location(struct Intel_Asm_Memory_Location *location,struct wonky_stream *out);
void save_intel_asm_label_location(struct Intel_Asm_Memory_Location_By_Label *label,struct wonky_stream *out);
void save_intel_asm_stack_offset_location(struct Intel_Asm_Memory_Location_Stack_Offset *sp,struct wonky_stream *out);
void save_intel_asm_by_stack_offset_location(struct Intel_Asm_Memory_Location_By_Stack_Offset *sp,struct wonky_stream *out);
void save_intel_asm_by_register_location(struct Intel_Asm_Memory_Location_By_Register *reg,struct wonky_stream *out);
void save_intel_asm_register_location(struct Intel_Asm_Memory_Location_Register *reg,struct wonky_stream *out);
void save_intel_asm_number_in_instruction(struct Intel_Asm_Memory_Location_In_Instruction_Number *num,struct wonky_stream *out);
struct Intel_Asm_Memory_Location* get_intel_asm_register(enum Intel_Asm_Registers reg);
struct Intel_Asm_Memory_Location* get_intel_asm_by_register(enum Intel_Asm_Registers reg,size_t size);
struct Intel_Asm_Memory_Location* get_intel_asm_label_location(struct Intel_Asm_Label *label);
struct Intel_Asm_Memory_Location* get_intel_asm_stack_offset(int offset);
struct Intel_Asm_Memory_Location* get_intel_asm_by_stack_offset(int offset,size_t size);
struct Intel_Asm_Memory_Location* get_intel_asm_by_stack_offset_from_stack_offset(struct Intel_Asm_Memory_Location *location,size_t size);
struct Intel_Asm_Memory_Location* get_intel_asm_in_instruction_number(int number);
struct Intel_Asm_Memory_Location* intel_asm_get_ax_register();
struct Intel_Asm_Memory_Location* intel_asm_get_dx_register();
#endif