Message-ID: <38F5A8EF.52A4C864@maths.unine.ch> Date: Thu, 13 Apr 2000 13:01:04 +0200 From: Gautier Organization: Maths - Uni =?iso-8859-1?Q?Neuch=E2tel?= X-Mailer: Mozilla 4.72 (Macintosh; I; PPC) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: inefficiency of GCC output code & -O problem References: <38F20E7A DOT 3330E9A4 AT mtu-net DOT ru> <38F2250B DOT 1DC270D5 AT maths DOT unine DOT ch> <38F22D66 DOT 42D78282 AT mtu-net DOT ru> <38F2EBD4 DOT 68D0C6DE AT maths DOT unine DOT ch> <38F3849F DOT D8E341B4 AT mtu-net DOT ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: mac13-32.unine.ch X-Trace: 13 Apr 2000 13:01:03 +0100, mac13-32.unine.ch Lines: 36 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Alexei A. Frounze": > > Well... but _compared_ to other processors the choice of registers is very poor. > The most awful problem is insufficiency of RAM and stack. Intel C51 > microcontroller has 8 (one-byte) registers. That's enough. But it has only 128 > bytes of RAM... :) I see... I meant usage of registers by the optimiser, and there are never too many - an excerpt of a project compiled by DEC Ada for an AXP server: ... STILBurg Machine Code Listing 01 SOLVE_LR 430709B0 18A0 CMPLT R24, R7, R16 47F80408 18A4 MOV R24, R8 F6000071 18A8 BNE R16, L$24 43070528 18AC SUBQ R24, R7, R8 41010648 18B0 S8ADDQ R8, Y, R8 ; R8, R1, R8 40403002 18B4 ADDL I, 1, I ; R2, 1, R2 63FF0000 18B8 TRAPB 85400000 18BC LDG F10, (R0) 85680000 18C0 LDG F11, (R8) 404709B0 18C4 CMPLT I, R7, R16 ; R2, R7, R16 ... _that_'s a good set of registers! > Pascal is enough for me. I'll probably program in Delphi (visual version of > object pascal for Win32) for the 1st time. Then I'll try C++ for the same tasks. Beware of developing too much code in a proprietary language like Delphi. Prefer standards like C++ or Ada: you can use/test different compilers, re-use code for other bindings/OSes/platforms. (MHO) ______________________________________________________ Gautier -- http://members.xoom.com/gdemont/gsoft.htm