[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Fri Feb 12 14:17:44 CET 2010


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	10/02/12 14:17:44

Modified files:
	cm3/m3-sys/m3back/src/: Codex86.i3 Codex86.m3 Stackx86.m3 

Log message:
	a little more atomic work
	hack around the wrong level of indirection
	we now have:
	
	_Main__Test_AtomicInteger_FetchAnd:
	000001BA: 55                 push        ebp
	000001BB: 8B EC              mov         ebp,esp
	000001BD: 81 EC 00 00 00 00  sub         esp,0
	000001C3: 53                 push        ebx
	000001C4: 56                 push        esi
	000001C5: 57                 push        edi
	000001C6: 8D 35 38 00 00 00  lea         esi,[_MM_Main+38h]
	000001CC: 8B 1D 98 00 00 00  mov         ebx,dword ptr [_MM_Main+98h]
	000001D2: F0 21 1E           lock and    dword ptr [esi],ebx
	000001D5: 89 35 9C 00 00 00  mov         dword ptr [_MM_Main+9Ch],esi
	000001DB: 5F                 pop         edi
	000001DC: 5E                 pop         esi
	000001DD: 5B                 pop         ebx
	000001DE: C9                 leave
	000001DF: C3                 ret
	_Main__Test_AtomicInteger_FetchDec:
	000001E0: 55                 push        ebp
	000001E1: 8B EC              mov         ebp,esp
	000001E3: 81 EC 00 00 00 00  sub         esp,0
	000001E9: 53                 push        ebx
	000001EA: 56                 push        esi
	000001EB: 57                 push        edi
	000001EC: 8D 35 38 00 00 00  lea         esi,[_MM_Main+38h]
	000001F2: F0 FF 0E           lock dec    dword ptr [esi]
	000001F5: 89 35 9C 00 00 00  mov         dword ptr [_MM_Main+9Ch],esi
	000001FB: 5F                 pop         edi
	000001FC: 5E                 pop         esi
	000001FD: 5B                 pop         ebx
	000001FE: C9                 leave
	000001FF: C3                 ret
	
	notice that:
	- the lea esi is not needed
	- the mov foo, esi is *wrong* and wrecks the result




More information about the M3commit mailing list