Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
fce8b7e1
Commit
fce8b7e1
authored
Jul 26, 2010
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL#5486: Remove code for unsupported platforms
Remove ASM for MC68000 and Vax.
parent
9c841535
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1 addition
and
155 deletions
+1
-155
strings/bfill.c
strings/bfill.c
+0
-57
strings/bmove.c
strings/bmove.c
+1
-33
strings/bmove_upp.c
strings/bmove_upp.c
+0
-18
strings/strcend.c
strings/strcend.c
+0
-18
strings/strend.c
strings/strend.c
+0
-13
strings/strmov.c
strings/strmov.c
+0
-16
No files found.
strings/bfill.c
View file @
fce8b7e1
...
...
@@ -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
strings/bmove.c
View file @
fce8b7e1
...
...
@@ -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
strings/bmove_upp.c
View file @
fce8b7e1
...
...
@@ -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
strings/strcend.c
View file @
fce8b7e1
...
...
@@ -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
strings/strend.c
View file @
fce8b7e1
...
...
@@ -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 */
strings/strmov.c
View file @
fce8b7e1
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment