OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [darwin-64.c] - Blame information for rev 868

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/* Functions shipped in the ppc64 and x86_64 version of libgcc_s.1.dylib
2
   in older Mac OS X versions, preserved for backwards compatibility.
3
   Copyright (C) 2006  Free Software Foundation, Inc.
4
 
5
This file is part of GCC.
6
 
7
GCC is free software; you can redistribute it and/or modify it under
8
the terms of the GNU General Public License as published by the Free
9
Software Foundation; either version 2, or (at your option) any later
10
version.
11
 
12
In addition to the permissions in the GNU General Public License, the
13
Free Software Foundation gives you unlimited permission to link the
14
compiled version of this file into combinations with other programs,
15
and to distribute those combinations without any restriction coming
16
from the use of this file.  (The General Public License restrictions
17
do apply in other respects; for example, they cover modification of
18
the file, and distribution when not linked into a combine
19
executable.)
20
 
21
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
22
WARRANTY; without even the implied warranty of MERCHANTABILITY or
23
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
for more details.
25
 
26
You should have received a copy of the GNU General Public License
27
along with GCC; see the file COPYING.  If not, write to the Free
28
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
29
02110-1301, USA.  */
30
 
31
#if defined (__ppc64__) || defined (__x86_64__)
32
/* Many of these functions have probably never been used by anyone
33
   anywhere on these targets, but it's hard to prove this, so they're defined
34
   here.  None are actually necessary, as demonstrated below by defining
35
   each function using the operation it implements.  */
36
 
37
typedef long DI;
38
typedef unsigned long uDI;
39
typedef int SI;
40
typedef unsigned int uSI;
41
typedef int word_type __attribute__ ((mode (__word__)));
42
 
43
DI __ashldi3 (DI x, word_type c);
44
DI __ashrdi3 (DI x, word_type c);
45
int __clzsi2 (uSI x);
46
word_type __cmpdi2 (DI x, DI y);
47
int __ctzsi2 (uSI x);
48
DI __divdi3 (DI x, DI y);
49
uDI __lshrdi3 (uDI x, word_type c);
50
DI __moddi3 (DI x, DI y);
51
DI __muldi3 (DI x, DI y);
52
DI __negdi2 (DI x);
53
int __paritysi2 (uSI x);
54
int __popcountsi2 (uSI x);
55
word_type __ucmpdi2 (uDI x, uDI y);
56
uDI __udivdi3 (uDI x, uDI y);
57
uDI __udivmoddi4 (uDI x, uDI y, uDI *r);
58
uDI __umoddi3 (uDI x, uDI y);
59
 
60
DI __ashldi3 (DI x, word_type c) { return x << c; }
61
DI __ashrdi3 (DI x, word_type c) { return x >> c; }
62
int __clzsi2 (uSI x) { return __builtin_clz (x); }
63
word_type __cmpdi2 (DI x, DI y) { return x < y ? 0 : x == y ? 1 : 2; }
64
int __ctzsi2 (uSI x) { return __builtin_ctz (x); }
65
DI __divdi3 (DI x, DI y) { return x / y; }
66
uDI __lshrdi3 (uDI x, word_type c) { return x >> c; }
67
DI __moddi3 (DI x, DI y) { return x % y; }
68
DI __muldi3 (DI x, DI y) { return x * y; }
69
DI __negdi2 (DI x) { return -x; }
70
int __paritysi2 (uSI x) { return __builtin_parity (x); }
71
int __popcountsi2 (uSI x) { return __builtin_popcount (x); }
72
word_type __ucmpdi2 (uDI x, uDI y) { return x < y ? 0 : x == y ? 1 : 2; }
73
uDI __udivdi3 (uDI x, uDI y) { return x / y; }
74
uDI __udivmoddi4 (uDI x, uDI y, uDI *r) { *r = x % y; return x / y; }
75
uDI __umoddi3 (uDI x, uDI y) { return x % y; }
76
 
77
#endif /* __ppc64__ || __x86_64__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.