ashrsi3.S revision 1.4.2.2 1 1.4.2.2 elad /* $NetBSD: ashrsi3.S,v 1.4.2.2 2006/05/11 23:31:08 elad Exp $ */
2 1.4.2.2 elad
3 1.4.2.2 elad /*-
4 1.4.2.2 elad * Copyright (C) 1999 Tsubai Masanari. All rights reserved.
5 1.4.2.2 elad *
6 1.4.2.2 elad * Redistribution and use in source and binary forms, with or without
7 1.4.2.2 elad * modification, are permitted provided that the following conditions
8 1.4.2.2 elad * are met:
9 1.4.2.2 elad * 1. Redistributions of source code must retain the above copyright
10 1.4.2.2 elad * notice, this list of conditions and the following disclaimer.
11 1.4.2.2 elad * 2. Redistributions in binary form must reproduce the above copyright
12 1.4.2.2 elad * notice, this list of conditions and the following disclaimer in the
13 1.4.2.2 elad * documentation and/or other materials provided with the distribution.
14 1.4.2.2 elad * 3. The name of the author may not be used to endorse or promote products
15 1.4.2.2 elad * derived from this software without specific prior written permission.
16 1.4.2.2 elad *
17 1.4.2.2 elad * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 1.4.2.2 elad * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 1.4.2.2 elad * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 1.4.2.2 elad * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 1.4.2.2 elad * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 1.4.2.2 elad * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 1.4.2.2 elad * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 1.4.2.2 elad * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 1.4.2.2 elad * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 1.4.2.2 elad * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 1.4.2.2 elad */
28 1.4.2.2 elad
29 1.4.2.2 elad #include <machine/asm.h>
30 1.4.2.2 elad
31 1.4.2.2 elad #ifdef PIC /* XXX: uwe */
32 1.4.2.2 elad .hidden __ashrsi3
33 1.4.2.2 elad #endif
34 1.4.2.2 elad
35 1.4.2.2 elad NENTRY(__ashrsi3)
36 1.4.2.2 elad tst r5, r5
37 1.4.2.2 elad bt noshift
38 1.4.2.2 elad
39 1.4.2.2 elad neg r5, r5
40 1.4.2.2 elad shad r5, r4
41 1.4.2.2 elad rts
42 1.4.2.2 elad mov r4, r0
43 1.4.2.2 elad
44 1.4.2.2 elad noshift:
45 1.4.2.2 elad rts
46 1.4.2.2 elad mov r4, r0
47