Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/h8300/fixunssfsi.c @ 0:a06113de4d67
first commit
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jul 2009 14:47:48 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a06113de4d67 |
---|---|
1 /* More subroutines needed by GCC output code on some machines. */ | |
2 /* Compile this one with gcc. */ | |
3 /* Copyright (C) 1989, 1992, 2001, 2002, 2003, 2004, 2009 | |
4 Free Software Foundation, Inc. | |
5 | |
6 This file is part of GCC. | |
7 | |
8 GCC is free software; you can redistribute it and/or modify | |
9 it under the terms of the GNU General Public License as published by | |
10 the Free Software Foundation; either version 3, or (at your option) | |
11 any later version. | |
12 | |
13 GCC is distributed in the hope that it will be useful, | |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 GNU General Public License for more details. | |
17 | |
18 Under Section 7 of GPL version 3, you are granted additional | |
19 permissions described in the GCC Runtime Library Exception, version | |
20 3.1, as published by the Free Software Foundation. | |
21 | |
22 You should have received a copy of the GNU General Public License and | |
23 a copy of the GCC Runtime Library Exception along with this program; | |
24 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
25 <http://www.gnu.org/licenses/>. */ | |
26 | |
27 /* The libgcc2.c implementation gets confused by our type setup and creates | |
28 a directly recursive call, so we do our own implementation. For | |
29 the H8/300, that's in lib1funcs.asm, for H8/300H and H8S, it's here. */ | |
30 | |
31 #ifndef __H8300__ | |
32 long __fixunssfsi (float a); | |
33 | |
34 long | |
35 __fixunssfsi (float a) | |
36 { | |
37 if (a >= (float) 32768L) | |
38 return (long) (a - 32768L) + 32768L; | |
39 return (long) a; | |
40 } | |
41 #endif |