Peter,
You are right ..  BAKR is neither new nor 64 bit.

It seems I need the  BSM because the C code does a BALR to my assembler
routine.
Someone told me

*BALR 14,15 in amode 64 just saves the updated PSW and doesn’t set any
addressing bits, so it is suitable for a straight BR 14 as the return
instruction. BAKR gets the amode bits to save in the stack entry from bit
32 and bit 63 of the input register, and the R14 loaded by BALR has both
off, so the stack entry is built for amode 24 return.*

Which is why I need the BSM.

I would be happy to do it differently, but I cant change the generated C
code.

regards

Colin


On Wed, 29 Jun 2022 at 12:38, Peter Relson <[email protected]> wrote:

> Not that BAKR is a "new 64 bit instruction" (neither "new" nor "64 bit"),
> but POp does tell you what you need to do to use the instruction by
> describing exactly how the instruction behaves. How you do what you need to
> do is your choice.
>
> You made an unfounded assumption related to how PR works.
>
> You don't "have" to do a BSM prior to the BAKR. And, in fact, in some
> cases it would be wrong to do so (the typical example is if your interface
> is invoked via BASSM). If you want the PR paired with a BAKR to return in
> AMODE 31 then the address saved must indicate AMODE 31.  How you accomplish
> that is up to you.
>
> Peter Relson
> z/OS Core Technology Design
>

Reply via email to