11.8Sriastrad/*	$NetBSD: ashldi3.S,v 1.8 2014/03/18 18:20:37 riastradh Exp $	*/
21.1Sjtc
31.1Sjtc/*-
41.1Sjtc * Copyright (c) 1996 The NetBSD Foundation, Inc.
51.1Sjtc * All rights reserved.
61.1Sjtc *
71.1Sjtc * This code is derived from software contributed to The NetBSD Foundation
81.1Sjtc * by J.T. Conklin.
91.1Sjtc *
101.1Sjtc * Redistribution and use in source and binary forms, with or without
111.1Sjtc * modification, are permitted provided that the following conditions
121.1Sjtc * are met:
131.1Sjtc * 1. Redistributions of source code must retain the above copyright
141.1Sjtc *    notice, this list of conditions and the following disclaimer.
151.1Sjtc * 2. Redistributions in binary form must reproduce the above copyright
161.1Sjtc *    notice, this list of conditions and the following disclaimer in the
171.1Sjtc *    documentation and/or other materials provided with the distribution.
181.1Sjtc *
191.1Sjtc * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.1Sjtc * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.1Sjtc * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.2Sjtc * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.2Sjtc * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.1Sjtc * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.1Sjtc * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.1Sjtc * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.1Sjtc * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.1Sjtc * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.1Sjtc * POSSIBILITY OF SUCH DAMAGE.
301.1Sjtc */
311.1Sjtc
321.1Sjtc#include <machine/asm.h>
331.1Sjtc
341.1Sjtc| d0 msw
351.1Sjtc| d1 lsw
361.1Sjtc| d2 shift
371.1Sjtc| d3 offset (32 - shift)
381.1Sjtc
391.1SjtcENTRY(__ashldi3)
401.7Smatt	link	%fp,#-12
411.7Smatt	moveml	%d2-%d4,(%sp)
421.5Smatt	movel	8(%fp),%d0
431.5Smatt	movel	12(%fp),%d1
441.5Smatt	movel	16(%fp),%d2
451.3Sthorpej	moveq	#32,%d3
461.3Sthorpej	subl	%d2,%d3
471.1Sjtc	jgt	L2
481.3Sthorpej	negl	%d3
491.3Sthorpej	movel	%d1,%d0
501.3Sthorpej	asll	%d3,%d0
511.3Sthorpej	clrl	%d1
521.1Sjtc	jra	L3
531.3SthorpejL2:	asll	%d2,%d0
541.3Sthorpej	movel	%d1,%d4
551.3Sthorpej	lsrl	%d3,%d4
561.3Sthorpej	orl	%d4,%d0
571.3Sthorpej	asll	%d2,%d1
581.5SmattL3:	moveml	-12(%fp),%d2-%d4
591.5Smatt	unlk	%fp
601.1Sjtc	rts
611.6SmattEND(__ashldi3)
62