Good grief. I really wonder why the BX* instructions don't use logical compares, like I assumed they did. In any case, that quote is almost nonsense, as address wrap-around has been a feature since the dawn of time. 2^31-1 + 1 = 0, for addressing purposes. And yet the BX* instructions treat addresses as 32-bit signed numbers for comparison. I suppose it may have been a compromise on how much silicon could be reused.
In any case, there's a little-known "mini-bar" at the high-end of the 31-bit address space in OS/390 ff. Maybe you can do actual wrap-around in a data space. Sounds like maybe you shouldn't :-) Notwithstanding all the expert opinions, from my point of view, XA would have better gone to 32-bit addressing from the get-go. I don't see the benefit of the amode being part of the address. Seems to me it's been a lot of unnecessary complication, and we might have had twice the address space until the advent of z/Arch. I know very little about Intel architecture, but when 32-bit processors came out, they had 32-bit addressing (at least logically). This is, of course, rather moot now. Disclaimer: it's the end of the work week for most Americans. Obviously, this discussion has little practical value. sas On Wed, Nov 27, 2019 at 11:41 AM Tom Marchant < [email protected]> wrote: > ... > > I agree with Peter about the desirability of including AMODE information > along with an address. BXH. The authors of the z/Architecture > POO have not given this quite as careful consideration with > this note: > > <quote> > Care must be taken in the 31-bit addressing > mode when a data area in storage is at the rightmost > end of a 31-bit address space and a > BRANCH ON INDEX HIGH (BXH) or BRANCH > ON INDEX LOW OR EQUAL (BXLE) instruction > is used to step upward through the data. Since > the addition and comparison operations performed > during the execution of these instructions > treat the operands as 32-bit signed binary integers, > the value following 2^31 - 1 is not 2^31, which > cannot be represented in that format, but -2^31. >
