[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [GCC] volatile and -O2



Hello!

>         __asm__ volatile ("
>                 move.l %0, d1;    | &aespb
>                 move.w  #200,d0;
>                 trap    #2;
>                 "
>                 :
>                 : "a"(aespb)
>                 : "d0","d1"
>         );
> How can i tell GCC that the function _aes_trap() may touch aes_intout ?
> Is it a GCC 2.95.3 bug, or a pb in the C code above.

Your inline assembler is wrong :-) You need to add "memory" to tell gcc
that also the memory is modified:

                  : "d0", "d1", "memory"

You can also look on the mintlib bindings for trap examples.


Tschuess
   ...Frank

--
ATARI FALCON 040 // MILAN 060
-----------------------------------------
http://www.cs.uni-magdeburg.de/~fnaumann/
e-Mail: fnaumann@freemint.de