Error: too many memory references for `bts'
Posted: Thu Dec 25, 2014 3:04 pm
Hi, We compiling with no optimisations I get this error, when full optimistation is on there is no error message. Any ideas?
Here is inline code.
And the routine is
Code: Select all
DatabaseServer.cpp: Assembler messages:
1> DatabaseServer.cpp:730: Error: too many memory references for `bts'
Code: Select all
#define Lock_BTS_onfail( ptr, _bit, fail_label ) { \
volatile QWORD* __ptr = (volatile QWORD*)(ptr); \
asm goto( "lock btsq %0, %1 \t\n" \
"jnc %l[" #fail_label "] \t\n" \
: /* empty */ \
: "g" (_bit), "m" (*__ptr) \
: "memory", "cc" \
: fail_label ); \
}
Code: Select all
FIL static void Lock(volatile void* pData, BYTE Bit)
{
volatile QWORD* pQWORD = (volatile QWORD*)pData;
while (true)
{
Lock_BTS_onfail(pQWORD, Bit, fail);
return;
fail:
while ((*pQWORD) & ((QWORD)1 << Bit)) { }
}
}