annotate libgcc/config/darwin-64.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Functions shipped in the ppc64 and x86_64 version of libgcc_s.1.dylib
kono
parents:
diff changeset
2 in older Mac OS X versions, preserved for backwards compatibility.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
3 Copyright (C) 2006-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
8 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
9 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
10 version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
15 for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 Under Section 7 of GPL version 3, you are granted additional
kono
parents:
diff changeset
18 permissions described in the GCC Runtime Library Exception, version
kono
parents:
diff changeset
19 3.1, as published by the Free Software Foundation.
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 You should have received a copy of the GNU General Public License and
kono
parents:
diff changeset
22 a copy of the GCC Runtime Library Exception along with this program;
kono
parents:
diff changeset
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
kono
parents:
diff changeset
24 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 #if defined (__ppc64__) || defined (__x86_64__)
kono
parents:
diff changeset
27 /* Many of these functions have probably never been used by anyone
kono
parents:
diff changeset
28 anywhere on these targets, but it's hard to prove this, so they're defined
kono
parents:
diff changeset
29 here. None are actually necessary, as demonstrated below by defining
kono
parents:
diff changeset
30 each function using the operation it implements. */
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 typedef long DI;
kono
parents:
diff changeset
33 typedef unsigned long uDI;
kono
parents:
diff changeset
34 typedef int SI;
kono
parents:
diff changeset
35 typedef unsigned int uSI;
kono
parents:
diff changeset
36 typedef int word_type __attribute__ ((mode (__word__)));
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 DI __ashldi3 (DI x, word_type c);
kono
parents:
diff changeset
39 DI __ashrdi3 (DI x, word_type c);
kono
parents:
diff changeset
40 int __clzsi2 (uSI x);
kono
parents:
diff changeset
41 word_type __cmpdi2 (DI x, DI y);
kono
parents:
diff changeset
42 int __ctzsi2 (uSI x);
kono
parents:
diff changeset
43 DI __divdi3 (DI x, DI y);
kono
parents:
diff changeset
44 uDI __lshrdi3 (uDI x, word_type c);
kono
parents:
diff changeset
45 DI __moddi3 (DI x, DI y);
kono
parents:
diff changeset
46 DI __muldi3 (DI x, DI y);
kono
parents:
diff changeset
47 DI __negdi2 (DI x);
kono
parents:
diff changeset
48 int __paritysi2 (uSI x);
kono
parents:
diff changeset
49 int __popcountsi2 (uSI x);
kono
parents:
diff changeset
50 word_type __ucmpdi2 (uDI x, uDI y);
kono
parents:
diff changeset
51 uDI __udivdi3 (uDI x, uDI y);
kono
parents:
diff changeset
52 uDI __udivmoddi4 (uDI x, uDI y, uDI *r);
kono
parents:
diff changeset
53 uDI __umoddi3 (uDI x, uDI y);
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 DI __ashldi3 (DI x, word_type c) { return x << c; }
kono
parents:
diff changeset
56 DI __ashrdi3 (DI x, word_type c) { return x >> c; }
kono
parents:
diff changeset
57 int __clzsi2 (uSI x) { return __builtin_clz (x); }
kono
parents:
diff changeset
58 word_type __cmpdi2 (DI x, DI y) { return x < y ? 0 : x == y ? 1 : 2; }
kono
parents:
diff changeset
59 int __ctzsi2 (uSI x) { return __builtin_ctz (x); }
kono
parents:
diff changeset
60 DI __divdi3 (DI x, DI y) { return x / y; }
kono
parents:
diff changeset
61 uDI __lshrdi3 (uDI x, word_type c) { return x >> c; }
kono
parents:
diff changeset
62 DI __moddi3 (DI x, DI y) { return x % y; }
kono
parents:
diff changeset
63 DI __muldi3 (DI x, DI y) { return x * y; }
kono
parents:
diff changeset
64 DI __negdi2 (DI x) { return -x; }
kono
parents:
diff changeset
65 int __paritysi2 (uSI x) { return __builtin_parity (x); }
kono
parents:
diff changeset
66 int __popcountsi2 (uSI x) { return __builtin_popcount (x); }
kono
parents:
diff changeset
67 word_type __ucmpdi2 (uDI x, uDI y) { return x < y ? 0 : x == y ? 1 : 2; }
kono
parents:
diff changeset
68 uDI __udivdi3 (uDI x, uDI y) { return x / y; }
kono
parents:
diff changeset
69 uDI __udivmoddi4 (uDI x, uDI y, uDI *r) { *r = x % y; return x / y; }
kono
parents:
diff changeset
70 uDI __umoddi3 (uDI x, uDI y) { return x % y; }
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 #endif /* __ppc64__ || __x86_64__ */