1
#ifndef _KVI_MEMMOVE_H_INCLUDED_
2
#define _KVI_MEMMOVE_H_INCLUDED_
5
// File : kvi_memmove.h (/usr/build/NEW_kvirc/kvirc/src/kvicore/kvi_memmove.h)
6
// Last major modification : Fri Mar 19 1999 03:15:21 by Szymon Stefanek
8
// This file is part of the KVirc irc client distribution
9
// Copyright (C) 1999-2000 Szymon Stefanek (stefanek@tin.it)
11
// This program is FREE software. You can redistribute it and/or
12
// modify it under the terms of the GNU General Public License
13
// as published by the Free Software Foundation; either version 2
14
// of the License, or (at your opinion) any later version.
16
// This program is distributed in the HOPE that it will be USEFUL,
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
// See the GNU General Public License for more details.
21
// You should have received a copy of the GNU General Public License
22
// along with this program. If not, write to the Free Software Foundation,
23
// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
#include "kvi_settings.h"
28
#ifndef _KVI_MEMMOVE_CPP_
30
extern void *kvi_memmove(void *dst_ptr,const void *src_ptr,int len);
31
// In fastmove the src and dst may not overlap
33
#ifdef COMPILE_i386_ASM_CODE
35
inline void kvi_fastmove(void * dst_ptr,const void *src_ptr,int len)
48
: "=c" (len), "=&S" (src_ptr), "=&D" (dst_ptr)
49
: "0" (len), "1" (src_ptr), "2" (dst_ptr)
53
// Hehe...I am tempted to place a mmx extension here too...but
54
// which proggy can assemble that ? My asm SEEMS to not understand movsq ...
55
// If your compiler can , and you want to some performance tests , well...use this one.
56
// I am not sure that it will work faster in kvirc , because the average
57
// size of data moved is probably smaller than 15 bytes ...
59
// inline void kvi_fastmove(void * dst_ptr,const void *src_ptr,int len)
61
// __asm__ __volatile__(
76
// : "=c" (len), "=&S" (src_ptr), "=&D" (dst_ptr)
77
// : "0" (len), "1" (src_ptr), "2" (dst_ptr)
83
extern void kvi_fastmove(void *dst_ptr,const void *src_ptr,int len);
88
#endif //!_KVI_MEMMOVE_H_INCLUDED_