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 */ 6 7 #ifndef lint 8 static char sccsid[] = "@(#)langpats.c 1.3 (Berkeley) 02/24/86"; 9 #endif 10 11 #include "inline.h" 12 13 /* 14 * Pattern table for kernel specific routines. 15 * These patterns are based on the old asm.sed script. 16 */ 17 struct pats language_ptab[] = { 18 19 { 0, "_spl0\n", 20 " mfpr $8,r0\n\ 21 mtpr $0,$8\n" }, 22 23 { 0, "_spl1\n", 24 " mfpr $8,r0\n\ 25 mtpr $0x11,$8\n" }, 26 27 { 0, "_spl3\n", 28 " mfpr $8,r0\n\ 29 mtpr $0x13,$8\n" }, 30 31 { 0, "_spl7\n", 32 " mfpr $8,r0\n\ 33 mtpr $0x17,$8\n" }, 34 35 { 0, "_spl8\n", 36 " mfpr $8,r0\n\ 37 mtpr $0x18,$8\n" }, 38 39 { 0, "_splimp\n", 40 " mfpr $8,r0\n\ 41 mtpr $0x18,$8\n" }, 42 43 { 0, "_splsoftclock\n", 44 " mfpr $18,r0\n\ 45 mtpr $0x8,$8\n" }, 46 47 { 0, "_splnet\n", 48 " mfpr $8,r0\n\ 49 mtpr $0xc,$8\n" }, 50 51 { 0, "_splbio\n", 52 " mfpr $8,r0\n\ 53 mtpr $0x18,$8\n" }, 54 55 { 0, "_spltty\n", 56 " mfpr $8,r0\n\ 57 mtpr $0x18,$8\n" }, 58 59 { 0, "_splclock\n", 60 " mfpr $8,r0\n\ 61 mtpr $0x18,$8\n" }, 62 63 { 0, "_splhigh\n", 64 " mfpr $8,r0\n\ 65 mtpr $0x18,$8\n" }, 66 67 { 1, "_splx\n", 68 " movl (sp)+,r1\n\ 69 mfpr $8,r0\n\ 70 mtpr r1,$8\n" }, 71 72 { 1, "_mfpr\n", 73 " movl (sp)+,r1\n\ 74 mfpr r1,r0\n" }, 75 76 { 2, "_mtpr\n", 77 " movl (sp)+,r1\n\ 78 movl (sp)+,r0\n\ 79 mtpr r0,r1\n" }, 80 81 #ifdef notdef 82 { 1, "_uncache\n", 83 " movl (sp)+,r1\n\ 84 mtpr r1,$0x1c\n" }, 85 #endif 86 87 { 0, "_setsoftclock\n", 88 " mtpr $0x8,$0x10\n" }, 89 90 { 1, "_fuibyte\n", 91 " callf $8,_fubyte\n" }, 92 93 { 1, "_fuiword\n", 94 " callf $8,_fuword\n" }, 95 96 { 2, "_suibyte\n", 97 " callf $12,_subyte\n" }, 98 99 { 2, "_suiword\n", 100 " callf $12,_suword\n" }, 101 102 { 1, "_setjmp\n", 103 " movl (sp)+,r1\n\ 104 clrl r0\n\ 105 movab (fp),(r1)\n\ 106 addl2 $4,r1\n\ 107 movab 1(pc),(r1)\n" }, 108 109 { 1, "_ffs\n", 110 " movl (sp)+,r1\n\ 111 ffs r1,r0\n\ 112 bgeq 1f\n\ 113 mnegl $1,r0\n\ 114 1:\n\ 115 incl r0\n" }, 116 117 { 2, "__insque\n", 118 " movl (sp)+,r0\n\ 119 movl (sp)+,r1\n\ 120 insque (r0),(r1)\n" }, 121 122 { 1, "__remque\n", 123 " movl (sp)+,r1\n\ 124 remque (r1)\n" }, 125 126 { 2, "_imin\n", 127 " movl (sp)+,r0\n\ 128 movl (sp)+,r1\n\ 129 cmpl r0,r1\n\ 130 bleq 1f\n\ 131 movl r1,r0\n\ 132 1:\n" }, 133 134 { 2, "_imax\n", 135 " movl (sp)+,r0\n\ 136 movl (sp)+,r1\n\ 137 cmpl r0,r1\n\ 138 bgeq 1f\n\ 139 movl r1,r0\n\ 140 1:\n" }, 141 142 { 2, "_min\n", 143 " movl (sp)+,r0\n\ 144 movl (sp)+,r1\n\ 145 cmpl r0,r1\n\ 146 blequ 1f\n\ 147 movl r1,r0\n\ 148 1:\n" }, 149 150 { 2, "_max\n", 151 " movl (sp)+,r0\n\ 152 movl (sp)+,r1\n\ 153 cmpl r0,r1\n\ 154 bgequ 1f\n\ 155 movl r1,r0\n\ 156 1:\n" }, 157 158 { 2, "__movow\n", 159 " movl (sp)+,r1\n\ 160 movl (sp)+,r0\n\ 161 movow r0,(r1)\n" }, 162 163 { 2, "__movob\n", 164 " movl (sp)+,r1\n\ 165 movl (sp)+,r0\n\ 166 movob r0,(r1)\n" }, 167 168 { 0, "", "" } 169 }; 170