fcml  1.2.2
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"
Include dependency graph for fcml_choosers.h:
This graph shows which files directly or indirectly include this file:

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

◆ fcml_fnp_asm_instruction_chooser

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.

◆ fcml_fnp_chooser_extract

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.

◆ fcml_fnp_chooser_next

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.

◆ fcml_st_chooser_context

Instruction chooser context used to communicate with environment.

Function Documentation

◆ fcml_fn_asm_default_instruction_chooser()

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_fn_asm_no_instruction_chooser()

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.