On 2/14/2012 3:41 PM, robin wrote:

If "everyone" understands that "SR regx,regx"  and "XR regx,regx" zero
regx then there is little to no benefit to having a macro that is "ZERO
regx".

If so, there's be little need for comments such as the example

  XR R5,R5    zeroise R5

Something sensible like
     ZERO 5
makes it absolutely clear, and soes not need a "clarifying" remark.

Even this may depend on your trust in the author of
the macro; possibly yourself; possibly not.

A novice may have coded as the macro body:

  L  regx,=F'0'

which requires addressability to the literal pool.  The results
are worst if the caller has changed the content of the base
register and neglected to code a DROP.

Or:

  LA  regx,0

where the effect on the top half of regx depends on whether
64-bit mode is in effect.  This may actually be reason to
prefer this form.

-- gil

Reply via email to