From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14437 invoked by alias); 5 Jun 2009 15:39:51 -0000 Received: (qmail 14425 invoked by uid 22791); 5 Jun 2009 15:39:49 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from rv-out-0708.google.com (HELO rv-out-0708.google.com) (209.85.198.241) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Jun 2009 15:39:43 +0000 Received: by rv-out-0708.google.com with SMTP id l33so183983rvb.56 for ; Fri, 05 Jun 2009 08:39:41 -0700 (PDT) Received: by 10.141.146.4 with SMTP id y4mr3157821rvn.9.1244216381026; Fri, 05 Jun 2009 08:39:41 -0700 (PDT) Received: from Paullaptop (124-168-137-88.dyn.iinet.net.au [124.168.137.88]) by mx.google.com with ESMTPS id g14sm252639rvb.32.2009.06.05.08.39.38 (version=SSLv3 cipher=RC4-MD5); Fri, 05 Jun 2009 08:39:40 -0700 (PDT) Message-ID: <69CCB0B6B70141F0BCD2BAFA6DDF314F@Paullaptop> From: "Paul Edwards" To: "Ulrich Weigand" Cc: References: <200906051520.n55FKg7T016481@d12av02.megacenter.de.ibm.com> In-Reply-To: <200906051520.n55FKg7T016481@d12av02.megacenter.de.ibm.com> Subject: Re: i370 port Date: Fri, 05 Jun 2009 15:39:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00104.txt.bz2 Wow, what a lot of responses. Last time I tried making contact, I didn't get a single response! >> In addition, that code has been ported to GCC 3.4.6, which is now >> working as a cross-compiler at least. It's still some months away >> from working natively though. It takes a lot of effort to convert >> the Posix-expecting GCC compiler into C90 compliance. This has >> been done though, in a way that has minimal code changes to the >> GCC mainline. > > You're referring to building GCC for a non-Posix *host*, right? Yep. > I assume those changes are not (primarily) in the back-end, but > throughout GCC common code? Yes. Or rather, they would be, if it weren't for sleight-of-hand to minimize that. I dummied up all the Posix calls to point back to C90 functions. Please take a look at the actual changes to GCC. There's not a lot: Here's the exact file: https://sourceforge.net/project/downloading.php?group_id=195127&filename=gccmvs-3_2_3-7_0.zip&a=50206324 Most of the size is generated code from the md, or other new files, and not changes to GCC proper. However, in fact, GCC is turned on its head. It's a single executable. C90 doesn't guarantee, and the host doesn't support, the ability to do a fork() and exec(). >> Yes, I'm aware that there is an S/390 port, but it isn't EBCDIC, isn't >> HLASM, isn't 370, isn't C90, isn't MVS. It may well be possible to >> change all those things, and I suspect that in a few years from now >> I may be sending another message asking what I need to do to get >> all my changes to the s390 target into the s390 target. At that time, >> I suspect there will be a lot of objection to "polluting" the s390 target >> with all those "unnecessary" things. > > Actually, I would really like to see the s390 target optionally support > the MVS ABI and HLASM assembler format, so I wouldn't have any objection > to patches that add these features ... Great. > I understand current GCC supports various source and target character > sets a lot better out of the box, so it may be EBCDIC isn't even an > issue any more. It looks that way from what I've seen of 3.4.6 so far. However, I won't know for sure until it's on the host and self-generating. > If there are other problems related to MVS host > support, I suppose those would need to be fixed in common code anyway, > no matter whether the s390 or i370 back-ends are used. Well, I would like to see that - I don't know why there are all those calls to open() instead of fopen() etc in the first place, but I don't see that happening. > The only point in your list I'm sceptical about is 370 architecture > support -- I don't quite see why this is still useful today (the s390 > port does require at a minimum a S/390 G2 with the branch relative > instructions ... but those have been around for nearly 15 years). The last free MVS was MVS 3.8j which runs on the S/370 architecture. If you want to write MVS software, for free, your only option is to pick that up. It doesn't run on S/390 hardware. However. :-) That's where MVS/380 comes in. http://mvs380.sourceforge.net So yes, we can sort of cope with S/390 instructions. It's just not as widely supported as the proper S/370 (emulated) machine. Or rather, I think we can. It's into unchartered territory what restrictions S/380 actually has in its current form. It's known that it's enough to run 31-bit GCC using 20 MB of memory though. Which again, is a damn good start. BFN. Paul.