From: "Alexei A. Frounze" Newsgroups: comp.os.msdos.djgpp Subject: Re: inefficiency of GCC output code & -O problem Date: Mon, 17 Apr 2000 15:22:40 +0400 Organization: MTU-Intel ISP Lines: 34 Message-ID: <38FAF400.1B7FE2E6@mtu-net.ru> References: <38F6137B DOT 47481761 AT mtu-net DOT ru> <8d76dk$dg5$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <38F74CD0 DOT 6987E15A AT mtu-net DOT ru> <8dep4b$g5f$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> NNTP-Posting-Host: ppp103-54.dialup.mtu-net.ru Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Trace: gavrilo.mtu.ru 955970623 17170 212.188.103.54 (17 Apr 2000 11:23:43 GMT) X-Complaints-To: usenet-abuse AT mtu DOT ru NNTP-Posting-Date: 17 Apr 2000 11:23:43 GMT X-Mailer: Mozilla 4.72 [en] (Win95; I) X-Accept-Language: en,ru To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 1st of all thanks ones more. Hans-Bernhard Broeker wrote: > > Borland Pascal and C are notorious for their buggy optimizers even > without adding inline assembly to the picture. Due to the fact that > they do not support any of the 'extended' part of GCC inline assembly, > they have to effectively switch off all optimization across any block > of inline assembly, or chaos breaks loose. Sometimes, I heard, it does > in spite of all those measures. Sure BP and older versions of BC++ has no good optimizers (BP mostly). > > Watcom seems to have inline assembly of comparable power as found in > GCC. There, you also get the opportunity to tell the compiler about > what that code did, to registers and memory content. At least that's > what it looked like in short samples I've seen, in this and other > newsgroups. I'm not sure if it also supports loading C variable > contents into registers, automatically, though. Watcom supports 2 general froms of assembly code in .C files. 1st form - inlined asm and 2nd form - powerful ASM macroses. These macroses are also optimized on the compilation stage. Also Watcom C/C++ has one very feature. It can generate code for register and stack based calling conventions. I.e. parameters may be passed either via stack or via registers. It also helps greatly. bye. Alexei A. Frounze ----------------------------------------- Homepage: http://alexfru.chat.ru Mirror: http://members.xoom.com/alexfru