Home | History | Annotate | Line # | Download | only in sh3
ashiftrt.S revision 1.1.2.1
      1 /*	$NetBSD: ashiftrt.S,v 1.1.2.1 2001/03/12 13:31:41 bouyer Exp $	*/
      2 
      3 /*-
      4  * Copyright (C) 1999 Tsubai Masanari.  All rights reserved.
      5  *
      6  * Redistribution and use in source and binary forms, with or without
      7  * modification, are permitted provided that the following conditions
      8  * are met:
      9  * 1. Redistributions of source code must retain the above copyright
     10  *    notice, this list of conditions and the following disclaimer.
     11  * 2. Redistributions in binary form must reproduce the above copyright
     12  *    notice, this list of conditions and the following disclaimer in the
     13  *    documentation and/or other materials provided with the distribution.
     14  * 3. The name of the author may not be used to endorse or promote products
     15  *    derived from this software without specific prior written permission.
     16  *
     17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27  */
     28 
     29 #include <machine/asm.h>
     30 
     31 NENTRY(__ashiftrt_r4_31)
     32 	shll	r4
     33 	rts
     34 	subc	r4, r4
     35 
     36 ALTENTRY(__ashiftrt_r4_30)
     37 	shar	r4
     38 
     39 ALTENTRY(__ashiftrt_r4_29)
     40 	shar	r4
     41 
     42 ALTENTRY(__ashiftrt_r4_28)
     43 	shar	r4
     44 
     45 ALTENTRY(__ashiftrt_r4_27)
     46 	shar	r4
     47 
     48 ALTENTRY(__ashiftrt_r4_26)
     49 	shar	r4
     50 
     51 ALTENTRY(__ashiftrt_r4_25)
     52 	shar	r4
     53 
     54 ALTENTRY(__ashiftrt_r4_24)
     55 	shlr16	r4
     56 	shlr8	r4
     57 	rts
     58 	exts.b	r4, r4
     59 
     60 ALTENTRY(__ashiftrt_r4_23)
     61 	shar	r4
     62 
     63 ALTENTRY(__ashiftrt_r4_22)
     64 	shar	r4
     65 
     66 ALTENTRY(__ashiftrt_r4_21)
     67 	shar	r4
     68 
     69 ALTENTRY(__ashiftrt_r4_20)
     70 	shar	r4
     71 
     72 ALTENTRY(__ashiftrt_r4_19)
     73 	shar	r4
     74 
     75 ALTENTRY(__ashiftrt_r4_18)
     76 	shar	r4
     77 
     78 ALTENTRY(__ashiftrt_r4_17)
     79 	shar	r4
     80 
     81 ALTENTRY(__ashiftrt_r4_16)
     82 	shlr16	r4
     83 	rts
     84 	exts.w	r4, r4
     85 
     86 ALTENTRY(__ashiftrt_r4_15)
     87 	swap.w	r4, r4
     88 	cmp/pz	r4
     89 	bf/s	1f
     90 	exts.w	r4, r4
     91 	rts
     92 	shll	r4
     93 1:
     94 	sett
     95 	rts
     96 	rotcl	r4
     97 
     98 ALTENTRY(__ashiftrt_r4_14)
     99 	shar	r4
    100 
    101 ALTENTRY(__ashiftrt_r4_13)
    102 	shar	r4
    103 
    104 ALTENTRY(__ashiftrt_r4_12)
    105 	shar	r4
    106 
    107 ALTENTRY(__ashiftrt_r4_11)
    108 	shar	r4
    109 
    110 ALTENTRY(__ashiftrt_r4_10)
    111 	shar	r4
    112 
    113 ALTENTRY(__ashiftrt_r4_9)
    114 	shar	r4
    115 
    116 ALTENTRY(__ashiftrt_r4_8)
    117 	shar	r4
    118 
    119 ALTENTRY(__ashiftrt_r4_7)
    120 	shar	r4
    121 
    122 ALTENTRY(__ashiftrt_r4_6)
    123 	shar	r4
    124 
    125 ALTENTRY(__ashiftrt_r4_5)
    126 	shar	r4
    127 
    128 ALTENTRY(__ashiftrt_r4_4)
    129 	shar	r4
    130 
    131 ALTENTRY(__ashiftrt_r4_3)
    132 	shar	r4
    133 
    134 ALTENTRY(__ashiftrt_r4_2)
    135 	shar	r4
    136 
    137 ALTENTRY(__ashiftrt_r4_1)
    138 	rts
    139 	shar	r4
    140 
    141 ALTENTRY(__ashiftrt_r4_0)
    142 	rts
    143 	nop
    144