CBMC
remove_asmt Class Reference
+ Collaboration diagram for remove_asmt:

Public Member Functions

 remove_asmt (symbol_tablet &_symbol_table, goto_functionst &_goto_functions, message_handlert &message_handler)
 
void operator() ()
 

Protected Member Functions

void process_function (const irep_idt &, goto_functionst::goto_functiont &)
 Replaces inline assembly instructions in the goto function by non-assembly goto program instructions. More...
 
void process_instruction (const irep_idt &function_id, goto_programt::instructiont &instruction, goto_programt &dest)
 Translates the given inline assembly code (which must be in either gcc or msc style) to non-assembly goto program instructions. More...
 
void process_instruction_gcc (const code_asm_gcct &, goto_programt &dest)
 Translates the given inline assembly code (in gcc style) to non-assembly goto program instructions. More...
 
void process_instruction_msc (const irep_idt &, const code_asmt &, goto_programt &dest)
 Translates the given inline assembly code (in msc style) to non-assembly goto program instructions. More...
 
void gcc_asm_function_call (const irep_idt &function_base_name, const code_asm_gcct &code, std::size_t n_args, goto_programt &dest)
 Adds a call to a library function that implements the given gcc-style inline assembly statement. More...
 
void msc_asm_function_call (const irep_idt &function_base_name, const exprt::operandst &operands, const code_asmt &code, goto_programt &dest)
 Adds a call to a library function that implements the given msc-style inline assembly statement. More...
 

Protected Attributes

symbol_tabletsymbol_table
 
goto_functionstgoto_functions
 
message_handlertmessage_handler
 

Detailed Description

Definition at line 30 of file remove_asm.cpp.

Constructor & Destructor Documentation

◆ remove_asmt()

remove_asmt::remove_asmt ( symbol_tablet _symbol_table,
goto_functionst _goto_functions,
message_handlert message_handler 
)
inline

Definition at line 33 of file remove_asm.cpp.

Member Function Documentation

◆ gcc_asm_function_call()

void remove_asmt::gcc_asm_function_call ( const irep_idt function_base_name,
const code_asm_gcct code,
std::size_t  n_args,
goto_programt dest 
)
protected

Adds a call to a library function that implements the given gcc-style inline assembly statement.

Parameters
function_base_nameName of the function to call
codegcc-style inline assembly statement to translate to function call
n_argsNumber of arguments required by function_base_name
destGoto program to append the function call to

Definition at line 89 of file remove_asm.cpp.

◆ msc_asm_function_call()

void remove_asmt::msc_asm_function_call ( const irep_idt function_base_name,
const exprt::operandst operands,
const code_asmt code,
goto_programt dest 
)
protected

Adds a call to a library function that implements the given msc-style inline assembly statement.

Parameters
function_base_nameName of the function to call
operandsArguments to be passed to function
codemsc-style inline assembly statement to translate to function call
destGoto program to append the function call to

Definition at line 173 of file remove_asm.cpp.

◆ operator()()

void remove_asmt::operator() ( void  )
inline

Definition at line 43 of file remove_asm.cpp.

◆ process_function()

void remove_asmt::process_function ( const irep_idt function_id,
goto_functionst::goto_functiont goto_function 
)
protected

Replaces inline assembly instructions in the goto function by non-assembly goto program instructions.

Parameters
function_idName of function being processed
goto_functionThe goto function

Definition at line 544 of file remove_asm.cpp.

◆ process_instruction()

void remove_asmt::process_instruction ( const irep_idt function_id,
goto_programt::instructiont instruction,
goto_programt dest 
)
protected

Translates the given inline assembly code (which must be in either gcc or msc style) to non-assembly goto program instructions.

Parameters
function_idName of function being processed
instructionThe goto program instruction containing the inline assembly statements
destThe goto program to append the new instructions to

Definition at line 225 of file remove_asm.cpp.

◆ process_instruction_gcc()

void remove_asmt::process_instruction_gcc ( const code_asm_gcct code,
goto_programt dest 
)
protected

Translates the given inline assembly code (in gcc style) to non-assembly goto program instructions.

Parameters
codeThe inline assembly code statement to translate
destThe goto program to append the new instructions to

Definition at line 247 of file remove_asm.cpp.

◆ process_instruction_msc()

void remove_asmt::process_instruction_msc ( const irep_idt function_id,
const code_asmt code,
goto_programt dest 
)
protected

Translates the given inline assembly code (in msc style) to non-assembly goto program instructions.

Parameters
function_idName of function being processed
codeThe inline assembly code statement to translate
destThe goto program to append the new instructions to

Definition at line 417 of file remove_asm.cpp.

Member Data Documentation

◆ goto_functions

goto_functionst& remove_asmt::goto_functions
protected

Definition at line 51 of file remove_asm.cpp.

◆ message_handler

message_handlert& remove_asmt::message_handler
protected

Definition at line 52 of file remove_asm.cpp.

◆ symbol_table

symbol_tablet& remove_asmt::symbol_table
protected

Definition at line 50 of file remove_asm.cpp.


The documentation for this class was generated from the following file: