![]() |
||
6. Local Variables |
||
|
|
When analyzing the use of registers in a function, Relogix looks at how they are used and changed. When a new value is placed in a register, it often means that the logical contents of the register are unrelated to the previous contents. In our example, A0 starts by being a pointer to a structure in memory. The instruction:
creates a second, different, use for the register, as a pointer to an array of longs. Relogix therefore creates a different local variable for this use of the register. Although most local variables in translated code correspond to registers in the original assembler, not all do. Relogix may also create local variables for data held on the stack, and also for conditions or specific flags in the condition-code register. Occasionally, as part of its translation, it may create further local variables for controlling the code-flow or as temporary values for translating certain instructions.
|
Copyright © 2003-4 MicroAPL Ltd