beautypg.com

S (see the, Use register, Variables – Zilog ZUSBOPTS User Manual

Page 85

background image

UM017105-0511

Menu Bar

Zilog Developer Studio II – ZNEO™

User Manual

57

Use Register Variables.

Selecting this checkbox allows the compiler to allocate local

variables in registers, rather than on the stack, when possible. This usually makes the
resulting code smaller and faster and, therefore, the default is that this checkbox is
enabled. However, in some applications, this checkbox might produce larger and slower
code when a function contains a large number of local variables.

The effect of this checkbox on overall program size and speed can only be assessed glob-
ally across the entire application, which the compiler cannot do automatically. Usually the
overall application size is smaller but there can be exceptions to that rule. For example, in
an application that contains 50 functions, this checkbox might make 2 functions larger and
the other 48 functions smaller. Also, if those two functions run slower with the checkbox
enabled but the others run faster, then whether the overall program speed is improved or
worsened depends on how much time the application spends in each function.

Because the effect of applying this option must be evaluated across an application as a
whole, user experimentation is required to test this for an individual application. Only a

Figure 52. Advanced Page of the Project Settings Dialog Box

This manual is related to the following products: