summaryrefslogtreecommitdiffhomepage
path: root/Opcode/Ice/IceMemoryMacros.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-10-02 00:03:27 +0200
committerAki <please@ignore.pl>2021-10-02 00:03:27 +0200
commit976d8d982e8acd9907d65eaf5e9008d9bbf29782 (patch)
tree80bc7df3a90fe91d1e2926e7f7b5ab88bc2c2201 /Opcode/Ice/IceMemoryMacros.h
parent3d90472a953b7aae1e8f4c75ebc70bdaa2b4626f (diff)
downloadstarshatter-976d8d982e8acd9907d65eaf5e9008d9bbf29782.zip
starshatter-976d8d982e8acd9907d65eaf5e9008d9bbf29782.tar.gz
starshatter-976d8d982e8acd9907d65eaf5e9008d9bbf29782.tar.bz2
Naively switched from inline assembly to std library
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.