fcml  1.2.2
Classes | Macros | Typedefs | Functions
fcml_optimizers.h File Reference

API for assembler optimizers. More...

#include "fcml_lib_export.h"
#include "fcml_types.h"
#include "fcml_errors.h"
#include "fcml_common.h"
Include dependency graph for fcml_optimizers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fcml_st_asm_optimizer_context
 Optimizer context used as a connector with the environment. More...
 
struct  fcml_st_asm_optimizer_processing_details
 Processing details for optimizers. More...
 

Macros

#define FCML_OPTF_ASA_16   0x01
 
#define FCML_OPTF_ASA_32   0x02
 
#define FCML_OPTF_ASA_64   0x03
 
#define FCML_OPTF_OSA_16   0x10
 
#define FCML_OPTF_OSA_32   0x20
 
#define FCML_OPTF_OSA_64   0x30
 
#define FCML_OPTF_ALL_FORMS   0xFF
 

Typedefs

typedef struct fcml_st_asm_optimizer_context fcml_st_asm_optimizer_context
 Optimizer context used as a connector with the environment. More...
 
typedef struct fcml_st_asm_optimizer_processing_details fcml_st_asm_optimizer_processing_details
 Processing details for optimizers. More...
 
typedef fcml_ceh_error(* fcml_fnp_asm_optimizer_callback) (fcml_ptr args)
 Callback used to invoke encoding process for given processing details configuration. More...
 
typedef fcml_ceh_error(LIB_CALL * fcml_fnp_asm_optimizer) (fcml_st_asm_optimizer_context *context, fcml_st_asm_optimizer_processing_details *ds_flags, fcml_fnp_asm_optimizer_callback callback, fcml_ptr args)
 Function pointer declaration for optimizers. More...
 

Functions

LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_asm_default_optimizer (fcml_st_asm_optimizer_context *context, fcml_st_asm_optimizer_processing_details *ds_flags, fcml_fnp_asm_optimizer_callback callback, fcml_ptr callback_args)
 Default optimizer implementation. More...
 

Detailed Description

API for assembler optimizers.

For more details about optimizers see FCML manual.

Typedef Documentation

◆ fcml_fnp_asm_optimizer

typedef fcml_ceh_error(LIB_CALL * fcml_fnp_asm_optimizer) (fcml_st_asm_optimizer_context *context, fcml_st_asm_optimizer_processing_details *ds_flags, fcml_fnp_asm_optimizer_callback callback, fcml_ptr args)

Function pointer declaration for optimizers.

Parameters
contextOptimizer context.
ds_flagsCurrent instruction processing details.
callbackCallback used to continue processing for configuration prepared by optimizer.
argsArguments that should be passed to the callback.
Returns
Error code or FCML_CEH_GEC_NO_ERROR.

◆ fcml_fnp_asm_optimizer_callback

typedef fcml_ceh_error(* fcml_fnp_asm_optimizer_callback) (fcml_ptr args)

Callback used to invoke encoding process for given processing details configuration.

Parameters
argsArguments from optimizer.
Returns
Error code or FCML_CEH_GEC_NO_ERROR.

◆ fcml_st_asm_optimizer_context

Optimizer context used as a connector with the environment.

◆ fcml_st_asm_optimizer_processing_details

Processing details for optimizers.

Function Documentation

◆ fcml_fn_asm_default_optimizer()

LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_asm_default_optimizer ( fcml_st_asm_optimizer_context context,
fcml_st_asm_optimizer_processing_details ds_flags,
fcml_fnp_asm_optimizer_callback  callback,
fcml_ptr  callback_args 
)

Default optimizer implementation.

This implementation chooses the best combination of attributes for current processor operating mode.

Parameters
contextOptimizer context.
ds_flagsCurrent instruction processing details.
callbackCallback used to continue processing for configuration prepared by optimizer.
callback_argsArguments that should be passed to the callback.
Returns
Error code or FCML_CEH_GEC_NO_ERROR.