1*95e1ffb1Schristos/* $NetBSD: blkset.S,v 1.5 2005/12/11 12:24:45 christos Exp $ */ 22362fef9Sthorpej 32362fef9Sthorpej/* 42362fef9Sthorpej * Copyright (c) 1994 Ludd, University of Lule}, Sweden. 52362fef9Sthorpej * All rights reserved. 62362fef9Sthorpej * 72362fef9Sthorpej * Redistribution and use in source and binary forms, with or without 82362fef9Sthorpej * modification, are permitted provided that the following conditions 92362fef9Sthorpej * are met: 102362fef9Sthorpej * 1. Redistributions of source code must retain the above copyright 112362fef9Sthorpej * notice, this list of conditions and the following disclaimer. 122362fef9Sthorpej * 2. Redistributions in binary form must reproduce the above copyright 132362fef9Sthorpej * notice, this list of conditions and the following disclaimer in the 142362fef9Sthorpej * documentation and/or other materials provided with the distribution. 152362fef9Sthorpej * 3. All advertising materials mentioning features or use of this software 162362fef9Sthorpej * must display the following acknowledgement: 172362fef9Sthorpej * This product includes software developed at Ludd, University of Lule}. 182362fef9Sthorpej * 4. The name of the author may not be used to endorse or promote products 192362fef9Sthorpej * derived from this software without specific prior written permission 202362fef9Sthorpej * 212362fef9Sthorpej * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 222362fef9Sthorpej * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 232362fef9Sthorpej * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 242362fef9Sthorpej * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 252362fef9Sthorpej * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 262362fef9Sthorpej * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 272362fef9Sthorpej * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 282362fef9Sthorpej * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 292362fef9Sthorpej * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 302362fef9Sthorpej * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 312362fef9Sthorpej */ 322362fef9Sthorpej 332362fef9Sthorpej#include <machine/asm.h> 342362fef9Sthorpej 352362fef9Sthorpej/* 362362fef9Sthorpej * Set a block of memory larger than 64K. 372362fef9Sthorpej */ 38f2d946a5SraggeENTRY(__blkset,R6|R7) 396cad4b79Smatt movl 4(%ap), %r3 406cad4b79Smatt movl 8(%ap), %r7 416cad4b79Smatt movl 12(%ap), %r6 422362fef9Sthorpej jbr 2f 436cad4b79Smatt1: subl2 %r0, %r6 446cad4b79Smatt movc5 $0,(%r3),%r7,%r0,(%r3) 456cad4b79Smatt2: movzwl $65535,%r0 466cad4b79Smatt cmpl %r6, %r0 472362fef9Sthorpej jgtr 1b 486cad4b79Smatt movc5 $0,(%r3),%r7,%r6,(%r3) 492362fef9Sthorpej ret 50