Mail Archives: djgpp/1998/07/07/18:15:42
Hello !
Very difficult question. I have had problems with the
function-parameter-stack, when i'm calling asm and try several
optimation-levels. Solution: C-Function-Header and inline asm-code works
fine in all cases.
Higher optimation brings more aggressive removeable of "useless" code.
Declaration of some vars as volatile can help to keep your necessary
code unremoved.
Problems like this can only be analysed by using rhgdb or another
asm-debugging-tool, but they all need the -g comp-flag, which changes
the code too.
Difficult, indeed.
Oh, which gcc-version do you use? I haven't seen -Ox with values
greater than 6..
regards,
Gero
Archee/CoNTRACT schrieb:
> hi !
>
> I use many ASM in my demos.
> When I switch on -O9 it produces a crashing exe.
> I gave only -O2, than it worked.
> What can by wrong ?
>
> How can I reach the best optimizing without any danger ?
>
> How can I use gcc with optimizing without bugz ?
> What registers can I modify in an ASM code ?
--
___________________________________________________________________
Dipl.Phys.Gero Timann
Schülerstieg 20
37081 Göttingen
Germany
Tel./Fax: Germany-0551-96782
EMail: geti AT mcis DOT de geti AT spock DOT physik3 DOT gwdg DOT de geti AT online DOT de
____________________________________________________________________
- Raw text -