1/* $NetBSD: ashiftrt.S,v 1.6 2006/05/22 20:56:44 uwe 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 32NENTRY(__ashiftrt_r4_31) 33 shll r4 34 rts 35 subc r4, r4 36 37ALTENTRY(__ashiftrt_r4_30) 38 shar r4 39 40ALTENTRY(__ashiftrt_r4_29) 41 shar r4 42 43ALTENTRY(__ashiftrt_r4_28) 44 shar r4 45 46ALTENTRY(__ashiftrt_r4_27) 47 shar r4 48 49ALTENTRY(__ashiftrt_r4_26) 50 shar r4 51 52ALTENTRY(__ashiftrt_r4_25) 53 shar r4 54 55ALTENTRY(__ashiftrt_r4_24) 56 shlr16 r4 57 shlr8 r4 58 rts 59 exts.b r4, r4 60 61ALTENTRY(__ashiftrt_r4_23) 62 shar r4 63 64ALTENTRY(__ashiftrt_r4_22) 65 shar r4 66 67ALTENTRY(__ashiftrt_r4_21) 68 shar r4 69 70ALTENTRY(__ashiftrt_r4_20) 71 shar r4 72 73ALTENTRY(__ashiftrt_r4_19) 74 shar r4 75 76ALTENTRY(__ashiftrt_r4_18) 77 shar r4 78 79ALTENTRY(__ashiftrt_r4_17) 80 shar r4 81 82ALTENTRY(__ashiftrt_r4_16) 83 shlr16 r4 84 rts 85 exts.w r4, r4 86 87ALTENTRY(__ashiftrt_r4_15) 88 swap.w r4, r4 89 cmp/pz r4 90 bf/s 1f 91 exts.w r4, r4 92 rts 93 shll r4 941: 95 sett 96 rts 97 rotcl r4 98 99ALTENTRY(__ashiftrt_r4_14) 100 shar r4 101 102ALTENTRY(__ashiftrt_r4_13) 103 shar r4 104 105ALTENTRY(__ashiftrt_r4_12) 106 shar r4 107 108ALTENTRY(__ashiftrt_r4_11) 109 shar r4 110 111ALTENTRY(__ashiftrt_r4_10) 112 shar r4 113 114ALTENTRY(__ashiftrt_r4_9) 115 shar r4 116 117ALTENTRY(__ashiftrt_r4_8) 118 shar r4 119 120ALTENTRY(__ashiftrt_r4_7) 121 shar r4 122 123ALTENTRY(__ashiftrt_r4_6) 124 shar r4 125 126ALTENTRY(__ashiftrt_r4_5) 127 shar r4 128 129ALTENTRY(__ashiftrt_r4_4) 130 shar r4 131 132ALTENTRY(__ashiftrt_r4_3) 133 shar r4 134 135ALTENTRY(__ashiftrt_r4_2) 136 shar r4 137 138ALTENTRY(__ashiftrt_r4_1) 139 rts 140 shar r4 141 142ALTENTRY(__ashiftrt_r4_0) 143 rts 144 nop 145