Mail Archives: djgpp/2000/04/12/14:56:05
In article <38F49A45 DOT 13F0AB1 AT mtu-net DOT ru> you wrote:
> Here goes a part of my project. I simply removed as much code as
> needed to leave it along.
> Well, it still isn't compiled with the -O2 switch, although it's okay w/o it.
I somewhat doubt that. This code compiles with no -O switch I've
tried, on gcc-2.7.2. The error messages are always the same,
regardless what optimization level I use, including no optimization at
all (-O0). AFAICS, your code is plainly buggy. Here's the first
offending fragment of source code:
[...]
> __asm__ __volatile__ ("
> fstcw (%0)
> fldcw (%1)
> fldl (%2)
> "
> :
> : "g" (&SW), "g" (&LW), "g" (&X)
> );
And this is the assembly this converts into (fstcw is line 478 of
Tmapping.s), after treatment by gcc-2.7.2:
fstcw (-192(%ebp))
fldcw (%edx)
fldl (%ecx)
And the error messages from the assembler about it are:
Tmapping.s:478: Error: Missing ')' assumed
Tmapping.s:478: Error: Ignoring junk '(%ebp))' after expression
Obviously, the assembler doesn't consider (-192(%ebp)) to be a correct
address operand for fstcw. Changing the code to
fstcw %0
helps, but may not be the correct fix. The real assembly experts in the
will have to answer that.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -