summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-26 18:16:48 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-26 18:16:48 -0300
commit37b8fa0b2b84f5a4800fc30259dc892102a9f067 (patch)
treed00fb872f414918ca738a38dbaaa4afed8644c08 /strings
parente8fb899205a43e050c56e584ccbb24747034d675 (diff)
downloadmariadb-git-37b8fa0b2b84f5a4800fc30259dc892102a9f067.tar.gz
WL#5486: Remove code for unsupported platforms
Remove ASM for MC68000 and Vax.
Diffstat (limited to 'strings')
-rw-r--r--strings/bfill.c57
-rw-r--r--strings/bmove.c34
-rw-r--r--strings/bmove_upp.c18
-rw-r--r--strings/strcend.c18
-rw-r--r--strings/strend.c13
-rw-r--r--strings/strmov.c16
6 files changed, 1 insertions, 155 deletions
diff --git a/strings/bfill.c b/strings/bfill.c
index 2750553f48a..ccc063f59e3 100644
--- a/strings/bfill.c
+++ b/strings/bfill.c
@@ -23,10 +23,6 @@
bfill(dst, len, fill) moves "len" fill characters to "dst".
Thus to set a buffer to 80 spaces, do bfill(buff, 80, ' ').
-
- Note: the "b" routines are there to exploit certain VAX order codes,
- but the MOVC5 instruction will only move 65535 characters. The asm
- code is presented for your interest and amusement.
*/
#include <my_global.h>
@@ -34,58 +30,6 @@
#if !defined(bfill) && !defined(HAVE_BFILL)
-#if VaxAsm
-
-void bfill(dst, len, fill)
-char *dst;
-uint len;
-int fill; /* actually char */
-{
- asm("movc5 $0,*4(ap),12(ap),8(ap),*4(ap)");
-}
-
-#elif defined(MC68000) && defined(DS90)
-
-void bfill(dst, len,fill) /* Optimized with long-fill */
-char *dst;
-uint len;
-pchar fill;
-{
-asm(" movl 8.(a7),d1 ");
-asm(" jeq .L9 ");
-asm(" movl 4.(a7),a0 ");
-asm(" moveq #0,d0 ");
-asm(" movb 15.(a7),d0 ");
-asm(" movl d2,a1 ");
-asm(" movw d0,d2 ");
-asm(" aslw #8,d0 ");
-asm(" orw d2,d0 ");
-asm(" movl d0,d2 ");
-asm(" swap d0 ");
-asm(" orl d2,d0 ");
-asm(" movl a0,d2 ");
-asm(" btst #0,d2 ");
-asm(" jeq .L1 ");
-asm(" movb d0,(a0)+ ");
-asm(" subql #1,d1 ");
-asm(".L1: movl d1,d2 ");
-asm(" lsrl #2,d2 ");
-asm(" jcc .L2 ");
-asm(" movw d0,(a0)+ ");
-asm(" jra .L2 ");
-asm(".L3: movl d0,(a0)+ ");
-asm(".L2: dbra d2,.L3 ");
-asm(" addqw #1,d2 ");
-asm(" subql #1,d2 ");
-asm(" jcc .L3 ");
-asm(" andl #1,d1 ");
-asm(" jeq .L8 ");
-asm(" movb d0,(a0) ");
-asm(".L8: movl a1,d2 ");
-asm(".L9: rts ");
-}
-#else
-
void bfill(dst, len, fill)
register byte *dst;
register uint len;
@@ -95,4 +39,3 @@ register pchar fill;
}
#endif
-#endif
diff --git a/strings/bmove.c b/strings/bmove.c
index ae9641a5d58..0aa825558ca 100644
--- a/strings/bmove.c
+++ b/strings/bmove.c
@@ -30,10 +30,6 @@
has its first two arguments the other way around you may find this a
bit easier to get right.
No value is returned.
-
- Note: the "b" routines are there to exploit certain VAX order codes,
- but the MOVC3 instruction will only move 65535 characters. The asm
- code is presented for your interest and amusement.
*/
#include <my_global.h>
@@ -41,33 +37,6 @@
#if !defined(HAVE_BMOVE) && !defined(bmove)
-#if VaxAsm
-
-void bmove(dst, src, len)
- char *dst, *src;
- uint len;
- {
- asm("movc3 12(ap),*8(ap),*4(ap)");
- }
-
-#else
-#if defined(MC68000) && defined(DS90)
-
-void bmove(dst, src, len)
-char *dst,*src;
-uint len; /* 0 <= len <= 65535 */
-{
-asm(" movl 12(a7),d0 ");
-asm(" subql #1,d0 ");
-asm(" blt .L5 ");
-asm(" movl 4(a7),a1 ");
-asm(" movl 8(a7),a0 ");
-asm(".L4: movb (a0)+,(a1)+ ");
-asm(" dbf d0,.L4 ");
-asm(".L5: ");
-}
-#else
-
void bmove(dst, src, len)
register char *dst;
register const char *src;
@@ -75,6 +44,5 @@ register uint len;
{
while (len-- != 0) *dst++ = *src++;
}
-#endif
-#endif
+
#endif
diff --git a/strings/bmove_upp.c b/strings/bmove_upp.c
index fb47bda2d1d..05e786837f4 100644
--- a/strings/bmove_upp.c
+++ b/strings/bmove_upp.c
@@ -25,26 +25,8 @@
#include <my_global.h>
#include "m_string.h"
-#if defined(MC68000) && defined(DS90)
-
-/* 0 <= len <= 65535 */
-void bmove_upp(byte *dst, const byte *src,uint len)
-{
-asm(" movl 12(a7),d0 ");
-asm(" subql #1,d0 ");
-asm(" blt .L5 ");
-asm(" movl 4(a7),a1 ");
-asm(" movl 8(a7),a0 ");
-asm(".L4: movb -(a0),-(a1) ");
-asm(" dbf d0,.L4 ");
-asm(".L5: ");
-}
-#else
-
void bmove_upp(register uchar *dst, register const uchar *src,
register size_t len)
{
while (len-- != 0) *--dst = *--src;
}
-
-#endif
diff --git a/strings/strcend.c b/strings/strcend.c
index 56e31d5f994..e08ad2b1e75 100644
--- a/strings/strcend.c
+++ b/strings/strcend.c
@@ -25,23 +25,6 @@
#include <my_global.h>
#include "m_string.h"
-#if defined(MC68000) && defined(DS90)
-
-char *strcend(const char *s, pchar c)
-{
-asm(" movl 4(a7),a0 ");
-asm(" movl 8(a7),d1 ");
-asm(".L2: movb (a0)+,d0 ");
-asm(" cmpb d0,d1 ");
-asm(" beq .L1 ");
-asm(" tstb d0 ");
-asm(" bne .L2 ");
-asm(".L1: movl a0,d0 ");
-asm(" subql #1,d0 ");
-}
-
-#else
-
char *strcend(register const char *s, register pchar c)
{
for (;;)
@@ -51,4 +34,3 @@ char *strcend(register const char *s, register pchar c)
}
}
-#endif
diff --git a/strings/strend.c b/strings/strend.c
index 4dadf0675dc..d70a5d648d5 100644
--- a/strings/strend.c
+++ b/strings/strend.c
@@ -24,27 +24,14 @@
is, strend(s)-s == strlen(s). This is useful for adding things at
the end of strings. It is redundant, because strchr(s,'\0') could
be used instead, but this is clearer and faster.
- Beware: the asm version works only if strlen(s) < 65535.
*/
#include <my_global.h>
#include "m_string.h"
-#if VaxAsm
-
-char *strend(s)
-const char *s;
-{
- asm("locc $0,$65535,*4(ap)");
- asm("movl r1,r0");
-}
-
-#else /* ~VaxAsm */
-
char *strend(register const char *s)
{
while (*s++);
return (char*) (s-1);
}
-#endif /* VaxAsm */
diff --git a/strings/strmov.c b/strings/strmov.c
index eedf22a4ef1..4d4915d27a0 100644
--- a/strings/strmov.c
+++ b/strings/strmov.c
@@ -29,25 +29,9 @@
#define strmov strmov_overlapp
#endif
-#if !defined(MC68000) && !defined(DS90)
-
char *strmov(register char *dst, register const char *src)
{
while ((*dst++ = *src++)) ;
return dst-1;
}
-#else
-
-char *strmov(dst, src)
- char *dst, *src;
-{
- asm(" movl 4(a7),a1 ");
- asm(" movl 8(a7),a0 ");
- asm(".L4: movb (a0)+,(a1)+ ");
- asm(" jne .L4 ");
- asm(" movl a1,d0 ");
- asm(" subql #1,d0 ");
-}
-
-#endif