Advertisement
Wyrd

boost shared_ptr move semantics test ASM: static_pointer_cas

Feb 22nd, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r)
  2. ;   511: {
  3. ;   512:     return shared_ptr<T>(r, boost::detail::static_cast_tag());
  4. 010412E0  mov         edx,dword ptr [ecx]  
  5. 010412E2  mov         dword ptr [eax],edx  
  6. 010412E4  mov         ecx,dword ptr [ecx+4]  
  7. 010412E7  mov         dword ptr [eax+4],ecx  
  8. 010412EA  test        ecx,ecx  
  9. 010412EC  je          boost::static_pointer_cast<CBase,CDerived>+1Ah (10412FAh)  <------ NO JUMP
  10. 010412EE  add         ecx,4  
  11. 010412F1  mov         edx,1  
  12. 010412F6  lock xadd   dword ptr [ecx],edx  <-------- CALLED
  13. ;   513: }
  14. 010412FA  ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement