~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to strings/bmove_upp.c

  • Committer: Stewart Smith
  • Date: 2008-07-13 06:56:15 UTC
  • mto: (210.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 211.
  • Revision ID: stewart@flamingspork.com-20080713065615-vzok75kgnnviokl9
Move MD5() into a UDF

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    "src-len" to the destination "dst-len" counting downwards.
23
23
*/
24
24
 
25
 
#include "config.h"
26
 
 
27
 
#include "drizzled/internal/m_string.h"
28
 
 
29
 
namespace drizzled
30
 
{
31
 
namespace internal
32
 
{
33
 
 
34
 
void bmove_upp(register unsigned char *dst, register const unsigned char *src,
 
25
#include <my_global.h>
 
26
#include "m_string.h"
 
27
 
 
28
#if defined(MC68000) && defined(DS90)
 
29
 
 
30
/* 0 <= len <= 65535 */
 
31
void bmove_upp(byte *dst, const byte *src,uint len)
 
32
{
 
33
asm("           movl    12(a7),d0       ");
 
34
asm("           subql   #1,d0           ");
 
35
asm("           blt     .L5             ");
 
36
asm("           movl    4(a7),a1        ");
 
37
asm("           movl    8(a7),a0        ");
 
38
asm(".L4:       movb    -(a0),-(a1)     ");
 
39
asm("           dbf     d0,.L4          ");
 
40
asm(".L5:                               ");
 
41
}
 
42
#else
 
43
 
 
44
void bmove_upp(register uchar *dst, register const uchar *src,
35
45
               register size_t len)
36
46
{
37
47
  while (len-- != 0) *--dst = *--src;
38
48
}
39
49
 
40
 
} /* namespace internal */
41
 
} /* namespace drizzled */
 
50
#endif