fortin@zap.UUCP (Denis Fortin) (04/11/88)
(I cross-posted to comp.lang.c since there are probably a number of people familiar with GCC there, but I am redirecting any follow-ups to comp.unix.microport since I guess a whole discussion on this might not be interesting to the comp.lang.c community at large :-) Recently there has been some talk in comp.unix.microport about getting GCC (the Gnu C Compiler) running under Microport's System V/AT on an iAPX286. Most of the comments were fairly negative (!) saying in essence that it couldn't really be done because of the '286 architecture. Well, I wonder about that. But first, let me explain why I'm interested in GCC: I like Microport's System V/AT. I've had it close to a year now and apart from a couple of (somewhat annoying!) bugs, it has served me pretty well. I've been able to run a lot of software off the net onto it (news, MicroEmacs, compress, sc, smail, etc) and since it *is* a System V, I generally don't have too many problems running stuff that is not Berkley-specific. However, there is a class of software that I've consistently had trouble with: the programs that like to make the (quite valid) assumption that machines these days use 32-bit pointers and allow the use of large arrays. Some sample programs in this class are pathalias, compress, Gnu Emacs, etc. Now, I realize that the basic architecture of the '286 is segmented and that the '286 prefers to deal with 16-bit ints rather than the 32-bit kind, but I can't see the big problem into emulating 32-bit ints (we already have "longs" don't we?) and a flat address space (requires a bit of arithmetic on the pointers, but still, that's possible). All that is required in order for software to believe that the '286 is a 32-bit machine is a C compiler that makes the hardware appear that way. Of course there would be a performance penalty to pay, but when the choices are to either run a large program somewhat slowly or not run it at all, I don't really think it matters all that much! Besides, those trusty little old Z-80s and 6502s in the 8-bit micros have been emulating 16-bit integers on 8-bit machines for years (:-). Now, I'm not 100% familiar with the iAPX286 architecture and with GCC, but I think it might be possible. Does anybody care to comment? (PS. If anybody knows of a high-quality C compiler that would work under Microport System V/AT and give me both the HUGE model and 32-bit ints, I might be willing to buy it, but I don't think that there exists one that would do exactly what I need!) -- Denis Fortin | fortin@zap.UUCP CAE Electronics Ltd | philabs!micomvax!zap!fortin The opinions expressed above are my own | fortin%zap.uucp@uunet.uu.net