T.I.M | Toolchain Documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
asm_control_flow.c File Reference

Code for calculating jump distances and assigning memory addresses to jump statements. More...

#include "asm.h"

Functions

int asm_calculate_addresses (asm_statement *statements, unsigned int base_address, asm_hash_table *labels)
 Assigns addresses to each statement so that jumps and calls can be calculated. More...
 

Detailed Description

Code for calculating jump distances and assigning memory addresses to jump statements.

Function Documentation

int asm_calculate_addresses ( asm_statement *  statements,
unsigned int  base_address,
asm_hash_table labels 
)

Assigns addresses to each statement so that jumps and calls can be calculated.

Parameters
statements- head of a linked list of asm statements.
base_address- Where the addresses of the program should start.
Returns
The number of errors encountered such as missing labels. 0 means everything was okay.

References asm_hash_table_get(), CALLI, error, JUMPI, log, NOT_EMITTED, opcode, and size.

Referenced by main().