116961Smckusick /* Copyright (c) 1984 Regents of the University of California */ 216961Smckusick 316961Smckusick #ifndef lint 4*16963Smckusick static char sccsid[] = "@(#)machpats.c 1.2 (Berkeley) 08/18/84"; 516961Smckusick #endif not lint 616961Smckusick 7*16963Smckusick #include "inline.h" 816961Smckusick 916961Smckusick /* 1016961Smckusick * Pattern table for special VAX instructions. 1116961Smckusick */ 1216961Smckusick struct pats machine_ptab[] = { 1316961Smckusick 1416961Smckusick #ifdef vax 1516961Smckusick { "3,_blkcpy\n", 1616961Smckusick " movl (sp)+,r1\n\ 1716961Smckusick movl (sp)+,r3\n\ 1816961Smckusick jbr 2f\n\ 1916961Smckusick 1:\n\ 2016961Smckusick subl2 r0,(sp)\n\ 2116961Smckusick movc3 r0,(r1),(r3)\n\ 2216961Smckusick 2:\n\ 2316961Smckusick movzwl $65535,r0\n\ 2416961Smckusick cmpl (sp),r0\n\ 2516961Smckusick jgtr 1b\n\ 2616961Smckusick movl (sp)+,r0\n\ 2716961Smckusick movc3 r0,(r1),(r3)\n" }, 2816961Smckusick 2916961Smckusick { "3,_bcopy\n", 3016961Smckusick " movl (sp)+,r1\n\ 3116961Smckusick movl (sp)+,r3\n\ 3216961Smckusick movl (sp)+,r5\n\ 3316961Smckusick movc3 r5,(r1),(r3)\n" }, 3416961Smckusick 3516961Smckusick { "3,_ovbcopy\n", 3616961Smckusick " movl (sp)+,r3\n\ 3716961Smckusick movl (sp)+,r4\n\ 3816961Smckusick movl (sp)+,r5\n\ 3916961Smckusick movc3 r5,(r3),(r4)\n" }, 4016961Smckusick 4116961Smckusick { "3,_blkcmp\n", 4216961Smckusick " movl (sp)+,r1\n\ 4316961Smckusick movl (sp)+,r3\n\ 4416961Smckusick jbr 2f\n\ 4516961Smckusick 1:\n\ 4616961Smckusick subl2 r0,(sp)\n\ 4716961Smckusick cmpc3 r0,(r1),(r3)\n\ 4816961Smckusick bneq 3f\n\ 4916961Smckusick 2:\n\ 5016961Smckusick movzwl $65535,r0\n\ 5116961Smckusick cmpl (sp),r0\n\ 5216961Smckusick jgtr 1b\n\ 5316961Smckusick movl (sp)+,r0\n\ 5416961Smckusick cmpc3 r0,(r1),(r3)\n\ 5516961Smckusick 3:\n" }, 5616961Smckusick 5716961Smckusick { "3,_bcmp\n", 5816961Smckusick " movl (sp)+,r1\n\ 5916961Smckusick movl (sp)+,r3\n\ 6016961Smckusick movl (sp)+,r5\n\ 6116961Smckusick cmpc3 r5,(r1),(r3)\n" }, 6216961Smckusick 6316961Smckusick { "2,_blkclr\n", 6416961Smckusick " movl (sp)+,r3\n\ 6516961Smckusick jbr 2f\n\ 6616961Smckusick 1:\n\ 6716961Smckusick subl2 r0,(sp)\n\ 6816961Smckusick movc5 $0,(r3),$0,r0,(r3)\n\ 6916961Smckusick 2:\n\ 7016961Smckusick movzwl $65535,r0\n\ 7116961Smckusick cmpl (sp),r0\n\ 7216961Smckusick jgtr 1b\n\ 7316961Smckusick movl (sp)+,r0\n\ 7416961Smckusick movc5 $0,(r3),$0,r0,(r3)\n" }, 7516961Smckusick 7616961Smckusick { "3,_bzero\n", 7716961Smckusick " movl (sp)+,r3\n\ 7816961Smckusick movl (sp)+,r5\n\ 7916961Smckusick movc5 $0,(r3),$0,r5,(r3)\n" }, 8016961Smckusick 8116961Smckusick { "3,_llocc\n", 8216961Smckusick " movl (sp)+,r4\n\ 8316961Smckusick movl (sp)+,r5\n\ 8416961Smckusick movl (sp)+,r1\n\ 8516961Smckusick 1:\n\ 8616961Smckusick movzwl $65535,r0\n\ 8716961Smckusick cmpl r5,r0\n\ 8816961Smckusick jleq 1f\n\ 8916961Smckusick subl2 r0,r5\n\ 9016961Smckusick locc r4,r0,(r1)\n\ 9116961Smckusick jeql 1b\n\ 9216961Smckusick addl2 r5,r0\n\ 9316961Smckusick jbr 2f\n\ 9416961Smckusick 1:\n\ 9516961Smckusick locc r4,r5,(r1)\n\ 9616961Smckusick 2:\n" }, 9716961Smckusick 9816961Smckusick { "3,_locc\n", 9916961Smckusick " movl (sp)+,r3\n\ 10016961Smckusick movl (sp)+,r4\n\ 10116961Smckusick movl (sp)+,r5\n\ 10216961Smckusick locc r3,r4,(r5)\n" }, 10316961Smckusick 10416961Smckusick { "4,_scanc\n", 10516961Smckusick " movl (sp)+,r2\n\ 10616961Smckusick movl (sp)+,r3\n\ 10716961Smckusick movl (sp)+,r4\n\ 10816961Smckusick movl (sp)+,r5\n\ 10916961Smckusick scanc r2,(r3),(r4),r5\n" }, 11016961Smckusick 11116961Smckusick { "3,_skpc\n", 11216961Smckusick " movl (sp)+,r3\n\ 11316961Smckusick movl (sp)+,r4\n\ 11416961Smckusick movl (sp)+,r5\n\ 11516961Smckusick skpc r3,r4,(r5)\n" }, 11616961Smckusick 11716961Smckusick { "2,_insque\n", 11816961Smckusick " movl (sp)+,r4\n\ 11916961Smckusick movl (sp)+,r5\n\ 12016961Smckusick insque (r4),(r5)\n" }, 12116961Smckusick 12216961Smckusick { "1,_remque\n", 12316961Smckusick " movl (sp)+,r5\n\ 12416961Smckusick remque (r5),r0\n" }, 12516961Smckusick #endif vax 12616961Smckusick 12716961Smckusick #ifdef mc68000 12816961Smckusick /* someday... */ 12916961Smckusick #endif mc68000 13016961Smckusick 13116961Smckusick { "", "" } 13216961Smckusick }; 133