BRC -- BRANCH RELATIVE ON CONDITION.

BCR -- BRANCH ON CONDITION REGISTER



*Mark*


On Fri, Mar 4, 2022 at 3:21 PM Seymour J Metz <[email protected]> wrote:

> Do you really mean BCR, or was that a typo for BRC? I would have expected
> an error message if the label for a BRC was out of bounds. Did you report
> it?
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> ________________________________________
> From: IBM Mainframe Assembler List [[email protected]] on
> behalf of Mark Hammack [[email protected]]
> Sent: Friday, March 4, 2022 3:16 PM
> To: [email protected]
> Subject: Re: Jump vs. Branch
>
> Agreed wholeheartedly.  However, I ran into a situation recently that MIGHT
> have been caught using branch rather than jump.
>
> It involved copy/paste from one subroutine to another and not changing the
> JUMP address.  In this case, if a BC had been used, the program would have
> received a compile error but with the BCR, it compiled clean and caused a
> S0Cx abend later in production. No guarantees obviously, the target could
> have still been within the 4k base/displacement but using relative branches
> increases the likelihood of a wild branch.
>
> The only things I could come up with involved macros and/or naming
> conventions...and discipline.  At least it wasn't my code, I just had to
> debug it :-).
>
>
>
>
> *Mark*
>
>
> On Fri, Mar 4, 2022 at 1:43 PM Charles Mills <[email protected]> wrote:
>
> > Amen, brother!
> >
> > I cannot think of a single negative to the relative jumps (other than the
> > small handful of very specific situations where indexing or similar may
> be
> > necessary). The HUGE gain is the savings in base register requirements,
> the
> > total elimination of base-displacement constraints for executable code.
> The
> > elimination of that "oh crap" moment when you make one quick change to a
> > module and find you have now pushed something past the 4K limit, and your
> > quick change turns into a re-engineering project.
> >
> > Charles
> >
> >
> > -----Original Message-----
> > From: IBM Mainframe Assembler List [mailto:
> [email protected]
> > ]
> > On Behalf Of Seymour J Metz
> > Sent: Friday, March 4, 2022 11:36 AM
> > To: [email protected]
> > Subject: Re: Jump vs. Branch
> >
> > My perspective is that there is no way that a branch relative will be
> > slower, and saving a register help me to streamline my code, so there is
> no
> > down side to automatically using branch relative. If I have to support
> > antique boxen I'll dual path inside a macro.
> >
> > But, yes, pipeline preloading should be easier.
> >
> > --
> > Shmuel (Seymour J.) Metz
> >
> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmason.gmu.edu%2F~smetz3&amp;data=04%7C01%7Csmetz3%40gmu.edu%7C841ca915ce764c8b0bc808d9fe1bf3a8%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637820218299831533%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=TyQEEnPeoY1S%2Femfh5G8e7uoS0ZiEW2Mkm8W%2BzAr4cU%3D&amp;reserved=0
> >
> > ________________________________________
> > From: IBM Mainframe Assembler List [[email protected]] on
> > behalf of Charles Mills [[email protected]]
> > Sent: Friday, March 4, 2022 2:27 PM
> > To: [email protected]
> > Subject: Re: Jump vs. Branch
> >
> > In theory the branch relative is easier on the pipeline. An old
> > base-displacement branch is dependent on the value of some register,
> which
> > in theory may be subject to the machinations of the fixed point
> arithmetic
> > unit. A relative jump is only dependent on the instruction counter and
> the
> > contents of the instruction itself.
> >
> > Charles
> >
> >
> > -----Original Message-----
> > From: IBM Mainframe Assembler List [mailto:
> [email protected]
> > ]
> > On Behalf Of Seymour J Metz
> > Sent: Friday, March 4, 2022 10:40 AM
> > To: [email protected]
> > Subject: Re: Jump vs. Branch
> >
> > I don't know why he uses the term indirect; if anything, they're more
> > direct
> > then the old branches. I wouldn't expect them to be more efficient, but
> if
> > you use them for all branches then you can save a register, which can
> avoid
> > otherwise extraneous saves and restores. Unless I have to run on a really
> > old box, I'd use the jump instructions all the time.
> >
>

Reply via email to