Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Inline Assembly and class members
Working on a Mutex class. I have the following code which compiles successfully in Visual Studio 2005 __asm mov ebx, [this]; __asm mov eax, ebx; __asm add eax, [m_intLocked]; __asm LockTest: __asm bts dword ptr [eax], 0; __asm jc LockTest; __asm mov eax, intProcessID; __asm mov eax, [eax] __asm mov [ebx][m_intProcessID], eax; The class that the this pointer refers too has 2 unsigned int member variables, m_intLocked & m_intProcessID. I tried just changing the Microsoft specific __asm keyword to the asm used by Digital Mars. When I try to compile I get the following errors: } ^ ./Threads/Multi/Mutex/Policies/PMutex_x86.h(103) : Error: undefined label 'm_intLocked' --- errorlevel 1 If I comment out that line it then falls to error on the m_intProcessID line. I also tried add eax, m_intLocked[ebx]; but got the same thing. What is the proper way to access these class member variables in Digital Mars? And more specifically how to read their memory addresses? Feb 08 2006
Rob Yull wrote:What is the proper way to access these class member variables in Digital Mars? And more specifically how to read their memory addresses? Feb 08 2006
Bertel Brander wrote:Rob Yull wrote:What is the proper way to access these class member variables in Digital Mars? And more specifically how to read their memory addresses? Feb 08 2006
Bertel Brander wrote:Bertel Brander wrote:Rob Yull wrote:What is the proper way to access these class member variables in Digital Mars? And more specifically how to read their memory addresses? Feb 09 2006
|