Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari demoscene BBS
 
Re: Compiler cross-platform
Posted by: dml May,09.2015-16:33 

Some notes on GCC/68k...

It can produce decent 030 code if you are careful to keep an eye on 16/32bit signed/unsigned types and conversion between them. But you'll always be able to beat it for important stuff with some hand-coding. The optimizer is reasonably good for other code since it benefits from work done in more recent years (some types of improvements continue to benefit 68k even if the 68k backend isn't changed). It doesn't unroll code very well though - it struggles to estimate for the cache (if it even knows there is a cache!).

I don't think any of the other TOS compilers can beat its codegen - on average - but there may be exceptional cases, e.g. for peephole tricks or 16bit optimizations.

By default it assumes fast local 32bit ram so it doesn't optimize args into words for Atari... it passes args as 32bit stack pushes, always. Pass struct pointers instead and/or make use of the static/inline specifiers where possible, which will often remove args completely.

It supports inline assembly properly on 68k platform which can be useful for quick hackup optimizations, but better use VASM in GNU output mode for serious efforts and link against the resulting .o files as if they were C.

As Saulot says - the gcc libraries are quite fat, but can be replaced with simplified stubs if required.


I also find it pretty reliable. It's been a long time since I noticed any notable codegen bugs on 68k, and have pushed plenty of code through it...








[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Compiler cross-platform misterG May,08.2015-15:52
  Re: Compiler cross-platform wietze May,08.2015-18:14
    Re: Compiler cross-platform evil May,08.2015-20:09
      Re: Compiler cross-platform Splash/S1 May,09.2015-09:39
        Re: Compiler cross-platform saulot May,09.2015-10:29
          Re: Compiler cross-platform PeyloW May,11.2015-14:49
        Re: Compiler cross-platform dml May,09.2015-16:33
    Re: Compiler cross-platform MisterG May,24.2015-23:30
      Re: Compiler cross-platform wietze May,25.2015-12:00
        Re: Compiler cross-platform Cyprian May,25.2015-12:06
          Re: Compiler cross-platform mikro May,26.2015-08:09
            Re: Compiler cross-platform MisterG May,29.2015-22:38
              Re: Compiler cross-platform RA/pdx May,30.2015-13:22
  Re: Compiler cross-platform PeyloW May,11.2015-14:47
    Re: Compiler cross-platform Defjam May,12.2015-05:47


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson