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 > http://mason.gmu.edu/~smetz3 > > ________________________________________ > 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. >
