Mail Archives: djgpp/2000/04/14/09:05:49
Alexei A. Frounze <alex DOT fru AT mtu-net DOT ru> 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.
- Raw text -