|
|
1.1 ! root 1: /* Copyright (C) 1994 Free Software Foundation, Inc. ! 2: ! 3: This file is free software; you can redistribute it and/or modify it ! 4: under the terms of the GNU General Public License as published by the ! 5: Free Software Foundation; either version 2, or (at your option) any ! 6: later version. ! 7: ! 8: In addition to the permissions in the GNU General Public License, the ! 9: Free Software Foundation gives you unlimited permission to link the ! 10: compiled version of this file with other programs, and to distribute ! 11: those programs without any restriction coming from the use of this ! 12: file. (The General Public License restrictions do apply in other ! 13: respects; for example, they cover modification of the file, and ! 14: distribution when not linked into another program.) ! 15: ! 16: This file is distributed in the hope that it will be useful, but ! 17: WITHOUT ANY WARRANTY; without even the implied warranty of ! 18: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! 19: General Public License for more details. ! 20: ! 21: You should have received a copy of the GNU General Public License ! 22: along with this program; see the file COPYING. If not, write to ! 23: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ! 24: ! 25: /* As a special exception, if you link this library with other files, ! 26: some of which are compiled with GCC, to produce an executable, ! 27: this library does not by itself cause the resulting executable ! 28: to be covered by the GNU General Public License. ! 29: This exception does not however invalidate any other reasons why ! 30: the executable file might be covered by the GNU General Public License. */ ! 31: ! 32: ! 33: /* libgcc1 routines for the Hitachi SH cpu. ! 34: Contributed by Steve Chamberlain. ! 35: [email protected] */ ! 36: ! 37: ! 38: ! 39: long ! 40: __ashrsi3 (int a, int b) ! 41: { ! 42: switch ((b - 1)) ! 43: { ! 44: case 24 + 7: ! 45: a >>= 1; ! 46: case 24 + 6: ! 47: a >>= 1; ! 48: case 24 + 5: ! 49: a >>= 1; ! 50: case 24 + 4: ! 51: a >>= 1; ! 52: case 24 + 3: ! 53: a >>= 1; ! 54: case 24 + 2: ! 55: a >>= 1; ! 56: case 24 + 1: ! 57: a >>= 1; ! 58: case 24 + 0: ! 59: a >>= 1; ! 60: case 16 + 7: ! 61: a >>= 1; ! 62: case 16 + 6: ! 63: a >>= 1; ! 64: case 16 + 5: ! 65: a >>= 1; ! 66: case 16 + 4: ! 67: a >>= 1; ! 68: case 16 + 3: ! 69: a >>= 1; ! 70: case 16 + 2: ! 71: a >>= 1; ! 72: case 16 + 1: ! 73: a >>= 1; ! 74: case 16 + 0: ! 75: a >>= 1; ! 76: case 8 + 7: ! 77: a >>= 1; ! 78: case 8 + 6: ! 79: a >>= 1; ! 80: case 8 + 5: ! 81: a >>= 1; ! 82: case 8 + 4: ! 83: a >>= 1; ! 84: case 8 + 3: ! 85: a >>= 1; ! 86: case 8 + 2: ! 87: a >>= 1; ! 88: case 8 + 1: ! 89: a >>= 1; ! 90: case 8 + 0: ! 91: a >>= 1; ! 92: case 0 + 7: ! 93: a >>= 1; ! 94: case 0 + 6: ! 95: a >>= 1; ! 96: case 0 + 5: ! 97: a >>= 1; ! 98: case 0 + 4: ! 99: a >>= 1; ! 100: case 0 + 3: ! 101: a >>= 1; ! 102: case 0 + 2: ! 103: a >>= 1; ! 104: case 0 + 1: ! 105: a >>= 1; ! 106: case 0 + 0: ! 107: a >>= 1;; ! 108: }; ! 109: return a; ! 110: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.