Hi Ulrich. Thanks a lot for your reply.
Could you give me an example of an instruction generated by –m31 that is not expected to work on an AM64 system? E.g. the 32-bit LR R2,R3 will definitely work on AM64. So what specifically won’t work? How many different things won’t work? Thanks. Paul. From: Ulrich Weigand Sent: Friday, September 3, 2021 12:34 AM To: Paul Edwards Cc: gcc@gcc.gnu.org ; Ulrich Weigand Subject: Re: s390 port Hi Paul, "Paul Edwards" <mutazi...@gmail.com> wrote on 02.09.2021 10:15:44: > We got the IPL process in place on ESA/390, and then > I decided that the next thing to do would be to switch > to z/Arch so that we could get rid of the AMODE 31 > architectural limit on 32-bit programs. > > It all worked fine, and we were able to use GCC 11 to > target S/390 and use the -m31 to generate 32-bit code, > run it under z/Arch as AM64, sort of making it the > equivalent of AM32. Really it is the equivalent of > AM-infinity, and there's the rub - GCC 11 is generating > negative indexes, which cause memory above 4 GiB > to be accessed (instead of wrapping at 2/4 GiB), which > of course fails. Can you elaborate what exactly your goals are? The point of the -m31 vs. -m64 option is exactly to match the AMODE 31 vs. AMODE 64 hardware distinction, so trying to run -m31 code in AMODE 64 is not supposed to work. Bye, Ulrich