68000 support has landed in LLVM

News,announcements,programming,fixes,game patches & discussions.

Moderator: troed

Post Reply
User avatar
sandord
Posts: 673
Joined: Mon Aug 13, 2018 10:08 pm
Location: The Netherlands
Contact:

68000 support has landed in LLVM

Post by sandord »

Apparently, 68000 support has landed in LLVM. I'm not too informed about this but I guess this means we can finally expect modern C/C++ compiler based cross compilation in the near future for our beloved STs.

Here's a link to the new 68K part in the LLVM source: https://github.com/llvm/llvm-project/tr ... arget/M68k
czietz
Posts: 548
Joined: Sun Jan 14, 2018 1:02 pm

Re: 68000 support has landed in LLVM

Post by czietz »

It's quite an impressive achievement by Min, yes. He talked about it a few months ago in an Planet m68k evening chat: http://m68k.info/#orgf36bc79

But it's still a very long way before LLVM (or rather Clang) becomes usable on the Atari. For example, there are no libraries (not even the standard C library), nor is it capable of generating TOS executables. In contrast, all of this exists for gcc, which already gives you modern C/C++ compiler based cross compilation today.
User avatar
stephen_usher
Posts: 5578
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: 68000 support has landed in LLVM

Post by stephen_usher »

Given the bloat most modern compilers produce I wouldn't be surprised if cross compiled binaries for "Hello World!" are larger than the ST's memory.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
czietz
Posts: 548
Joined: Sun Jan 14, 2018 1:02 pm

Re: 68000 support has landed in LLVM

Post by czietz »

stephen_usher wrote: Wed Mar 24, 2021 9:49 am Given the bloat most modern compilers produce I wouldn't be surprised if cross compiled binaries for "Hello World!" are larger than the ST's memory.
Hm, "Hello world" with gcc 9.3.1 and libcmini: 3.4 kBytes.
Attachments
hello.zip
(2.43 KiB) Downloaded 115 times
User avatar
thorsten.otto
Posts: 148
Joined: Mon Nov 04, 2019 2:20 am

Re: 68000 support has landed in LLVM

Post by thorsten.otto »

stephen_usher wrote: Wed Mar 24, 2021 9:49 am Given the bloat most modern compilers produce I wouldn't be surprised if cross compiled binaries for "Hello World!" are larger than the ST's memory.
That's mostly a matter of the library rather than the code produced by the compiler. Look at EmuTOS, which has lots of features in the 192k ROM from newer TOS versions, a builtin harddisk driver and several other things, compared to the original 192k ROMs that were compiled by an ancient compiler (and even large parts done in assembler).
User avatar
mfro
Posts: 122
Joined: Thu Dec 13, 2018 7:32 am

Re: 68000 support has landed in LLVM

Post by mfro »

czietz wrote: Wed Mar 24, 2021 10:04 am
stephen_usher wrote: Wed Mar 24, 2021 9:49 am Given the bloat most modern compilers produce I wouldn't be surprised if cross compiled binaries for "Hello World!" are larger than the ST's memory.
Hm, "Hello world" with gcc 9.3.1 and libcmini: 3.4 kBytes.
Thanks a lot for promoting libcmini! ;).

To be fair, however, I think it must be mentioned that it's not mintlib's fault to produce so much larger binaries than libcmini. It's more a question of what you want to achieve. Mintlib was designed from the beginning as a universal library to support as much standard functionality as possible. It has (nearly) full ISO standard conformance and also supports gcc and other extensions. As a result, you can throw most sourcecode at it that has been originally written for Unix/Linux and it will compile with minimum or even no change at all. There is one huge drawback: size.

Libcmini does not aim to compete in that area at all. Its aim is to produce the smallest possible size for binaries and it doesn't care much about standards compatibility. If you want, it more or less disregards any development of the C language standardisation after the 80s. But it allows to create really small C programs for our dinosaurs.

IMHO, both approaches have their own value (and its good to have a choice).
And remember: Beethoven wrote his first symphony in C.
Post Reply

Return to “SOFTWARE PROGRAMMING & DISCUSSION”