Public Methods |
|
| Assembler () |
| | constructor.
|
|
| ~Assembler () |
| | destructor.
|
|
Label | allocString (const char *szString) |
| | get a symbolic reference id for a String and store the double in the data area.
|
|
Label | allocDouble (double value) |
| | get a symbolic reference id for a double and store the double in the data area.
|
|
Label | allocVector (const Vector3 &v) |
| | get a symbolic reference id for a Vector3 and store the double in the data area.
|
|
Label | allocPoint (const Vector2 &v) |
| | get a symbolic reference id for a Vector2 and store the double in the data area.
|
|
Label | allocColor (const Color &c) |
| | get a symbolic reference id for a Color and store the double in the data area.
|
|
Label | allocLabel () |
| | allocate a code label.
|
|
Label | allocBSS (unsigned long size) |
| | allocate a bss label.
|
| Label | allocVariable (const Type &type,const char *name) |
| | Allocate a global variable label. More...
|
|
StackLabel | getStackLabel ()const |
| | Get the current Stack position as StackLabel object.
|
|
StackLabel | getBaseLabel ()const |
| | Get the current BasePointer position as StackLabel object.
|
|
void | setLabel (const Label &label) |
| | define the location of a allocated label.
|
| void | addCommand (long opcode) throw (bad_alloc) |
| | add a assembler command without addtional parameters. More...
|
|
void | addCommand (long opcode,const string &data) throw (bad_alloc) |
| | add a assembler command which takes a string parameter.
|
|
void | addCommand (long opcode,const char *data) throw (bad_alloc) |
| | add a assembler command which takes a string parameter.
|
|
void | addCommand (long opcode,long data) throw (bad_alloc) |
| | add a assembler command which takes a integer parameter.
|
|
void | addCommand (long opcode,int data) throw (bad_alloc) |
| | add a assembler command which takes a integer parameter.
|
|
void | addCommand (long opcode,unsigned long data) throw (bad_alloc) |
| | add a assembler command which takes a integer parameter.
|
|
void | addCommand (long opcode,bool data) throw (bad_alloc) |
| | add a assembler command which takes a boolean parameter.
|
|
void | addCommand (long opcode,double data) throw (bad_alloc) |
| | add a assembler command which takes a double parameter.
|
|
void | addCommand (long opcode,const Vector2 &data) throw (bad_alloc) |
| | add a assembler command which takes a Vector2 parameter.
|
|
void | addCommand (long opcode,const Vector3 &data) throw (bad_alloc) |
| | add a assembler command which takes a Vector3 parameter.
|
|
void | addCommand (long opcode,const Color &data) throw (bad_alloc) |
| | add a assembler command which takes a Color parameter.
|
|
void | addCommand (long opcode,const Label &label) throw (bad_alloc) |
| | add a assembler command which takes a Label parameter The possible Labels are: code labels (for jumps) (global uninitialized) data (load/store) (constant initialized) data (load/store).
|
|
void | addCommand (long opcode,const StackLabel &label) throw (bad_alloc) |
| | add a assembler command which takes a StackLabel parameter for stack or base pointer relative addressing.
|
|
ObjectFile* | getObjectFile ()const |
|
void | setObjectFile (ObjectFile *pObjectFile) |
|
void | finalizeObjectFile () |
| | Finalize generation of the ObjectFile.
|
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.