As far as I can recall, the maximum 256 bytes of a constrained transaction can 
cross a cache-line boundary. It would be fairly limiting — especially for 
compiler-generated code — to require that a constrained transaction all fit 
within a single cache line.

However, one other constraint is that the transaction cannot loop. Thus, 
branching instructions are limited to forward branches with a non-zero branch 
mask (see item 3.b on page 5-108). The BCTR instruction in your example will 
cause a constraint violation. If you really want to decrement register 1, 
suggest replacing the BCTR 1,0 with AHI 1,-1.

Note, there is a High-Level Assembler exit, ASMAXTXP, that will identify 
transaction-constraint violations that can be recognized during assembly. The 
source is available for z/OS and z/VM in wherever those SCPs squirrel away 
their sample code (SYS1.SAMPLIB sounds promising for z/OS). There's also a test 
program, ASMASTXP, to generate a listing that will exercise all of the 
violations identified by ASMAXTRP. No longer having access to a real machine, I 
don't know whether these exits have been updated to the current machine's 
instruction set.

Reply via email to