Mail Archives: djgpp/2000/04/17/08:15:13

From: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
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: <>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000413112851 DOT 28180G-100000 AT is> <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>
Mime-Version: 1.0
X-Trace: 955970623 17170 (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.

Alexei A. Frounze

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019