Long ago and far away, we had code that had to be bimodal and do this. There was a clever hack that involved doing a BASR(I think) to get the mode and using that as part of a calculated branch or something to skip to the right instruction (BALR vs. IPM).
Of course not having touched a 370-mode machine in literally decades, that's all I remember... ...phsiii
