[M3devel] 64-bit big endian?

Jay K jay.krell at cornell.edu
Tue Aug 27 10:03:17 CEST 2013


There likely are no gcc-isms in the code.
The C code that is in there has been compiled with Visual C++ (partly), Digital cc, Sun cc, maybe others that I'm forgetting (bundled K&R HP-UX cc? a weirdo SGI cc I found.. VMS cc?). Sun cc definitely. Tru64 cc fairly recently.
 
 
It is just that someone needs to have already ported the gcc backend to the target.
We carry a form of the gcc backend with us. At least for now, and for a very long time (10+ years).
I have a C-generating backend, in very good shape, but nobody else uses it yet. It can compile the entire system and has a better debugging experience on systems with no m3gdb support (e.g. MacOSX).
 
 
 > Are you saying you have CM3 running on it?
 
 
I don't currently. I haven't powered on those machines in over a year now.
But I was working on it. The point is though, it is generally pretty easy.
 
 
OpenBSD is a slight challenge because mainline gcc no longer supports it.
But they have ports. You get to merge a little the ports to our fork of mainline.
But most of the diffs are not in the backend anyway. Mostly OpenBSD/mips is the same Linux/mips, etc. They generally all share calling conventions and assembler syntax, and that is mostly all the backend cares about.
 
 
Occasionally a small problem is found.
For example we over-use bitfields and that showed up as a problem on MIPS.
I was also working on Irix.
 
 
The system is very portable and has been shown to run with little additional effort on a number of systems.
 
 
It used to be the biggest part of a port was rewriting /usr/include in Modula-3.
It was tedious and error prone. But I fixed that. We now have our own C to bridge that safely once and done.
 
 
 - Jay
 
> Date: Tue, 27 Aug 2013 07:51:46 +0000
> From: microcode at zoho.com
> To: m3devel at elegosoft.com
> Subject: Re: [M3devel] 64-bit big endian?
> 
> On Tue, Aug 27, 2013 at 07:35:28AM +0000, Jay K wrote:
> >  > There are a little-endian MIPS64 boxes also,
> > 
> > OpenBSD/loongson? I was running on that.
> 
> Yes, that's what I was thinking of. Are you saying you have CM3 running on
> it?
> 
> > We are extremely portable. Endianness is of almost no concern. Processor
> > is of almost no concern. 
> > We use the gcc backend and pthreads for portability. Or Windows.
> >  The gcc requirement will be relaxed to any C or C++ compiler.
> 
> That will really be great. A lot of times I want to run something and it has
> gcc-isms and doesn't build with other compilers.
> 
> > The system was implemented to be about that portable and I believe I
> > fairly well proved it succeeded. I got it to run on several similar
> > systems that it hadn't run on or hadn't recently run on, and I got close
> > on still others. Give just a bit of time and hardware, I'm
> > IA64/HPUX/Irix/VMS/AIX/Tru64 whatever you can muster, we'll work with
> > it. But most of these systems people don't use anyway. 
> 
> I have friends with a lot more hardware than me and they seem to just accept
> the fact they can only run software X on boxes a and b and not c, d or e. I
> don't like to get stuck not being able to run something on the few different
> boxes I have so I tend not to look too hard at stuff that won't run
> everywhere. I've been so busy with other projects that I haven't had time to
> look at Modula-3 (not just CM3) but it's definitely on my list since I do
> appreciate good language design. I was impressed on all the platform support
> I saw on the homepage and I've been lurking on the mailing list to see what
> you guys are up to.
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20130827/c9b67046/attachment-0002.html>


More information about the M3devel mailing list