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