diff options
author | Aki <please@ignore.pl> | 2021-10-03 16:51:12 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-10-03 16:51:12 +0200 |
commit | 104248aabf40b692231fccd1adf1a2a494f1589a (patch) | |
tree | 5eee42a18a9688b03b483aff5c2bedffb4fe8a6c /Opcode/Ice/IceMemoryMacros.h | |
parent | ddd76aa4e1571c8d5965709db5c3cd47a89c9a38 (diff) | |
parent | d2f333bf998691760b8970c2784756d0fa81e820 (diff) | |
download | starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.zip starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.tar.gz starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.tar.bz2 |
Stars45 can now be built under MSYS2/Mingw32
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
|