coolray.org FAQ Contact Us
CoolRay Banner
CoolRay / Documentation
Main Page   Class Hierarchy   Compound List   Compound Members   Related Pages  

AssemblerImp Class Reference

The class AssemblerImp provides basic code generation facilities. More...

#include <AssemblerImp.h>

Collaboration diagram for AssemblerImp:

Collaboration graph
[legend]
List of all members.

Public Methods

 AssemblerImp ()
 constructor.

 ~AssemblerImp ()
 destructor.

template<class T> Label allocData (const T &data)
Label allocData (const char *szString)
Label allocData (const string &str)
Label allocLabel ()
 allocate a code label.

Label allocBSS (unsigned long size)
 allocate a bss label.

Label allocVariable (const Type &type,const char *name)
void setLabel (const Label &label)
 define the location of a allocated label.

StackLabel getStackLabel ()const
StackLabel getBaseLabel ()const
void addOpcode (long opcode,long data=0) throw (bad_alloc)
 add a standard assembler command.

void addCommand (long opcode) throw (bad_alloc)
void addCommand (long opcode,const string &data) throw (bad_alloc)
void addCommand (long opcode,long data) throw (bad_alloc)
void addCommand (long opcode,bool data) throw (bad_alloc)
void addCommand (long opcode,double data) throw (bad_alloc)
void addCommand (long opcode,const Vector2 &data) throw (bad_alloc)
void addCommand (long opcode,const Vector3 &data) throw (bad_alloc)
void addCommand (long opcode,const Color &data) throw (bad_alloc)
void addCommand (long opcode,const StackLabel &label) throw (bad_alloc)
void addCommand (long opcode,const Label &label) throw (bad_alloc)
 add a assembler command that references (constant initialized) data (load/store).

ObjectFilegetObjectFile ()const
void setObjectFile (ObjectFile *pObjectFile)
void finalizeObjectFile ()
 Finalize generation of the ObjectFile.


Static Public Methods

long resolveOpcode_Ixx (const long op1,const long op2,const long op3,const long data,int &data_size)
long resolveOpcode_Uxx (const long op1,const long op2,const long op3,const long data,int &data_size)

Protected Methods

CodeSection& getCodeSection ()
const CodeSection& getCodeSection ()const
void setCodeSection (CodeSection &section)

Detailed Description

The class AssemblerImp provides basic code generation facilities.

It allows handling of Assembler code with labels and frees the code generation code from address calculations and low level opcode calculations. It also provides some means for register allocation management.

See also:
RegisterAllocator , RefData , RefCode


The documentation for this class was generated from the following file:
  • AssemblerImp.h
You are visitor No.

counter

Copyright (c) 2001 Stefan Michel, All Rights Reserved.
Last modified: