Mail Archives: djgpp/2000/04/10/17:29:16
"Alexei A. Frounze" wrote:
> Hi!
>
> 1st question...
>
> Why GCC output too much redundant code?
> I mean, it always put values to the CPU registers, although it's possible to
> make the same operation w/o taking registers?
Are you using -O? Are these variables global?
> Also why GCC does type cast of byte/word <-> dword values so awful? It allocates
> some extra bytes on the stack, put values there and get them back...
You are not optimizing, that's why.
> Is it a normal thing, if one instruction that adds something to ESP(or EBP) is
> followed by sutracting instruction that works with the same register?
?
> ... I'll find some extra info later ...
>
> 2nd question...
>
> Why the "-O2" switch works normally for pure C source code and makes compiler
> failing on the source with inline assembly (in the .S file made out of such .C
> an error encounters:
> "Error: Error: Missing ')' assumed"
> "Error: Error: Ignoring junk `(%ebp))' after expression")?
> W/o the -O2 switch it's compiled fine. Isn't it a little bit strange?
Can you show a small example? I guess that's an error in your inline assembler
code, but I can't know without the actual code.
SET
--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
set AT ieee DOT org set-soft AT bigfoot DOT com
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013
- Raw text -