I do that anyway; AND I use ASMMREL ON.

My point is that the IF structure generates the following:
    CLI 0(r1),c'*'
    JNE not_true
    J <iteration_loop>
Not_true ds 0h

With an ITERATE_IF structure, you would get
    CLI 0(R1),c'*'
    JE  <iteration_loop>

With the IF structure, given the normal ratio of comment to "real" data, you 
will have a very high percentage of pipeline flush due to incorrect branch 
prediction. 

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Dougie Lawson
Sent: 15 May 2017 08:21
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Structured programminng macros

Hi Pieter,

What happens if you assemble with IEABRCX DEFINE & IEABRCX ENABLE rather than 
trying to re-write the branches yourself?

Regards, Dougie

On 14 May 2017 at 21:17, Pieter Wiid <pw...@mweb.co.za> wrote:

> Has anybody tried to make the HLASM toolkit's SPM's work with compare 
> and jump / compare and branch instructions?
>
> e.g.
> DO INF
>    JAS R14,some_function
> DOEXIT CIJNE,R15,0
>    :
>    :
> ENDDO
>
> And another idea: have an ITERATE_IF similar to DOEXIT. I.e. if test 
> condition is true, jump to iteration point.
> At first glance, I thought to jump to the top of the loop, but things 
> like BCT / JCT, and DO WHILE/UNTIL loops means that the ITERATE would 
> have to branch to the end of the loop.
>
> Example:
> DO INF
>    GET INFILE
> ITERATE_IF CLI,0(R1),EQ,c'*'
>    <process non-comment>
> ENDDO
>
> At the moment, I would have to code
> IF CLI,0(R1),EQ,c'*'
>    ITERATE
> ENDIF
>
> The latter would generate "bad" branches (pipeline-flushing) most of 
> the time, assuming you would have less comment cards than non-comment.
>
> Pieter
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>



--
http://twitter.com/DougieLawson

Reply via email to