>*  int var = 0;
>
>      LA   r4,0
>      LR   r0,r4
>      ST   r0,var(,r13,160)

My guess is that this code is doing the following:

1.  A constant of zero will be needed.  Assign this
    to a register without changing the cond code.
    It might be needed again in the near future.
2.  Assign the variable var temporarily to r0, in
    case we need it again soon, and set it to zero.
3.  Store the variable var in its storage field for
    later, as it has just been updated and we may
    need to reuse the temporary register.

This obviously leaves huge scope for optimisation.

Jonathan Scott, HLASM
IBM Hursley, UK

Reply via email to