1: /* Copyright (c) 1984 Regents of the University of California */
   2: 
   3: #ifndef lint
   4: static char sccsid[] = "@(#)langpats.c	2.8 (Berkeley) 2/20/85";
   5: #endif
   6: 
   7: #include "inline.h"
   8: 
   9: /*
  10:  * Pattern table for kernel specific routines.
  11:  * These patterns are based on the old asm.sed script.
  12:  */
  13: struct pats language_ptab[] = {
  14: 
  15: #ifdef vax
  16:     { "1,_ffs\n",
  17: "	movl	(sp)+,r1$\n\
  18: 	ffs	$0,$32,r1,r0\n\
  19: 	bneq	1f\n\
  20: 	mnegl	$1,r0\n\
  21: 1:\n\
  22: 	incl	r0\n" },
  23: 
  24:     { "1,_htons\n",
  25: "	movl	(sp)+,r5$\n\
  26: 	rotl	$8,r5,r0\n\
  27: 	rotl	$-8,r5,r1\n\
  28: 	movb	r1,r0\n\
  29: 	movzwl	r0,r0\n" },
  30: 
  31:     { "1,_ntohs\n",
  32: "	movl	(sp)+,r5$\n\
  33: 	rotl	$8,r5,r0\n\
  34: 	rotl	$-8,r5,r1\n\
  35: 	movb	r1,r0\n\
  36: 	movzwl	r0,r0\n" },
  37: 
  38:     { "1,_htonl\n",
  39: "	movl	(sp)+,r5$\n\
  40: 	rotl	$-8,r5,r0\n\
  41: 	insv	r0,$16,$8,r0\n\
  42: 	rotl	$8,r5,r1\n\
  43: 	movb	r1,r0\n" },
  44: 
  45:     { "1,_ntohl\n",
  46: "	movl	(sp)+,r5$\n\
  47: 	rotl	$-8,r5,r0\n\
  48: 	insv	r0,$16,$8,r0\n\
  49: 	rotl	$8,r5,r1\n\
  50: 	movb	r1,r0\n" },
  51: 
  52:     { "2,__insque\n",
  53: "	movl	(sp)+,r4*\n\
  54: 	movl	(sp)+,r5*\n\
  55: 	insque	(r4),(r5)\n" },
  56: 
  57:     { "1,__remque\n",
  58: "	movl	(sp)+,r5*\n\
  59: 	remque	(r5),r0\n" },
  60: 
  61:     { "2,__queue\n",
  62: "	movl	(sp)+,r0\n\
  63: 	movl	(sp)+,r1*\n\
  64: 	insque	(r1),*4(r0)\n" },
  65: 
  66:     { "1,__dequeue\n",
  67: "	movl	(sp)+,r0\n\
  68: 	remque	*(r0),r0\n" },
  69: 
  70:     { "2,_imin\n",
  71: "	movl	(sp)+,r0\n\
  72: 	movl	(sp)+,r5$\n\
  73: 	cmpl	r0,r5\n\
  74: 	bleq	1f\n\
  75: 	movl	r5,r0\n\
  76: 1:\n" },
  77: 
  78:     { "2,_imax\n",
  79: "	movl	(sp)+,r0\n\
  80: 	movl	(sp)+,r5$\n\
  81: 	cmpl	r0,r5\n\
  82: 	bgeq	1f\n\
  83: 	movl	r5,r0\n\
  84: 1:\n" },
  85: 
  86:     { "2,_min\n",
  87: "	movl	(sp)+,r0\n\
  88: 	movl	(sp)+,r5$\n\
  89: 	cmpl	r0,r5\n\
  90: 	blequ	1f\n\
  91: 	movl	r5,r0\n\
  92: 1:\n" },
  93: 
  94:     { "2,_max\n",
  95: "	movl	(sp)+,r0\n\
  96: 	movl	(sp)+,r5$\n\
  97: 	cmpl	r0,r5\n\
  98: 	bgequ	1f\n\
  99: 	movl	r5,r0\n\
 100: 1:\n" },
 101: #endif vax
 102: 
 103: #ifdef mc68000
 104: /* someday... */
 105: #endif mc68000
 106: 
 107:     { "", "" }
 108: };

Defined variables

language_ptab defined in line 13; used 1 times
sccsid defined in line 4; never used
Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 838
Valid CSS Valid XHTML 1.0 Strict