../../src/juce_core/basics/juce_Atomic.h: In function 'int juce::atomicDecrementAndReturn(int&)':
../../src/juce_core/basics/juce_Atomic.h:111: error: can't find a register in class 'AREG' while reloading 'asm'
../../src/juce_core/text/../basics/juce_Atomic.h: In function 'int juce::atomicDecrementAndReturn(int&)':
../../src/juce_core/text/../basics/juce_Atomic.h:111: error: can't find a register in class 'AREG' while reloading 'asm'
patrickkidd wrote:Looks like the patch first posted in this thread works ok - the one you just linked doesn'
t even compile!
- Code: Select all
../../src/juce_core/basics/juce_Atomic.h: In function 'int juce::atomicDecrementAndReturn(int&)':
../../src/juce_core/basics/juce_Atomic.h:111: error: can't find a register in class 'AREG' while reloading 'asm'
../../src/juce_core/text/../basics/juce_Atomic.h: In function 'int juce::atomicDecrementAndReturn(int&)':
../../src/juce_core/text/../basics/juce_Atomic.h:111: error: can't find a register in class 'AREG' while reloading 'asm'
So if I am getting as far as my soundcard problem I assume the atomic stuff is working with the first patch. I think I will look further into it and create a new thread about it.
tulkas ~ # gcc -v
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/gcc-4.1.1-r1/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --enable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1-r1)
tulkas ~ # uname -a
Linux tulkas 2.6.17-gentoo-r7 #3 SMP PREEMPT Thu Nov 16 13:12:06 AKST 2006 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD GNU/Linux
#elif JUCE_GCC
//==============================================================================
#if JUCE_WIN64
forcedinline void atomicIncrement (int& variable) throw() { __sync_add_and_fetch (&variable, 1); }
forcedinline int atomicIncrementAndReturn (int& variable) throw() { return __sync_add_and_fetch (&variable, 1); }
forcedinline void atomicDecrement (int& variable) throw() { __sync_add_and_fetch (&variable, -1); }
forcedinline int atomicDecrementAndReturn (int& variable) throw() { return __sync_add_and_fetch (&variable, -1); }
#else
//==============================================================================
/** Increments an integer in a thread-safe way. */
forcedinline void atomicIncrement (int& variable) throw()
{
__asm__ __volatile__ (
"lock incl %0"
: "=m" (variable)
: "m" (variable));
}
/** Increments an integer in a thread-safe way and returns the incremented value. */
forcedinline int atomicIncrementAndReturn (int& variable) throw()
{
int result;
__asm__ __volatile__ (
"lock xaddl %%eax, (%%ecx) \n\
incl %%eax"
: "=a" (result)
: "c" (&variable), "a" (1)
: "memory");
return result;
}
/** Decrememts an integer in a thread-safe way. */
forcedinline void atomicDecrement (int& variable) throw()
{
__asm__ __volatile__ (
"lock decl %0"
: "=m" (variable)
: "m" (variable));
}
/** Decrememts an integer in a thread-safe way and returns the incremented value. */
forcedinline int atomicDecrementAndReturn (int& variable) throw()
{
int result;
__asm__ __volatile__ (
"lock xaddl %%eax, (%%ecx) \n\
decl %%eax"
: "=a" (result)
: "c" (&variable), "a" (-1)
: "memory");
return result;
}
#endifdavephillips wrote:Greetings:
I'm trying to compile JUCE 1.41 on AMD64, Debian Etch with GCC 4.1.2. I receive this error:
juce_linux_SystemStats.cpp
/tmp/cc097byJ.s: Assembler messages:
/tmp/cc097byJ.s:34: Error: suffix or operands invalid for `push'
/tmp/cc097byJ.s:34: Error: suffix or operands invalid for `pop'
make[1]: *** [../../bin/intermediate_linux/Debug/juce_linux_SystemStats.o] Error 1
make: *** [JUCE] Error 2
I'm a little confused about the state of JUCE + x86_64, hopefully someone can steer me in the right direction. I'd like to compile Kjetil's latest version of Mammut, I need libjuce to do it.
kjetil wrote: As far as I see, the only defined push and pop are functions(?) available via pragmas when using microsofts compiler.
Are there any other warnings or errors before theses errors?
Also, do you have an earlier version of of gcc to try? (gcc32 for example)
Users browsing this forum: No registered users and 1 guest