From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: inefficiency of GCC output code & -O problem Date: 14 Apr 2000 12:33:48 GMT Organization: Aachen University of Technology (RWTH) Lines: 25 Message-ID: <8d737c$bvq$1@nets3.rz.RWTH-Aachen.DE> References: <200004121649 DOT SAA12655 AT acp3bf DOT physik DOT rwth-aachen DOT de> <38F4C0D9 DOT C73A8E0A AT mtu-net DOT ru> <8d4rse DOT 3vvrn3d DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <38F60FE4 DOT 31BF32BB AT mtu-net DOT ru> <8d5mi0 DOT 3vvqipv DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <38F6A395 DOT 4040BFBE AT mtu-net DOT ru> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 955715628 12282 137.226.32.75 (14 Apr 2000 12:33:48 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 14 Apr 2000 12:33:48 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Alexei A. Frounze wrote: > Okay, but why error messages are about parentheses? >> Tmapping.s:478: Error: Missing ')' assumed >> Tmapping.s:478: Error: Ignoring junk '(%ebp))' after expression > This is the actiual problem I have. Explain me _this_ thing more detailed, > please. It's because your inline assembly chunks is _lying_ to gcc. You told gcc, by using the "g" constraint, that your code can live with an 'arbitrary type of place' for the input values. Arbitrary means it can either be in a register, or in memory. The actual assembly opcodes you write, however, assume that %0 and friends are *always* in a register, by putting () around %0. If gcc actually does choose to keep that value in memory, rather than moving it into a register for you, those () make gcc form an invalid opcode. This is why your assembly chunks break, with the optimization switched on, and can easily be seen from the gcc -S output I and others have shown, here. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.