> Date:    Sun, 9 Dec 2018 12:15:25 -0700
> From:    Bob Raicer <r...@raicer.com>
> Subject: Re: Getting the Last Condition Code
> 
> ...was required to be reworked.
> 
> I'm also not a big fan of the "vectored returns" (e.g., B 0(,R14)
> for one condition, B 4(,R14) for another, etc.).  Among other
> things, this introduces an undesirable dependency upon the size of
> the instruction(s) following the linkage instruction in the caller's
> code.  Return Codes and Reason Codes (typically in R15 and R0,
> respectively) work quite nicely and are much more maintainable.
> 
I can sympathise with that; in my defence, I *was* thinking in terms of
only allowing branch/jump instructions in the *branch* vector, and
wouldn't countenance, say, a L instruction in place of one of them (or,
even less, an MVC!).

I agree that too many options in the branch vector is more error prone
and less easy to understand. But I'd still defend a single-option return
[BR R14 or B 0(,R14)] as a fast path to distinguish between failure and
success, with subsequent analysis of Return and Reason Codes in the
failure path. Mainly because it's simple to understand, and keeps the
mainline code in the calling routines simpler and more compact at the
cost (maybe) of slightly more complex failure path code.

> Of course, nothing is perfect and developers need to be very much
> aware of what they are doing and what kind of a mess (or hopefully,
> lack thereof) they are leaving for the next individual who has to
> work on the code.
> 

Still, keeps us old Moustache Petes in business. Sorry, gotta go now, to
tell some people to get off my lawn...

Reply via email to