fcml  1.1.3
Classes | Typedefs | Functions
fcml_choosers.h File Reference

API for instruction choosers. More...

#include "fcml_lib_export.h"
#include "fcml_types.h"
#include "fcml_common.h"

Go to the source code of this file.

Classes

struct  fcml_st_chooser_context
 Instruction chooser context used to communicate with environment. More...
 

Typedefs

typedef fcml_ptr(* fcml_fnp_chooser_next) (fcml_ptr instruction)
 Returns next instructions from the iterator. More...
 
typedef void(* fcml_fnp_chooser_extract) (fcml_ptr instruction, fcml_st_instruction_code *instruction_code)
 Gets instruction code from current abstract instruction pointer. More...
 
typedef struct fcml_st_chooser_context fcml_st_chooser_context
 Instruction chooser context used to communicate with environment. More...
 
typedef fcml_ptr(LIB_CALL * fcml_fnp_asm_instruction_chooser) (fcml_st_chooser_context *chooser_context)
 Instruction chooser function pointer declaration. More...
 

Functions

fcml_ptr LIB_EXPORT LIB_CALL fcml_fn_asm_default_instruction_chooser (fcml_st_chooser_context *chooser_context)
 Default instruction chooser which chooses the shortest instruction available. More...
 
fcml_ptr LIB_EXPORT LIB_CALL fcml_fn_asm_no_instruction_chooser (fcml_st_chooser_context *chooser_context)
 NULL chooser which do not chose anything. More...
 

Detailed Description

API for instruction choosers.

Typedef Documentation

typedef fcml_ptr(LIB_CALL * fcml_fnp_asm_instruction_chooser) (fcml_st_chooser_context *chooser_context)

Instruction chooser function pointer declaration.

Parameters
chooser_contextInstruction chooser context.
typedef void(* fcml_fnp_chooser_extract) (fcml_ptr instruction, fcml_st_instruction_code *instruction_code)

Gets instruction code from current abstract instruction pointer.

Gets instruction pointer and fills given instruction code holder with the binary code of the instruction.

Parameters
instructionInstruction pointer.
instruction_codeHolder for the instruction code.
typedef fcml_ptr(* fcml_fnp_chooser_next) (fcml_ptr instruction)

Returns next instructions from the iterator.

Instruction chooser uses this function to get next instruction from the chain.

Parameters
instructionCurrent instruction.

Instruction chooser context used to communicate with environment.

Function Documentation

fcml_ptr LIB_EXPORT LIB_CALL fcml_fn_asm_default_instruction_chooser ( fcml_st_chooser_context chooser_context)

Default instruction chooser which chooses the shortest instruction available.

Parameters
chooser_contextInstruction chooser context.
fcml_ptr LIB_EXPORT LIB_CALL fcml_fn_asm_no_instruction_chooser ( fcml_st_chooser_context chooser_context)

NULL chooser which do not chose anything.

Parameters
chooser_contextInstruction chooser context.