summaryrefslogtreecommitdiffhomepage
path: root/Opcode/Ice/IceMemoryMacros.h
diff options
context:
space:
mode:
Diffstat (limited to 'Opcode/Ice/IceMemoryMacros.h')
-rw-r--r--Opcode/Ice/IceMemoryMacros.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/Opcode/Ice/IceMemoryMacros.h b/Opcode/Ice/IceMemoryMacros.h
index 490ecd1..53bce50 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.