Commit | Line | Data |
---|---|---|
da7c5cc6 KM |
1 | /* |
2 | * Copyright (c) 1984 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
1b58aa0a KM |
6 | |
7 | #ifndef lint | |
c8869d53 | 8 | static char sccsid[] = "@(#)machpats.c 1.5 (Berkeley) %G%"; |
1b58aa0a KM |
9 | #endif not lint |
10 | ||
ea1f375a | 11 | #include "inline.h" |
1b58aa0a KM |
12 | |
13 | /* | |
14 | * Pattern table for special VAX instructions. | |
15 | */ | |
16 | struct pats machine_ptab[] = { | |
17 | ||
18 | #ifdef vax | |
c8869d53 | 19 | { 3, "_blkcpy\n", |
1b58aa0a KM |
20 | " movl (sp)+,r1\n\ |
21 | movl (sp)+,r3\n\ | |
22 | jbr 2f\n\ | |
23 | 1:\n\ | |
24 | subl2 r0,(sp)\n\ | |
25 | movc3 r0,(r1),(r3)\n\ | |
26 | 2:\n\ | |
27 | movzwl $65535,r0\n\ | |
28 | cmpl (sp),r0\n\ | |
29 | jgtr 1b\n\ | |
30 | movl (sp)+,r0\n\ | |
31 | movc3 r0,(r1),(r3)\n" }, | |
32 | ||
c8869d53 | 33 | { 3, "_bcopy\n", |
1b58aa0a KM |
34 | " movl (sp)+,r1\n\ |
35 | movl (sp)+,r3\n\ | |
36 | movl (sp)+,r5\n\ | |
37 | movc3 r5,(r1),(r3)\n" }, | |
38 | ||
c8869d53 | 39 | { 3, "_ovbcopy\n", |
1b58aa0a KM |
40 | " movl (sp)+,r3\n\ |
41 | movl (sp)+,r4\n\ | |
42 | movl (sp)+,r5\n\ | |
43 | movc3 r5,(r3),(r4)\n" }, | |
44 | ||
c8869d53 | 45 | { 3, "_blkcmp\n", |
1b58aa0a KM |
46 | " movl (sp)+,r1\n\ |
47 | movl (sp)+,r3\n\ | |
48 | jbr 2f\n\ | |
49 | 1:\n\ | |
50 | subl2 r0,(sp)\n\ | |
51 | cmpc3 r0,(r1),(r3)\n\ | |
52 | bneq 3f\n\ | |
53 | 2:\n\ | |
54 | movzwl $65535,r0\n\ | |
55 | cmpl (sp),r0\n\ | |
56 | jgtr 1b\n\ | |
57 | movl (sp)+,r0\n\ | |
58 | cmpc3 r0,(r1),(r3)\n\ | |
59 | 3:\n" }, | |
60 | ||
c8869d53 | 61 | { 3, "_bcmp\n", |
1b58aa0a KM |
62 | " movl (sp)+,r1\n\ |
63 | movl (sp)+,r3\n\ | |
64 | movl (sp)+,r5\n\ | |
65 | cmpc3 r5,(r1),(r3)\n" }, | |
66 | ||
c8869d53 | 67 | { 2, "_blkclr\n", |
1b58aa0a KM |
68 | " movl (sp)+,r3\n\ |
69 | jbr 2f\n\ | |
70 | 1:\n\ | |
71 | subl2 r0,(sp)\n\ | |
72 | movc5 $0,(r3),$0,r0,(r3)\n\ | |
73 | 2:\n\ | |
74 | movzwl $65535,r0\n\ | |
75 | cmpl (sp),r0\n\ | |
76 | jgtr 1b\n\ | |
77 | movl (sp)+,r0\n\ | |
78 | movc5 $0,(r3),$0,r0,(r3)\n" }, | |
79 | ||
c8869d53 | 80 | { 2, "_bzero\n", |
1b58aa0a KM |
81 | " movl (sp)+,r3\n\ |
82 | movl (sp)+,r5\n\ | |
83 | movc5 $0,(r3),$0,r5,(r3)\n" }, | |
84 | ||
c8869d53 | 85 | { 3, "_llocc\n", |
1b58aa0a KM |
86 | " movl (sp)+,r4\n\ |
87 | movl (sp)+,r5\n\ | |
88 | movl (sp)+,r1\n\ | |
89 | 1:\n\ | |
90 | movzwl $65535,r0\n\ | |
91 | cmpl r5,r0\n\ | |
92 | jleq 1f\n\ | |
93 | subl2 r0,r5\n\ | |
94 | locc r4,r0,(r1)\n\ | |
95 | jeql 1b\n\ | |
96 | addl2 r5,r0\n\ | |
97 | jbr 2f\n\ | |
98 | 1:\n\ | |
99 | locc r4,r5,(r1)\n\ | |
100 | 2:\n" }, | |
101 | ||
c8869d53 | 102 | { 3, "_locc\n", |
1b58aa0a KM |
103 | " movl (sp)+,r3\n\ |
104 | movl (sp)+,r4\n\ | |
105 | movl (sp)+,r5\n\ | |
106 | locc r3,r4,(r5)\n" }, | |
107 | ||
c8869d53 | 108 | { 4, "_scanc\n", |
1b58aa0a KM |
109 | " movl (sp)+,r2\n\ |
110 | movl (sp)+,r3\n\ | |
111 | movl (sp)+,r4\n\ | |
112 | movl (sp)+,r5\n\ | |
113 | scanc r2,(r3),(r4),r5\n" }, | |
114 | ||
c8869d53 | 115 | { 3, "_skpc\n", |
1b58aa0a KM |
116 | " movl (sp)+,r3\n\ |
117 | movl (sp)+,r4\n\ | |
118 | movl (sp)+,r5\n\ | |
119 | skpc r3,r4,(r5)\n" }, | |
120 | ||
c8869d53 | 121 | { 2, "_insque\n", |
1b58aa0a KM |
122 | " movl (sp)+,r4\n\ |
123 | movl (sp)+,r5\n\ | |
124 | insque (r4),(r5)\n" }, | |
125 | ||
c8869d53 | 126 | { 1, "_remque\n", |
1b58aa0a KM |
127 | " movl (sp)+,r5\n\ |
128 | remque (r5),r0\n" }, | |
129 | #endif vax | |
130 | ||
131 | #ifdef mc68000 | |
132 | /* someday... */ | |
133 | #endif mc68000 | |
134 | ||
c8869d53 | 135 | { 0, "", "" } |
1b58aa0a | 136 | }; |