diff options
Diffstat (limited to 'Opcode/Ice/IceMemoryMacros.h')
-rw-r--r-- | Opcode/Ice/IceMemoryMacros.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/Opcode/Ice/IceMemoryMacros.h b/Opcode/Ice/IceMemoryMacros.h index 490ecd1..346345b 100644 --- a/Opcode/Ice/IceMemoryMacros.h +++ b/Opcode/Ice/IceMemoryMacros.h @@ -47,23 +47,7 @@ //! \warning writes nb*4 bytes !
inline_ void StoreDwords(udword* dest, udword nb, udword value)
{
- // The asm code below **SHOULD** be equivalent to one of those C versions
- // or the other if your compiled is good: (checked on VC++ 6.0)
- //
- // 1) while(nb--) *dest++ = value;
- //
- // 2) for(udword i=0;i<nb;i++) dest[i] = value;
- //
- _asm push eax
- _asm push ecx
- _asm push edi
- _asm mov edi, dest
- _asm mov ecx, nb
- _asm mov eax, value
- _asm rep stosd
- _asm pop edi
- _asm pop ecx
- _asm pop eax
+ while (nb--) *dest++ = value;
}
//! Copies a buffer.
@@ -94,7 +78,7 @@ #define SAFE_DESTRUCT(x) if (x) { (x)->SelfDestruct(); (x) = null; } //!< Safe ICE-style release
#ifdef __ICEERROR_H__
- #define CHECKALLOC(x) if(!x) return SetIceError("Out of memory.", EC_OUT_OF_MEMORY); //!< Standard alloc checking. HANDLE WITH CARE.
+ #define CHECKALLOC(x) if(!x) return SetIceError;; // ("Out of memory.", EC_OUT_OF_MEMORY); //!< Standard alloc checking. HANDLE WITH CARE.
#else
#define CHECKALLOC(x) if(!x) return false;
#endif
|