Welcome, Guest. Please login or register.

Author Topic: C++ on Amiga  (Read 21988 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: C++ on Amiga
« on: September 17, 2009, 01:26:45 PM »
Quote from: matthey;521649
@NovaCoder

C optimizing is getting better but it's not there yet with GCC 68k. GCC will do a pretty good job on some things and then add a nop or exg d0,d0 in there. I've been debugging Warp3D lately to try and fix a bug and I keep seeing those darn exg d0,d0. The wasted instructions even make for difficult reading. I wan't to fix everyone of them. For all the poor code, GCC code amazingly rarely crashes. The newest versions of GCC are worse at optimizing than the older versions by the way. I wouldn't be surprised if VBCC and SASC generate better code.


SAS/C is probably the best C compiler you can find for 68k. I havent used GCC 68k but VBCC is known to have problems with register allocation and generates sometimes slower code. StormC 3 generates only crappy code but StormC 4 should be ok.

Anyway when coding it is better code everything in C than in assembler. It is maybe slower on 68k but you can write and optimize code at algorithm level much better and faster than you ever would if you were writing everything in asm. Assembler is good for optimizations when you can not tune C code any further.
My Amigas: A500, Mac Mini and PowerBook