modula3 / cm3

Critical Mass Modula-3
http://modula3.github.io/cm3/
Other
137 stars 25 forks source link

port integrated backend #28

Open jaykrell opened 6 years ago

jaykrell commented 6 years ago

port integrated backend to other object file formats and ABIs to other architectures, start with amd64, then arm64

abdourahimjallow commented 6 years ago

Leave

dragisha commented 6 years ago

So, we are currently supporting only 32bit Intel/AMD?

mikanystrom commented 6 years ago

the gcc-based back end supports AMD64_LINUX ... it's all I have used for years!

On Tue, Jul 31, 2018 at 10:58 AM, Dragiša Durić notifications@github.com wrote:

So, we are currently supporting only 32bit Intel/AMD?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/modula3/cm3/issues/28#issuecomment-409312150, or mute the thread https://github.com/notifications/unsubscribe-auth/AFWGpccbJLNlJbbyHFge5H7GmuVjD1OJks5uMJq8gaJpZM4T8Y4m .

jaykrell commented 6 years ago

The integrated backend is NT/x86 only.

The gcc backend is all the other many targets.

The C backend has worked for very many targets as well, including additional ones like NT/amd64 and Linux/arm, for which I'm not sure our gcc one works.


From: Mika Nyström notifications@github.com Sent: Wednesday, August 1, 2018 8:10 AM To: modula3/cm3 Cc: Jay Krell; Author Subject: Re: [modula3/cm3] port integrated backend (#28)

the gcc-based back end supports AMD64_LINUX ... it's all I have used for years!

On Tue, Jul 31, 2018 at 10:58 AM, Dragiša Durić notifications@github.com wrote:

So, we are currently supporting only 32bit Intel/AMD?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/modula3/cm3/issues/28#issuecomment-409312150, or mute the thread https://github.com/notifications/unsubscribe-auth/AFWGpccbJLNlJbbyHFge5H7GmuVjD1OJks5uMJq8gaJpZM4T8Y4m .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/modula3/cm3/issues/28#issuecomment-409489120, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABj1kNyXDEiCWZivGuqQkzRsONBcCbX0ks5uMWJngaJpZM4T8Y4m.

dragisha commented 6 years ago

Yes I know, me too.

My question was about integrated backend.

On Wed, 2018-08-01 at 01:10 -0700, Mika Nyström wrote:

the gcc-based back end supports AMD64_LINUX ... it's all I have used for years!

On Tue, Jul 31, 2018 at 10:58 AM, Dragiša Durić <notifications@github .com> wrote:

So, we are currently supporting only 32bit Intel/AMD?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/modula3/cm3/issues/28#issuecomment-409312150, or mute the thread https://github.com/notifications/unsubscribe-auth/AFWGpccbJLNlJbby HFge5H7GmuVjD1OJks5uMJq8gaJpZM4T8Y4m .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

dragisha commented 6 years ago

So, we are currently supporting only 32bit Intel/AMD?

dragisha commented 6 years ago

I am using cm3 on Raspberry Pi, so Linux/ARM (LINUX_ARM) probably works with gcc backend. Problem was first build, can't remember now who but someone from list provided it. Later, upgrades are going on like they do on AMD64_LINUX.

jaykrell commented 6 years ago

First build is always cross. I thought C backend but I don’t remember.

jaykrell commented 5 years ago

To clarify terminology:

The "integrated" backend is written in Modula-3, and "integrated", i.e. statically linked, directly with the builder ("m3build") and frontend ("m3front"), middle end ("m3middle") etc, all in cm3.exe.

This backend writes out object files (.o, .obj) files directly, not assembly source, or executables or any IR.

It supports only NT/x86.

The gcc backend, the part that writes out CM3 IR, is linked to cm3, and then a separate NOT integrated part, cm3cg, converts to the gcc IR, and then to assembly source. It supports a huge number of targets, like everything. It should be easy to make work with anything gcc supports.

There is also a C backend and LLVM backend.