[kaffe] PowerPC JIT3 and inlined asm

Michael Franz mvfranz at gmail.com
Thu Feb 3 20:27:51 PST 2005


I am trying to figure out why darwin 6 is not able to compile the
methodcalls.c in the jit3 directory.   The following code is similar
to what is in methodcalls.c and will do for my example.

This code gives the error that a ';' is missing after reg1 and reg2. 
However the same code compiles fine under Darwin 7.  The difference
that I can tell is that Darwin 6 uses gcc 3.1 and Darwin 7 uses gcc
3.3.


        register int reg1 asm("13");
        register int reg2 asm("14");
        
        void func1() { reg1= 42; }
        
        void func2() { reg2= 666; }
        
        main()
        {
          func1();
          func2();
        }

Does anyone have any idea why this is different between gcc 3.1 and
3.3?  Can I get this to compile on gcc 3.1?  Will this work on gcc
2.9.5?

Michael




More information about the kaffe mailing list