|
|
1.1 root 1: /*
2: * UAE - The Un*x Amiga Emulator
3: *
4: * Miscellaneous machine dependent support functions and definitions
5: *
6: * Copyright 1997 Bernd Schmidt
7: */
8:
9: #include "sysconfig.h"
10: #include "sysdeps.h"
11:
12: #include "config.h"
13: #include "options.h"
14: #include "machdep/m68k.h"
15:
16: struct flag_struct regflags;
17:
18: int fast_memcmp (const void *a, const void *b, int len)
19: {
20: return memcmp (a, b, len);
21: }
22:
23: int do_memcmpy(char *foo, const char *bar, int len);
24: #pragma aux do_memcmpy = \
25: "xor eax,eax" \
26: "sub esi,edi" \
27: "sub edx,16" \
28: "jc LLB7" \
29: "LLB8:" \
30: "mov ebx,[esi + edi]" \
31: "mov ecx,[edi]" \
32: "cmp ebx,ecx" \
33: "jne LLC1" \
34: "mov ebx,[esi + edi + 4]" \
35: "mov ecx,[edi + 4]" \
36: "cmp ebx,ecx" \
37: "jne LLC2" \
38: "mov ebx,[esi + edi + 8]" \
39: "mov ecx,[edi + 8]" \
40: "cmp ebx,ecx" \
41: "jne LLC3" \
42: "mov ebx,[esi + edi + 12]" \
43: "mov ecx,[edi + 12]" \
44: "cmp ebx,ecx" \
45: "jne LLC4" \
46: "add edi,16" \
47: "sub edx,16" \
48: "jnc LLB8" \
49: "LLB7:" \
50: "add edx,16" \
51: "sub edx,4" \
52: "jc LLB2" \
53: "LLB1:" \
54: "mov ebx,[esi + edi]" \
55: "mov ecx,[edi]" \
56: "cmp ebx,ecx" \
57: "jne LLC5" \
58: "add edi,4" \
59: "sub edx,4" \
60: "jnc LLB1" \
61: "LLB2:" \
62: "add edx, 4" \
63: "jz LLB9" \
64: "LLB3:" \
65: "mov bl,[esi + edi]" \
66: "mov cl,[edi]" \
67: "cmp bl,cl" \
68: "jne LLC6" \
69: "inc edi" \
70: "dec edx" \
71: "jnz LLB3" \
72: "jmp LLB9" \
73: "LLC01:" \
74: "mov ebx,[esi + edi]" \
75: "LLC1:" \
76: "mov [edi],ebx" \
77: "mov ebx,[esi + edi + 4]" \
78: "LLC2:" \
79: "mov [edi + 4],ebx" \
80: "mov ebx,[esi + edi + 8]" \
81: "LLC3:" \
82: "mov [edi + 8],ebx" \
83: "mov ebx,[esi + edi + 12]" \
84: "LLC4:" \
85: "mov [edi + 12],ebx" \
86: "add edi,16" \
87: "sub edx,16" \
88: "jnc LLC01" \
89: "add edx,16" \
90: "sub edx,4" \
91: "jc LLC03" \
92: "LLC02:" \
93: "mov ebx,[esi + edi]" \
94: "LLC5:" \
95: "mov [edi],ebx" \
96: "add edi,4" \
97: "sub edx,4" \
98: "jnc LLC02" \
99: "LLC03:" \
100: "add edx,4" \
101: "jz LLC05" \
102: "LLC04:" \
103: "mov bl,[esi + edi]" \
104: "LLC6:" \
105: "mov [edi],bl" \
106: "inc edi" \
107: "dec edx" \
108: "jnz LLC04" \
109: "LLC05:" \
110: "mov eax,1" \
111: "LLB9:" \
112: parm [edi] [esi] [edx] \
113: value [eax] \
114: modify [esi edi edx ecx ebx]
115:
116:
117: int memcmpy (void *foo, const void *bar, int len)
118: {
119: return do_memcmpy (foo, bar, len);
120: }
121:
122: void machdep_init (void)
123: {
124: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.