Merge lp:~yvan-roux/crosstool-ng/aarch64 into lp:~linaro-toolchain-dev/crosstool-ng/linaro

Proposed by Yvan Roux
Status: Needs review
Proposed branch: lp:~yvan-roux/crosstool-ng/aarch64
Merge into: lp:~linaro-toolchain-dev/crosstool-ng/linaro
Diff against target: 22775 lines (+22239/-19) (has conflicts)
36 files modified
config/arch/aarch64.in (+13/-0)
config/binutils/binutils.in (+13/-0)
config/cc/gcc.in (+16/-2)
config/debug/gdb.in (+9/-0)
config/kernel/linux.in (+11/-0)
config/libc/eglibc.in (+13/-0)
config/libc/newlib.in (+12/-0)
contrib/linaro/build.mk (+67/-0)
contrib/linaro/doc/README.txt (+2/-2)
contrib/linaro/patches/eglibc/ports-2_16+svn19382/01-eglibc-arm-aarch64-v3.patch (+14186/-0)
contrib/linaro/patches/eglibc/ports-2_16+svn19382/02-eglibc-linaro-marcins-patches-v3.patch (+67/-0)
contrib/linaro/patches/gcc/arm-aarch64-4.7+svn191942/02-reenable-multiarch.patch (+18/-0)
contrib/linaro/patches/gcc/arm-aarch64-4.7+svn191942/link-with-cxx.patch (+15/-0)
contrib/linaro/patches/gcc/linaro-4.7-2012.10/02-reenable-multiarch.patch (+18/-0)
contrib/linaro/patches/gdb/7.6~20121001+git3e2e76a/gdb-nls.patch (+45/-0)
contrib/linaro/patches/gdb/7.6~20121001+git3e2e76a/gdb-upstream-v1-generated.patch (+362/-0)
contrib/linaro/patches/gdb/7.6~20121001+git3e2e76a/gdb-upstream-v1.patch (+6068/-0)
contrib/linaro/patches/gdb/7.6~20121001+git3e2e76a/libintl-as-lib.patch (+19/-0)
contrib/linaro/patches/gdb/7.6~20121001+git3e2e76a/lsb-headers.patch (+12/-0)
contrib/linaro/patches/gdb/7.6~20121001+git3e2e76a/lsb-readline-hacks.patch (+29/-0)
contrib/linaro/tests/patches/bison-remove-gets.patch (+17/-0)
contrib/linaro/tests/patches/tar-remove-gets.patch (+20/-0)
contrib/linaro/update-aarch64.sh (+82/-0)
samples/linaro-aarch64-linux-gnu/crosstool.config (+582/-0)
samples/linaro-aarch64-linux-gnu/reported.by (+4/-0)
samples/linaro-aarch64-none-elf/crosstool.config (+500/-0)
samples/linaro-aarch64-none-elf/reported.by (+4/-0)
samples/linaro-arm-linux-gnueabi-armv4t/crosstool.config (+3/-3)
samples/linaro-arm-linux-gnueabi/crosstool.config (+3/-3)
samples/linaro-arm-linux-gnueabihf-raspbian/crosstool.config (+3/-3)
samples/linaro-arm-linux-gnueabihf/crosstool.config (+3/-3)
samples/linaro-arm-none-eabi/crosstool.config (+3/-3)
scripts/build/arch/aarch64.sh (+11/-0)
scripts/build/cc/gcc.sh (+1/-0)
scripts/build/debug/300-gdb.sh (+4/-0)
scripts/build/libc/glibc-eglibc.sh-common (+4/-0)
Conflict adding file config/arch/aarch64.in.  Moved existing file to config/arch/aarch64.in.moved.
Text conflict in config/binutils/binutils.in
Text conflict in config/cc/gcc.in
Text conflict in config/debug/gdb.in
Text conflict in config/kernel/linux.in
Text conflict in config/libc/eglibc.in
Text conflict in config/libc/newlib.in
Text conflict in contrib/linaro/build.mk
Conflict adding file contrib/linaro/patches/eglibc.  Moved existing file to contrib/linaro/patches/eglibc.moved.
Conflict adding file contrib/linaro/patches/gdb/7.6~20121001+git3e2e76a.  Moved existing file to contrib/linaro/patches/gdb/7.6~20121001+git3e2e76a.moved.
Conflict adding file contrib/linaro/tests/patches/bison-remove-gets.patch.  Moved existing file to contrib/linaro/tests/patches/bison-remove-gets.patch.moved.
Conflict adding file contrib/linaro/tests/patches/tar-remove-gets.patch.  Moved existing file to contrib/linaro/tests/patches/tar-remove-gets.patch.moved.
Conflict adding file contrib/linaro/update-aarch64.sh.  Moved existing file to contrib/linaro/update-aarch64.sh.moved.
Conflict adding file samples/linaro-aarch64-linux-gnu.  Moved existing file to samples/linaro-aarch64-linux-gnu.moved.
Conflict adding file samples/linaro-aarch64-none-elf.  Moved existing file to samples/linaro-aarch64-none-elf.moved.
Conflict adding file scripts/build/arch/aarch64.sh.  Moved existing file to scripts/build/arch/aarch64.sh.moved.
Text conflict in scripts/build/debug/300-gdb.sh
Text conflict in scripts/build/libc/glibc-eglibc.sh-common
To merge this branch: bzr merge lp:~yvan-roux/crosstool-ng/aarch64
Reviewer Review Type Date Requested Status
Linaro Toolchain Developers Pending
Review via email: mp+128948@code.launchpad.net

Description of the change

Test build.

To post a comment you must log in.
Revision history for this message
Michael Hope (michaelh1) wrote :

cbuild has taken a snapshot of this branch at r2509 and queued it for build.

The diff against the ancestor r2448.1.27 is available at:
 http://builds.linaro.org/toolchain/snapshots/crosstool-ng-linaro-1.13.1+bzr2509~yvan-roux~aarch64.diff

and will be built on the following builders:
 i686-lucid

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: crosstool-ng-linaro-1.13.1+bzr2509~yvan-roux~aarch64
cbuild-ancestor: lp:~linaro-toolchain-dev/crosstool-ng/linaro+bzr2448.1.27
cbuild-state: check

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

Unmerged revisions

2509. By Yvan Roux

Update linaro gcc to 2012.10

2508. By Michael Hope

Don't check in parallel to make things easier to read. Use TOPDIR instead of a relative path to allow relocating.

2507. By Michael Hope

Update the check tarball with the latest versions.

2506. By Michael Hope

Fix the gmp extension. Be quieter when fetching. Add a target to
create the tarballs archive.

2505. By Michael Hope

Updated the tests to support eglibc 2.16.

2504. By Michael Hope

Override config.{guess,sub} with the updated versions when testing.

2503. By Michael Hope

Update the GCC aarch64 versions.

2502. By Michael Hope

Add basic support for linux64 64 bit builds via $HOST_ARCH.

2501. By Michael Hope

Disable python scripting in gdb.

2500. By Michael Hope

Enable GDB in the baremetal config.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'config/arch/aarch64.in'
2--- config/arch/aarch64.in 1970-01-01 00:00:00 +0000
3+++ config/arch/aarch64.in 2012-10-10 14:20:29 +0000
4@@ -0,0 +1,13 @@
5+# AArch64 specific configuration file
6+
7+## select ARCH_SUPPORTS_64
8+## select ARCH_DEFAULT_64
9+## select ARCH_SUPPORTS_BOTH_MMU
10+## select ARCH_DEFAULT_HAS_MMU
11+## select ARCH_SUPPORTS_BOTH_ENDIAN
12+## select ARCH_DEFAULT_LE
13+## select ARCH_SUPPORT_ARCH
14+## select ARCH_SUPPORT_CPU
15+##
16+## help The AArch64 architecture, as defined by:
17+## help http://www.arm.com/
18
19=== renamed file 'config/arch/aarch64.in' => 'config/arch/aarch64.in.moved'
20=== modified file 'config/binutils/binutils.in'
21--- config/binutils/binutils.in 2012-10-03 21:28:32 +0000
22+++ config/binutils/binutils.in 2012-10-10 14:20:29 +0000
23@@ -8,12 +8,21 @@
24 # Don't remove next line
25 # CT_INSERT_VERSION_BELOW
26
27+<<<<<<< TREE
28 config BINUTILS_V_2_24_PRE
29 bool
30 prompt "2.24~20120920+gitb05c76f (EXPERIMENTAL)"
31 depends on EXPERIMENTAL && ARCH_aarch64
32 select BINUTILS_2_22_or_later
33
34+=======
35+config BINUTILS_V_2_24_PRE
36+ bool
37+ prompt "2.24~20120930+gitc1d77ff (EXPERIMENTAL)"
38+ depends on EXPERIMENTAL
39+ select BINUTILS_2_22_or_later
40+
41+>>>>>>> MERGE-SOURCE
42 config BINUTILS_V_2_22
43 bool
44 prompt "2.22 (EXPERIMENTAL)"
45@@ -62,7 +71,11 @@
46 string
47 # Don't remove next line
48 # CT_INSERT_VERSION_STRING_BELOW
49+<<<<<<< TREE
50 default "2.24~20120920+gitb05c76f" if BINUTILS_V_2_24_PRE
51+=======
52+ default "2.24~20120930+gitc1d77ff" if BINUTILS_V_2_24_PRE
53+>>>>>>> MERGE-SOURCE
54 default "2.22" if BINUTILS_V_2_22
55 default "2.21.53" if BINUTILS_V_2_21_53
56 default "2.21.1a" if BINUTILS_V_2_21_1a
57
58=== modified file 'config/cc/gcc.in'
59--- config/cc/gcc.in 2012-10-03 21:28:32 +0000
60+++ config/cc/gcc.in 2012-10-10 14:20:29 +0000
61@@ -36,18 +36,27 @@
62 # Don't remove next line
63 # CT_INSERT_VERSION_BELOW
64
65-config CC_V_linaro_4_7_2012_09
66+config CC_V_linaro_4_7_2012_10
67 bool
68- prompt "linaro-4.7-2012.09 (EXPERIMENTAL)"
69+ prompt "linaro-4.7-2012.10 (EXPERIMENTAL)"
70 depends on CC_GCC_SHOW_LINARO
71 select CC_GCC_4_7
72
73+<<<<<<< TREE
74 config CC_V_arm_aarch64_4_7_PRE
75 bool
76 prompt "arm-aarch64-4.7+svn191987 (EXPERIMENTAL)"
77 depends on EXPERIMENTAL && ARCH_aarch64
78 select CC_GCC_4_7
79
80+=======
81+config CC_V_aarch64_4_7_PRE
82+ bool
83+ prompt "arm-aarch64-4.7+svn191942 (EXPERIMENTAL)"
84+ depends on EXPERIMENTAL
85+ select CC_GCC_4_7
86+
87+>>>>>>> MERGE-SOURCE
88 config CC_V_4_7_0
89 bool
90 prompt "4.7.0 (EXPERIMENTAL)"
91@@ -351,8 +360,13 @@
92 string
93 # Don't remove next line
94 # CT_INSERT_VERSION_STRING_BELOW
95+<<<<<<< TREE
96 default "arm-aarch64-4.7+svn191987" if CC_V_arm_aarch64_4_7_PRE
97 default "linaro-4.7-2012.09" if CC_V_linaro_4_7_2012_09
98+=======
99+ default "linaro-4.7-2012.10" if CC_V_linaro_4_7_2012_10
100+ default "arm-aarch64-4.7+svn191942" if CC_V_aarch64_4_7_PRE
101+>>>>>>> MERGE-SOURCE
102 default "4.7.0" if CC_V_4_7_0
103 default "4.6.2" if CC_V_4_6_2
104 default "4.6.1" if CC_V_4_6_1
105
106=== modified file 'config/debug/gdb.in'
107--- config/debug/gdb.in 2012-10-04 00:15:31 +0000
108+++ config/debug/gdb.in 2012-10-10 14:20:29 +0000
109@@ -34,12 +34,21 @@
110 # Don't remove next line
111 # CT_INSERT_VERSION_BELOW
112
113+<<<<<<< TREE
114 config GDB_V_7_6_PRE
115 bool
116 prompt "7.6~20121001+git3e2e76a (EXPERIMENTAL)"
117 depends on EXPERIMENTAL && ARCH_aarch64
118 select GDB_7_0_or_later
119
120+=======
121+config GDB_V_7_6_PRE
122+ bool
123+ prompt "7.6~20121001+git3e2e76a (EXPERIMENTAL)"
124+ depends on EXPERIMENTAL
125+ select GDB_7_0_or_later
126+
127+>>>>>>> MERGE-SOURCE
128 config GDB_V_linaro_7_5_2012_09
129 bool
130 prompt "linaro-7.5-2012.09 (EXPERIMENTAL)"
131
132=== modified file 'config/kernel/linux.in'
133--- config/kernel/linux.in 2012-10-03 02:41:53 +0000
134+++ config/kernel/linux.in 2012-10-10 14:20:29 +0000
135@@ -26,11 +26,18 @@
136 # Don't remove next line
137 # CT_INSERT_VERSION_BELOW
138
139+<<<<<<< TREE
140 config KERNEL_V_3_6_0_PRE
141 bool
142 prompt "aarch64-cmarinas-3.6.0~20121003+gite7317a1 (EXPERIMENTAL)"
143 depends on EXPERIMENTAL && ARCH_aarch64
144
145+=======
146+config KERNEL_V_3_6_0_PRE
147+ bool
148+ prompt "3.6.0 PRE"
149+
150+>>>>>>> MERGE-SOURCE
151 config KERNEL_V_3_1_1
152 bool
153 prompt "3.1.1"
154@@ -132,7 +139,11 @@
155 string
156 # Don't remove next line
157 # CT_INSERT_VERSION_STRING_BELOW
158+<<<<<<< TREE
159 default "aarch64-cmarinas-3.6.0~20121003+gite7317a1" if KERNEL_V_3_6_0_PRE
160+=======
161+ default "3.6.0~20120914+git78e642a" if KERNEL_V_3_6_0_PRE
162+>>>>>>> MERGE-SOURCE
163 default "3.1.1" if KERNEL_V_3_1_1
164 default "3.1" if KERNEL_V_3_1
165 default "3.0.9" if KERNEL_V_3_0_9
166
167=== modified file 'config/libc/eglibc.in'
168--- config/libc/eglibc.in 2012-10-03 21:28:32 +0000
169+++ config/libc/eglibc.in 2012-10-10 14:20:29 +0000
170@@ -18,12 +18,21 @@
171 # Don't remove next line
172 # CT_INSERT_VERSION_BELOW
173
174+<<<<<<< TREE
175 config LIBC_EGLIBC_V_2_16_PRE
176 bool
177 prompt "2.16+svn20393 (EXPERIMENTAL)"
178 depends on EXPERIMENTAL && ARCH_aarch64
179 select LIBC_EGLIBC_2_14_or_later
180
181+=======
182+config LIBC_EGLIBC_V_2_16_PRE
183+ bool
184+ prompt "2_16 Pre"
185+ depends on EXPERIMENTAL
186+ select LIBC_EGLIBC_2_14_or_later
187+
188+>>>>>>> MERGE-SOURCE
189 config LIBC_EGLIBC_V_2_14
190 bool
191 prompt "2_14"
192@@ -89,7 +98,11 @@
193 string
194 # Don't remove next line
195 # CT_INSERT_VERSION_STRING_BELOW
196+<<<<<<< TREE
197 default "2.16+svn20393" if LIBC_EGLIBC_V_2_16_PRE
198+=======
199+ default "2_16+svn19382" if LIBC_EGLIBC_V_2_16_PRE
200+>>>>>>> MERGE-SOURCE
201 default "2_14" if LIBC_EGLIBC_V_2_14
202 default "2_13" if LIBC_EGLIBC_V_2_13
203 default "2_12" if LIBC_EGLIBC_V_2_12
204
205=== modified file 'config/libc/newlib.in'
206--- config/libc/newlib.in 2012-10-03 00:40:59 +0000
207+++ config/libc/newlib.in 2012-10-10 14:20:29 +0000
208@@ -17,11 +17,19 @@
209 # Don't remove next line
210 # CT_INSERT_VERSION_BELOW
211
212+<<<<<<< TREE
213 config LIBC_NEWLIB_V_1_21_PRE
214 bool
215 prompt "1.21~20121003+git0332354 (EXPERIMENTAL)"
216 depends on EXPERIMENTAL && ARCH_aarch64
217
218+=======
219+config LIBC_NEWLIB_V_1_21_PRE
220+ bool
221+ prompt "1.21~20120927+gitb44fba4 (EXPERIMENTAL)"
222+ depends on EXPERIMENTAL
223+
224+>>>>>>> MERGE-SOURCE
225 config LIBC_NEWLIB_V_1_19_0
226 bool
227 prompt "1.19.0 (EXPERIMENTAL)"
228@@ -59,7 +67,11 @@
229 prompt "use CVS tag" if LIBC_NEWLIB_CVS
230 # Don't remove next line
231 # CT_INSERT_VERSION_STRING_BELOW
232+<<<<<<< TREE
233 default "1.21~20121003+git0332354" if LIBC_NEWLIB_V_1_21_PRE
234+=======
235+ default "1.21~20120927+gitb44fba4" if LIBC_NEWLIB_V_1_21_PRE
236+>>>>>>> MERGE-SOURCE
237 default "1.19.0" if LIBC_NEWLIB_V_1_19_0
238 default "1.18.0" if LIBC_NEWLIB_V_1_18_0
239 default "1.17.0" if LIBC_NEWLIB_V_1_17_0
240
241=== modified file 'contrib/linaro/build.mk'
242--- contrib/linaro/build.mk 2012-10-04 03:00:29 +0000
243+++ contrib/linaro/build.mk 2012-10-10 14:20:29 +0000
244@@ -7,6 +7,7 @@
245
246 # Top level product
247 PRODUCT ?= gcc-linaro
248+<<<<<<< TREE
249 # Targets to build. See samples/linaro-%. As at 2012-09 these
250 # include arm-linux-gnueabihf, arm-none-eabi, and
251 # arm-linux-gnueabihf-raspbian.
252@@ -14,6 +15,12 @@
253 # The variants to build including Linux hosted, Windows hosted, and
254 # just the device runtime
255 HOSTS = linux runtime win32
256+=======
257+# Target this build compiles for
258+TARGET ?= $(firstword $(TARGETS))
259+# Host OS the toolchain will run on
260+HOST ?= linux
261+>>>>>>> MERGE-SOURCE
262 # Major version of the toolchain. Pulled automatically from the
263 # .config file
264 VERSION = $(shell awk 'BEGIN {FS="[=\"-]"}; /^CT_CC_VERSION/ {print $$5}' \
265@@ -31,8 +38,21 @@
266 # Tarball/directory name
267 DIRNAME = $(FULL)_$(HOST)
268
269+<<<<<<< TREE
270 # The architecture of the build machine. Used for picking the runtime and others.
271 BUILD_ARCH = linux
272+=======
273+# The architecture of the host. Used for picking the runtime and others.
274+HOST_ARCH = linux
275+
276+# Targets to build. See samples/linaro-%. As at 2012-09 these
277+# include arm-linux-gnueabihf, arm-none-eabi, and
278+# arm-linux-gnueabihf-raspbian.
279+TARGETS = aarch64-none-elf aarch64-linux-gnu
280+# The variants to build including Linux hosted, Windows hosted, and
281+# just the device runtime
282+HOSTS = $(HOST_ARCH) runtime
283+>>>>>>> MERGE-SOURCE
284
285 -include local.mk
286
287@@ -91,15 +111,28 @@
288 $(TOP)/contrib/linaro/lsb/make-lsb.sh $(@D)
289
290 # Build the Linux version using the LSB compilers
291+<<<<<<< TREE
292 $(stamp)%-$(BUILD_ARCH): $(BUILD)/lsb/env.sh
293+=======
294+$(stamp)%-$(HOST_ARCH): $(BUILD)/lsb/env.sh
295+>>>>>>> MERGE-SOURCE
296 . $< && \
297 PATH=$(TOP):$$PATH \
298+<<<<<<< TREE
299 $(MAKE) -f contrib/linaro/build.mk HOST=$(BUILD_ARCH) TARGET=$* go
300+=======
301+ $(MAKE) -f contrib/linaro/build.mk HOST=$(HOST_ARCH) TARGET=$* go
302+>>>>>>> MERGE-SOURCE
303 touch $@
304
305 # Build the win32 version using the just-built Linux compiler
306+<<<<<<< TREE
307 $(stamp)%-win32: $(stamp)%-$(BUILD_ARCH)
308 PATH=$(TOP):$(TOP)/$(BUILD)/$*-$(BUILD_ARCH)/install/bin:$$PATH \
309+=======
310+$(stamp)%-win32: $(stamp)%-$(HOST_ARCH)
311+ PATH=$(TOP):$(TOP)/$(BUILD)/$*-$(HOST_ARCH)/install/bin:$$PATH \
312+>>>>>>> MERGE-SOURCE
313 $(MAKE) -f contrib/linaro/build.mk HOST=win32 TARGET=$* EXE=.exe go
314 touch $@
315
316@@ -108,7 +141,11 @@
317 touch $@
318
319 # Pull the runtime from the just-built Linux compiler
320+<<<<<<< TREE
321 $(stamp)%-runtime: $(stamp)%-$(BUILD_ARCH)
322+=======
323+$(stamp)%-runtime: $(stamp)%-$(HOST_ARCH)
324+>>>>>>> MERGE-SOURCE
325 $(MAKE) -f contrib/linaro/build.mk HOST=runtime TARGET=$* go-runtime
326 touch $@
327
328@@ -117,7 +154,11 @@
329 touch $@
330
331 # Build the tests with the just-built Linux compiler
332+<<<<<<< TREE
333 $(stamp)%-check: $(stamp)%-$(BUILD_ARCH)
334+=======
335+$(stamp)%-check: $(stamp)%-$(HOST_ARCH)
336+>>>>>>> MERGE-SOURCE
337 $(MAKE) -f contrib/linaro/build.mk HOST=check TARGET=$* go-check
338 touch $@
339
340@@ -126,13 +167,23 @@
341 rm -rf $(HBUILD)
342 cp -a contrib/linaro/tests $(HBUILD)
343 # Build the basic tests
344+<<<<<<< TREE
345 PATH=$(wildcard $(TOP)/$(BUILD)/$(TARGET)-$(BUILD_ARCH)/$(PRODUCT)-*/bin):$(PATH) \
346+=======
347+ PATH=$(wildcard $(TOP)/$(BUILD)/$(TARGET)-$(HOST_ARCH)/$(PRODUCT)-*/bin):$(PATH) \
348+>>>>>>> MERGE-SOURCE
349 $(MAKE) -C $(HBUILD)/misc clean all CROSS_COMPILE=$(TRIPLET)-
350 # Build a range of programs
351 rm -rf $(HBUILD)/tarballs
352+<<<<<<< TREE
353 tar xaf $< -C $(HBUILD)
354 PATH=$(wildcard $(TOP)/$(BUILD)/$(TARGET)-$(BUILD_ARCH)/$(PRODUCT)-*/bin):$(PATH) \
355 $(MAKE) -C $(HBUILD) clean all TARGET=$(TRIPLET) TOPDIR=$(TOP) -k
356+=======
357+ tar xaf $< -C $(HBUILD)
358+ PATH=$(wildcard $(TOP)/$(BUILD)/$(TARGET)-$(HOST_ARCH)/$(PRODUCT)-*/bin):$(PATH) \
359+ $(MAKE) -C $(HBUILD) clean all TARGET=$(TRIPLET) TOPDIR=$(TOP) -k
360+>>>>>>> MERGE-SOURCE
361
362 # Fetch a tarball of test tarballs
363 $(BUILD)/check/tarballs/%:
364@@ -143,7 +194,11 @@
365 go-runtime:
366 rm -rf $(FINAL)
367 $(MAKE) -f contrib/linaro/build.mk copy-runtime RUNTIME_SRC=lib RUNTIME_TUPLE=$(TRIPLET)
368+<<<<<<< TREE
369 for i in $(wildcard $(BUILD)/$(TARGET)-$(BUILD_ARCH)/install/*-*/lib/arm-*); do \
370+=======
371+ for i in $(wildcard $(BUILD)/$(TARGET)-$(HOST_ARCH)/install/*-*/lib/arm-*); do \
372+>>>>>>> MERGE-SOURCE
373 $(MAKE) -f contrib/linaro/build.mk copy-runtime RUNTIME_SRC=lib/`basename $$i` RUNTIME_TUPLE=`basename $$i`; \
374 done
375 cd $(HBUILD) && tar cf $(DIRNAME).tar $(DIRNAME)
376@@ -152,7 +207,11 @@
377 copy-runtime:
378 mkdir -p $(FINAL)/{lib,usr/lib}/$(RUNTIME_TUPLE)
379 # Pull across all libraries
380+<<<<<<< TREE
381 cp -af $(BUILD)/$(TARGET)-$(BUILD_ARCH)/install/*-*/$(RUNTIME_SRC)/*.so* $(FINAL)/usr/lib/$(RUNTIME_TUPLE)
382+=======
383+ cp -af $(BUILD)/$(TARGET)-$(HOST_ARCH)/install/*-*/$(RUNTIME_SRC)/*.so* $(FINAL)/usr/lib/$(RUNTIME_TUPLE)
384+>>>>>>> MERGE-SOURCE
385 # Remove all sonames with no version
386 rm -f $(FINAL)/usr/lib/$(RUNTIME_TUPLE)/*.so
387 # Move libgcc
388@@ -191,7 +250,11 @@
389 --build $(INSTALLER)/$(TARGET).mpi
390
391 # Create a tarball and a xz compressed one for testing
392+<<<<<<< TREE
393 $(stamp)$(TARGET)-$(BUILD_ARCH)-archive: $(dstamp)fixup
394+=======
395+$(stamp)$(TARGET)-$(HOST_ARCH)-archive: $(dstamp)fixup
396+>>>>>>> MERGE-SOURCE
397 cd $(HBUILD) && tar cf $(DIRNAME).tar $(DIRNAME)
398 bzip2 -fk9 $(HBUILD)/$(DIRNAME).tar
399 xz -fk9 $(HBUILD)/$(DIRNAME).tar
400@@ -312,7 +375,11 @@
401 endif
402
403 # Build the Linux specific configuration
404+<<<<<<< TREE
405 $(BUILD)/$(TARGET)-$(BUILD_ARCH)/.config: ct-ng
406+=======
407+$(BUILD)/$(TARGET)-$(HOST_ARCH)/.config: ct-ng
408+>>>>>>> MERGE-SOURCE
409 mkdir -p $(@D)
410 cd $(@D) && echo | ct-ng linaro-$(TARGET)
411 for i in $(LINUX_ADD); do \
412
413=== modified file 'contrib/linaro/doc/README.txt'
414--- contrib/linaro/doc/README.txt 2012-09-14 09:10:42 +0000
415+++ contrib/linaro/doc/README.txt 2012-10-10 14:20:29 +0000
416@@ -1,4 +1,4 @@
417-Linaro Toolchain 2012.09
418+Linaro Toolchain 2012.10
419 ========================
420
421 This package contains pre-built versions of Linaro GCC and Linaro GDB
422@@ -19,7 +19,7 @@
423
424 What's included
425 ---------------
426- * Linaro GCC 4.7 2012.09
427+ * Linaro GCC 4.7 2012.10
428 * Linaro GDB 7.5 2012.09
429 * A statically linked gdbserver in arm-linux-gnueabihf/debug-root
430 * A system root
431
432=== added directory 'contrib/linaro/patches/eglibc'
433=== renamed directory 'contrib/linaro/patches/eglibc' => 'contrib/linaro/patches/eglibc.moved'
434=== added directory 'contrib/linaro/patches/eglibc/ports-2_16+svn19382'
435=== added file 'contrib/linaro/patches/eglibc/ports-2_16+svn19382/01-eglibc-arm-aarch64-v3.patch'
436--- contrib/linaro/patches/eglibc/ports-2_16+svn19382/01-eglibc-arm-aarch64-v3.patch 1970-01-01 00:00:00 +0000
437+++ contrib/linaro/patches/eglibc/ports-2_16+svn19382/01-eglibc-arm-aarch64-v3.patch 2012-10-10 14:20:29 +0000
438@@ -0,0 +1,14186 @@
439+---
440+ ports/data/localplt-aarch64-linux-gnu.data | 15
441+ ports/sysdeps/aarch64/Implies | 6
442+ ports/sysdeps/aarch64/Makefile | 21
443+ ports/sysdeps/aarch64/__longjmp.S | 103
444+ ports/sysdeps/aarch64/backtrace.c | 1
445+ ports/sysdeps/aarch64/bits/atomic.h | 110
446+ ports/sysdeps/aarch64/bits/endian.h | 31
447+ ports/sysdeps/aarch64/bits/fenv.h | 62
448+ ports/sysdeps/aarch64/bits/link.h | 61
449+ ports/sysdeps/aarch64/bits/linkmap.h | 8
450+ ports/sysdeps/aarch64/bits/mathdef.h | 52
451+ ports/sysdeps/aarch64/bits/setjmp.h | 34
452+ ports/sysdeps/aarch64/bsd-_setjmp.S | 1
453+ ports/sysdeps/aarch64/bsd-setjmp.S | 1
454+ ports/sysdeps/aarch64/configure | 120
455+ ports/sysdeps/aarch64/configure.in | 27
456+ ports/sysdeps/aarch64/crti.S | 91
457+ ports/sysdeps/aarch64/crtn.S | 47
458+ ports/sysdeps/aarch64/dl-irel.h | 36
459+ ports/sysdeps/aarch64/dl-link.sym | 15
460+ ports/sysdeps/aarch64/dl-machine.h | 390 +
461+ ports/sysdeps/aarch64/dl-sysdep.h | 24
462+ ports/sysdeps/aarch64/dl-tls.h | 31
463+ ports/sysdeps/aarch64/dl-tlsdesc.S | 330
464+ ports/sysdeps/aarch64/dl-tlsdesc.h | 72
465+ ports/sysdeps/aarch64/dl-trampoline.S | 277
466+ ports/sysdeps/aarch64/fclrexcpt.c | 36
467+ ports/sysdeps/aarch64/fedisblxcpt.c | 41
468+ ports/sysdeps/aarch64/feenablxcpt.c | 41
469+ ports/sysdeps/aarch64/fegetenv.c | 34
470+ ports/sysdeps/aarch64/fegetexcept.c | 29
471+ ports/sysdeps/aarch64/fegetround.c | 29
472+ ports/sysdeps/aarch64/feholdexcpt.c | 49
473+ ports/sysdeps/aarch64/fesetenv.c | 62
474+ ports/sysdeps/aarch64/fesetround.c | 48
475+ ports/sysdeps/aarch64/feupdateenv.c | 39
476+ ports/sysdeps/aarch64/fgetexcptflg.c | 34
477+ ports/sysdeps/aarch64/fpu-control.h | 79
478+ ports/sysdeps/aarch64/fraiseexcpt.c | 93
479+ ports/sysdeps/aarch64/fsetexcptflg.c | 40
480+ ports/sysdeps/aarch64/ftestexcept.c | 33
481+ ports/sysdeps/aarch64/jmpbuf-offsets.h | 45
482+ ports/sysdeps/aarch64/jmpbuf-unwind.h | 47
483+ ports/sysdeps/aarch64/ldsodefs.h | 49
484+ ports/sysdeps/aarch64/libc-tls.c | 33
485+ ports/sysdeps/aarch64/libm-test-ulps | 3350 ++++++++++
486+ ports/sysdeps/aarch64/memusage.h | 22
487+ ports/sysdeps/aarch64/nptl/Makefile | 23
488+ ports/sysdeps/aarch64/nptl/pthread_spin_lock.c | 30
489+ ports/sysdeps/aarch64/nptl/pthread_spin_trylock.c | 28
490+ ports/sysdeps/aarch64/nptl/pthreaddef.h | 47
491+ ports/sysdeps/aarch64/nptl/tcb-offsets.sym | 7
492+ ports/sysdeps/aarch64/nptl/tls.h | 143
493+ ports/sysdeps/aarch64/preconfigure | 14
494+ ports/sysdeps/aarch64/setjmp.S | 52
495+ ports/sysdeps/aarch64/shlib-versions | 2
496+ ports/sysdeps/aarch64/soft-fp/Makefile | 3
497+ ports/sysdeps/aarch64/soft-fp/e_sqrtl.c | 38
498+ ports/sysdeps/aarch64/soft-fp/sfp-machine.h | 70
499+ ports/sysdeps/aarch64/stackinfo.h | 34
500+ ports/sysdeps/aarch64/start.S | 95
501+ ports/sysdeps/aarch64/sysdep.h | 68
502+ ports/sysdeps/aarch64/tls-macros.h | 36
503+ ports/sysdeps/aarch64/tlsdesc.c | 155
504+ ports/sysdeps/aarch64/tlsdesc.sym | 15
505+ ports/sysdeps/aarch64/tst-audit.h | 26
506+ ports/sysdeps/unix/aarch64/sysdep.S | 65
507+ ports/sysdeps/unix/aarch64/sysdep.h | 33
508+ ports/sysdeps/unix/sysv/linux/aarch64/Implies | 2
509+ ports/sysdeps/unix/sysv/linux/aarch64/Makefile | 43
510+ ports/sysdeps/unix/sysv/linux/aarch64/Versions | 6
511+ ports/sysdeps/unix/sysv/linux/aarch64/__read_tp.S | 26
512+ ports/sysdeps/unix/sysv/linux/aarch64/__start_context.S | 59
513+ ports/sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h | 340 +
514+ ports/sysdeps/unix/sysv/linux/aarch64/bits/libc-vdso.h | 16
515+ ports/sysdeps/unix/sysv/linux/aarch64/bits/mman.h | 116
516+ ports/sysdeps/unix/sysv/linux/aarch64/clone.S | 101
517+ ports/sysdeps/unix/sysv/linux/aarch64/configure | 20
518+ ports/sysdeps/unix/sysv/linux/aarch64/configure.in | 20
519+ ports/sysdeps/unix/sysv/linux/aarch64/getcontext.S | 106
520+ ports/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c | 40
521+ ports/sysdeps/unix/sysv/linux/aarch64/init-first.c | 44
522+ ports/sysdeps/unix/sysv/linux/aarch64/ioctl.S | 17
523+ ports/sysdeps/unix/sysv/linux/aarch64/kernel-features.h | 46
524+ ports/sysdeps/unix/sysv/linux/aarch64/kernel_rt_sigframe.h | 10
525+ ports/sysdeps/unix/sysv/linux/aarch64/ldconfig.h | 10
526+ ports/sysdeps/unix/sysv/linux/aarch64/libc-__read_tp.S | 4
527+ ports/sysdeps/unix/sysv/linux/aarch64/makecontext.c | 94
528+ ports/sysdeps/unix/sysv/linux/aarch64/mmap.c | 16
529+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/bits/local_lim.h | 100
530+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h | 170
531+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/bits/semaphore.h | 36
532+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/clone.S | 6
533+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/createthread.c | 24
534+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/fork.c | 32
535+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/ld.abilist | 12
536+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libBrokenLocale.abilist | 3
537+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libanl.abilist | 6
538+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist | 2076 ++++++
539+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libcrypt.abilist | 9
540+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libdl.abilist | 11
541+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libm.abilist | 396 +
542+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libnsl.abilist | 123
543+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist | 225
544+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libresolv.abilist | 93
545+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/librt.abilist | 42
546+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libthread_db.abilist | 42
547+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/libutil.abilist | 8
548+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h | 284
549+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/not-cancel.h | 106
550+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/pt-vfork.S | 35
551+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/pthread_once.c | 91
552+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h | 206
553+ ports/sysdeps/unix/sysv/linux/aarch64/nptl/vfork.S | 38
554+ ports/sysdeps/unix/sysv/linux/aarch64/profil-counter.h | 20
555+ ports/sysdeps/unix/sysv/linux/aarch64/setcontext.S | 84
556+ ports/sysdeps/unix/sysv/linux/aarch64/sigaction.c | 82
557+ ports/sysdeps/unix/sysv/linux/aarch64/swapcontext.S | 100
558+ ports/sysdeps/unix/sysv/linux/aarch64/sys/elf.h | 25
559+ ports/sysdeps/unix/sysv/linux/aarch64/sys/procfs.h | 138
560+ ports/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h | 55
561+ ports/sysdeps/unix/sysv/linux/aarch64/sys/user.h | 18
562+ ports/sysdeps/unix/sysv/linux/aarch64/syscall.S | 45
563+ ports/sysdeps/unix/sysv/linux/aarch64/syscalls.list | 34
564+ ports/sysdeps/unix/sysv/linux/aarch64/sysdep.S | 36
565+ ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h | 403 +
566+ ports/sysdeps/unix/sysv/linux/aarch64/ucontext-internal.h | 30
567+ ports/sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym | 54
568+ ports/sysdeps/unix/sysv/linux/aarch64/vfork.S | 50
569+ 129 files changed, 13667 insertions(+)
570+
571+--- /dev/null
572++++ libc/ports/data/localplt-aarch64-linux-gnu.data
573+@@ -0,0 +1,15 @@
574++# See scripts/check-localplt.awk for how this file is processed.
575++# PLT use is required for the malloc family and for matherr because
576++# users can define their own functions and have library internals call them.
577++libc.so: calloc
578++libc.so: free
579++libc.so: malloc
580++libc.so: memalign
581++libc.so: realloc
582++libc.so: __signbit
583++libc.so: __signbitl
584++libm.so: matherr
585++libm.so: __signbit
586++libm.so: __signbitf
587++libm.so: __signbitl
588++libpthread.so: __errno_location
589+--- /dev/null
590++++ libc/ports/sysdeps/aarch64/Implies
591+@@ -0,0 +1,6 @@
592++wordsize-64
593++ieee754/ldbl-128
594++ieee754/dbl-64/wordsize-64
595++ieee754/dbl-64
596++ieee754/flt-32
597++aarch64/soft-fp
598+--- /dev/null
599++++ libc/ports/sysdeps/aarch64/Makefile
600+@@ -0,0 +1,21 @@
601++long-double-fcts = yes
602++
603++ifeq ($(subdir),debug)
604++CFLAGS-backtrace.c += -funwind-tables
605++CFLAGS-tst-backtrace2.c += -funwind-tables
606++CFLAGS-tst-backtrace3.c += -funwind-tables
607++CFLAGS-tst-backtrace4.c += -funwind-tables
608++CFLAGS-tst-backtrace5.c += -funwind-tables
609++CFLAGS-tst-backtrace6.c += -funwind-tables
610++endif
611++
612++ifeq ($(subdir),elf)
613++sysdep-dl-routines += tlsdesc dl-tlsdesc
614++sysdep_routines += tlsdesc dl-tlsdesc
615++sysdep-rtld-routines += tlsdesc dl-tlsdesc
616++gen-as-const-headers += dl-link.sym
617++endif
618++
619++ifeq ($(subdir),csu)
620++gen-as-const-headers += tlsdesc.sym
621++endif
622+--- /dev/null
623++++ libc/ports/sysdeps/aarch64/__longjmp.S
624+@@ -0,0 +1,103 @@
625++/* Copyright (C) 1997, 1998, 2009 Free Software Foundation, Inc.
626++ Copyright (C) 2009-2012.
627++
628++ This file is part of the GNU C Library.
629++
630++ The GNU C Library is free software; you can redistribute it and/or
631++ modify it under the terms of the GNU Lesser General Public License as
632++ published by the Free Software Foundation; either version 2.1 of the
633++ License, or (at your option) any later version.
634++
635++ The GNU C Library is distributed in the hope that it will be useful,
636++ but WITHOUT ANY WARRANTY; without even the implied warranty of
637++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
638++ Lesser General Public License for more details.
639++
640++ You should have received a copy of the GNU Lesser General Public
641++ License along with the GNU C Library. If not, see
642++ <http://www.gnu.org/licenses/>. */
643++
644++#include <sysdep.h>
645++#include <jmpbuf-offsets.h>
646++
647++/* __longjmp(jmpbuf, val) */
648++
649++ENTRY (__longjmp)
650++#ifdef CHECK_SP
651++ ldr x5, [x0, #JB_SP<<3]
652++ CHECK_SP (x5)
653++#endif
654++ cfi_def_cfa(x0, 0)
655++ cfi_offset(x19, JB_X19<<3)
656++ cfi_offset(x20, JB_X20<<3)
657++ cfi_offset(x21, JB_X21<<3)
658++ cfi_offset(x22, JB_X22<<3)
659++ cfi_offset(x23, JB_X23<<3)
660++ cfi_offset(x24, JB_X24<<3)
661++ cfi_offset(x25, JB_X25<<3)
662++ cfi_offset(x26, JB_X26<<3)
663++ cfi_offset(x27, JB_X27<<3)
664++ cfi_offset(x28, JB_X28<<3)
665++ cfi_offset(x29, JB_X29<<3)
666++ cfi_offset(x30, JB_LR<<3)
667++
668++ cfi_offset( d8, JB_D8<<3)
669++ cfi_offset( d9, JB_D9<<3)
670++ cfi_offset(d10, JB_D10<<3)
671++ cfi_offset(d11, JB_D11<<3)
672++ cfi_offset(d12, JB_D12<<3)
673++ cfi_offset(d13, JB_D13<<3)
674++ cfi_offset(d14, JB_D14<<3)
675++ cfi_offset(d15, JB_D15<<3)
676++
677++ ldp x19, x20, [x0, #JB_X19<<3]
678++ ldp x21, x22, [x0, #JB_X21<<3]
679++ ldp x23, x24, [x0, #JB_X23<<3]
680++ ldp x25, x26, [x0, #JB_X25<<3]
681++ ldp x27, x28, [x0, #JB_X27<<3]
682++ ldp x29, x30, [x0, #JB_X29<<3]
683++
684++ ldp d8, d9, [x0, #JB_D8<<3]
685++ ldp d10, d11, [x0, #JB_D10<<3]
686++ ldp d12, d13, [x0, #JB_D12<<3]
687++ ldp d14, d15, [x0, #JB_D14<<3]
688++
689++ /* Originally this was implemented with a series of
690++ .cfi_restore() directives.
691++
692++ The theory was that cfi_restore should revert to previous
693++ frame value is the same as the current value. In practice
694++ this doesn't work, even after cfi_restore() gdb continues
695++ to try to recover a previous frame value offset from x0,
696++ which gets stuffed after a few more instructions. The
697++ cfi_same_value() mechanism appears to work fine. */
698++
699++ cfi_same_value(x19)
700++ cfi_same_value(x20)
701++ cfi_same_value(x21)
702++ cfi_same_value(x22)
703++ cfi_same_value(x23)
704++ cfi_same_value(x24)
705++ cfi_same_value(x25)
706++ cfi_same_value(x26)
707++ cfi_same_value(x27)
708++ cfi_same_value(x28)
709++ cfi_same_value(x29)
710++ cfi_same_value(x30)
711++ cfi_same_value(d8)
712++ cfi_same_value(d9)
713++ cfi_same_value(d10)
714++ cfi_same_value(d11)
715++ cfi_same_value(d12)
716++ cfi_same_value(d13)
717++ cfi_same_value(d14)
718++ cfi_same_value(d15)
719++
720++ ldr x5, [x0, #JB_SP<<3]
721++ mov sp, x5
722++ cmp x1, #0
723++ mov x0, #1
724++ csel x0, x1, x0, ne
725++ /* Use br instead of ret because ret is guaranteed to mispredict */
726++ br x30
727++END (__longjmp)
728+--- /dev/null
729++++ libc/ports/sysdeps/aarch64/backtrace.c
730+@@ -0,0 +1 @@
731++#include <sysdeps/x86_64/backtrace.c>
732+--- /dev/null
733++++ libc/ports/sysdeps/aarch64/bits/atomic.h
734+@@ -0,0 +1,110 @@
735++/* Copyright (C) 2003 Free Software Foundation, Inc.
736++ Copyright 2009-2012.
737++
738++ This file is part of the GNU C Library.
739++
740++ The GNU C Library is free software; you can redistribute it and/or
741++ modify it under the terms of the GNU Lesser General Public
742++ License as published by the Free Software Foundation; either
743++ version 2.1 of the License, or (at your option) any later version.
744++
745++ The GNU C Library is distributed in the hope that it will be useful,
746++ but WITHOUT ANY WARRANTY; without even the implied warranty of
747++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
748++ Lesser General Public License for more details.
749++
750++ You should have received a copy of the GNU Lesser General Public
751++ License along with the GNU C Library. If not, see
752++ <http://www.gnu.org/licenses/>. */
753++
754++#ifndef _AARCH64_BITS_ATOMIC_H
755++#define _AARCH64_BITS_ATOMIC_H 1
756++
757++#include <stdint.h>
758++
759++typedef int8_t atomic8_t;
760++typedef int16_t atomic16_t;
761++typedef int32_t atomic32_t;
762++typedef int64_t atomic64_t;
763++
764++typedef uint8_t uatomic8_t;
765++typedef uint16_t uatomic16_t;
766++typedef uint32_t uatomic32_t;
767++typedef uint64_t uatomic64_t;
768++
769++typedef intptr_t atomicptr_t;
770++typedef uintptr_t uatomicptr_t;
771++typedef intmax_t atomic_max_t;
772++typedef uintmax_t uatomic_max_t;
773++
774++#define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \
775++ (!__sync_bool_compare_and_swap ((mem), (oldval), (newval)))
776++
777++#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \
778++ (!__sync_bool_compare_and_swap ((mem), (oldval), (newval)))
779++
780++#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
781++ (!__sync_bool_compare_and_swap ((mem), (oldval), (newval)))
782++
783++#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
784++ (!__sync_bool_compare_and_swap ((mem), (oldval), (newval)))
785++
786++#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
787++ __sync_val_compare_and_swap ((mem), (oldval), (newval))
788++
789++#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
790++ __sync_val_compare_and_swap ((mem), (oldval), (newval))
791++
792++#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
793++ __sync_val_compare_and_swap ((mem), (oldval), (newval))
794++
795++#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
796++ __sync_val_compare_and_swap ((mem), (oldval), (newval))
797++
798++/* Atomically store newval and return the old value. */
799++#define atomic_exchange_acq(mem, value) \
800++ __sync_lock_test_and_set (mem, value)
801++
802++#define atomic_exchange_rel(mem, value) \
803++ (__sync_synchronize (), __sync_lock_test_and_set (mem, value))
804++
805++#define atomic_exchange_and_add(mem, value) \
806++ ({ __typeof (*mem) __result; \
807++ __result = __sync_fetch_and_add ((mem), (int) (value)); \
808++ __result; })
809++
810++#define atomic_decrement_if_positive(mem) \
811++ ({ __typeof (*mem) __oldval, __val; \
812++ __typeof (mem) __memp = (mem); \
813++ \
814++ __val = (*__memp); \
815++ do \
816++ { \
817++ __oldval = __val; \
818++ if (__builtin_expect (__val <= 0, 0)) \
819++ break; \
820++ __val = atomic_compare_and_exchange_val_acq (__memp, __oldval - 1, \
821++ __oldval); \
822++ } \
823++ while (__builtin_expect (__val != __oldval, 0)); \
824++ __oldval; })
825++
826++#define atomic_bit_test_set(mem, bit) \
827++ ({ __typeof (*mem) __oldval, __val; \
828++ __typeof (mem) __memp = (mem); \
829++ __typeof (*mem) __mask = ((__typeof (*mem)) 1 << (bit)); \
830++ \
831++ __val = (*__memp); \
832++ do \
833++ { \
834++ __oldval = __val; \
835++ __val = atomic_compare_and_exchange_val_acq (__memp, \
836++ __oldval | __mask, \
837++ __oldval); \
838++ } \
839++ while (__builtin_expect (__val != __oldval, 0)); \
840++ __oldval & __mask; })
841++
842++#define atomic_full_barrier() __sync_synchronize ()
843++
844++#endif
845+--- /dev/null
846++++ libc/ports/sysdeps/aarch64/bits/endian.h
847+@@ -0,0 +1,31 @@
848++/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
849++ Copyright (C) 2009-2012.
850++
851++ This file is part of the GNU C Library.
852++
853++ The GNU C Library is free software; you can redistribute it and/or
854++ modify it under the terms of the GNU Lesser General Public License as
855++ published by the Free Software Foundation; either version 2.1 of the
856++ License, or (at your option) any later version.
857++
858++ The GNU C Library is distributed in the hope that it will be useful,
859++ but WITHOUT ANY WARRANTY; without even the implied warranty of
860++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
861++ Lesser General Public License for more details.
862++
863++ You should have received a copy of the GNU Lesser General Public
864++ License along with the GNU C Library. If not, see
865++ <http://www.gnu.org/licenses/>. */
866++
867++#ifndef _ENDIAN_H
868++# error "Never use <bits/endian.h> directly; include <endian.h> instead."
869++#endif
870++
871++/* AArch64 can be either big or little endian. */
872++#ifdef __AARCH64EB__
873++#define __BYTE_ORDER __BIG_ENDIAN
874++#else
875++#define __BYTE_ORDER __LITTLE_ENDIAN
876++#endif
877++
878++#define __FLOAT_WORD_ORDER __BYTE_ORDER
879+--- /dev/null
880++++ libc/ports/sysdeps/aarch64/bits/fenv.h
881+@@ -0,0 +1,62 @@
882++/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
883++ Copyright (C) 2009-2012.
884++
885++ This file is part of the GNU C Library.
886++
887++ The GNU C Library is free software; you can redistribute it and/or
888++ modify it under the terms of the GNU Lesser General Public License as
889++ published by the Free Software Foundation; either version 2.1 of the
890++ License, or (at your option) any later version.
891++
892++ The GNU C Library is distributed in the hope that it will be useful,
893++ but WITHOUT ANY WARRANTY; without even the implied warranty of
894++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
895++ Lesser General Public License for more details.
896++
897++ You should have received a copy of the GNU Lesser General Public
898++ License along with the GNU C Library; if not, see
899++ <http://www.gnu.org/licenses/>. */
900++
901++#ifndef _FENV_H
902++# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
903++#endif
904++
905++/* Define bits representing exceptions in the FPSR status word. */
906++#define FE_INVALID 1
907++#define FE_DIVBYZERO 2
908++#define FE_OVERFLOW 4
909++#define FE_UNDERFLOW 8
910++#define FE_INEXACT 16
911++
912++/* Amount to shift by to convert an exception bit in FPSR to a an
913++ exception bit mask in FPCR. */
914++#define FE_EXCEPT_SHIFT 8
915++
916++/* All supported exceptions. */
917++#define FE_ALL_EXCEPT \
918++ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
919++
920++/* Define bits representing rounding modes in the FPCR Rmode field. */
921++#define FE_TONEAREST 0x000000
922++#define FE_UPWARD 0x400000
923++#define FE_DOWNWARD 0x800000
924++#define FE_TOWARDZERO 0xc00000
925++
926++/* Type representing exception flags. */
927++typedef unsigned int fexcept_t;
928++
929++/* Type representing floating-point environment. */
930++typedef struct
931++ {
932++ unsigned int fpcr;
933++ unsigned int fpsr;
934++ }
935++fenv_t;
936++
937++/* If the default argument is used we use this value. */
938++#define FE_DFL_ENV ((fenv_t *) -1l)
939++
940++#ifdef __USE_GNU
941++/* Floating-point environment where none of the exceptions are masked. */
942++# define FE_NOMASK_ENV ((__const fenv_t *) -2)
943++#endif
944+--- /dev/null
945++++ libc/ports/sysdeps/aarch64/bits/link.h
946+@@ -0,0 +1,61 @@
947++/* Copyright (C) 2005, 2009 Free Software Foundation, Inc.
948++ Copyright (C) 2009-2012.
949++
950++ This file is part of the GNU C Library.
951++
952++ The GNU C Library is free software; you can redistribute it and/or
953++ modify it under the terms of the GNU Lesser General Public License as
954++ published by the Free Software Foundation; either version 2.1 of the
955++ License, or (at your option) any later version.
956++
957++ The GNU C Library is distributed in the hope that it will be useful,
958++ but WITHOUT ANY WARRANTY; without even the implied warranty of
959++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
960++ Lesser General Public License for more details.
961++
962++ You should have received a copy of the GNU Lesser General Public
963++ License along with the GNU C Library; if not, see
964++ <http://www.gnu.org/licenses/>. */
965++
966++#ifndef _LINK_H
967++# error "Never include <bits/link.h> directly; use <link.h> instead."
968++#endif
969++
970++/* Registers for entry into PLT on AArch64. */
971++typedef struct La_aarch64_regs
972++{
973++ uint64_t lr_xreg[8];
974++ uint64_t lr_dreg[8];
975++ uint64_t lr_sp;
976++ uint64_t lr_lr;
977++} La_aarch64_regs;
978++
979++/* Return values for calls from PLT on AArch64. */
980++typedef struct La_aarch64_retval
981++{
982++ /* Up to two integer registers can be used for a return value. */
983++ uint64_t lrv_xreg[2];
984++ /* Up to four D registers can be used for a return value. */
985++ uint64_t lrv_dreg[4];
986++
987++} La_aarch64_retval;
988++__BEGIN_DECLS
989++
990++extern Elf64_Addr
991++la_aarch64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx,
992++ uintptr_t *__refcook,
993++ uintptr_t *__defcook,
994++ La_aarch64_regs *__regs,
995++ unsigned int *__flags,
996++ const char *__symname,
997++ long int *__framesizep);
998++
999++extern unsigned int
1000++la_aarch64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx,
1001++ uintptr_t *__refcook,
1002++ uintptr_t *__defcook,
1003++ const La_aarch64_regs *__inregs,
1004++ La_aarch64_retval *__outregs,
1005++ const char *__symname);
1006++
1007++__END_DECLS
1008+--- /dev/null
1009++++ libc/ports/sysdeps/aarch64/bits/linkmap.h
1010+@@ -0,0 +1,8 @@
1011++/* Copyright (C) 2009-2012.
1012++ */
1013++
1014++struct link_map_machine
1015++{
1016++ ElfW(Addr) plt; /* Address of .plt */
1017++ void *tlsdesc_table; /* Address of TLS descriptor hash table. */
1018++};
1019+--- /dev/null
1020++++ libc/ports/sysdeps/aarch64/bits/mathdef.h
1021+@@ -0,0 +1,52 @@
1022++/* Copyright (C) 1999, 2000, 2004, 2006, 2007, 2010
1023++ Free Software Foundation, Inc.
1024++ Copyright (C) 2011, 2012.
1025++
1026++ This file is part of the GNU C Library.
1027++
1028++ The GNU C Library is free software; you can redistribute it and/or
1029++ modify it under the terms of the GNU Lesser General Public
1030++ License as published by the Free Software Foundation; either
1031++ version 2.1 of the License, or (at your option) any later version.
1032++
1033++ The GNU C Library is distributed in the hope that it will be useful,
1034++ but WITHOUT ANY WARRANTY; without even the implied warranty of
1035++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1036++ Lesser General Public License for more details.
1037++
1038++ You should have received a copy of the GNU Lesser General Public
1039++ License along with the GNU C Library; if not, see
1040++ <http://www.gnu.org/licenses/>. */
1041++
1042++#if !defined _MATH_H && !defined _COMPLEX_H
1043++# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
1044++#endif
1045++
1046++#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
1047++# define _MATH_H_MATHDEF 1
1048++
1049++/* GCC does not promote `float' values to `double'. */
1050++typedef float float_t; /* `float' expressions are evaluated as
1051++ `float'. */
1052++typedef double double_t; /* `double' expressions are evaluated as
1053++ `double'. */
1054++
1055++/* The values returned by `ilogb' for 0 and NaN respectively. */
1056++# define FP_ILOGB0 (-2147483647)
1057++# define FP_ILOGBNAN (2147483647)
1058++
1059++/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
1060++ builtins are supported. */
1061++# if __FP_FAST_FMA
1062++# define FP_FAST_FMA 1
1063++# endif
1064++
1065++# if __FP_FAST_FMAF
1066++# define FP_FAST_FMAF 1
1067++# endif
1068++
1069++# if __FP_FAST_FMAL
1070++# define FP_FAST_FMAL 1
1071++# endif
1072++
1073++#endif /* ISO C99 */
1074+--- /dev/null
1075++++ libc/ports/sysdeps/aarch64/bits/setjmp.h
1076+@@ -0,0 +1,34 @@
1077++/* Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
1078++ Copyright (C) 2009-2012.
1079++
1080++ This file is part of the GNU C Library.
1081++
1082++ The GNU C Library is free software; you can redistribute it and/or
1083++ modify it under the terms of the GNU Lesser General Public License as
1084++ published by the Free Software Foundation; either version 2.1 of the
1085++ License, or (at your option) any later version.
1086++
1087++ The GNU C Library is distributed in the hope that it will be useful,
1088++ but WITHOUT ANY WARRANTY; without even the implied warranty of
1089++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1090++ Lesser General Public License for more details.
1091++
1092++ You should have received a copy of the GNU Lesser General Public
1093++ License along with the GNU C Library; if not, see
1094++ <http://www.gnu.org/licenses/>. */
1095++
1096++#ifndef _BITS_SETJMP_H
1097++#define _BITS_SETJMP_H 1
1098++
1099++#if !defined _SETJMP_H && !defined _PTHREAD_H
1100++# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
1101++#endif
1102++
1103++#ifndef _ASM
1104++/* Jump buffer contains:
1105++ x19-x28, x29(fp), x30(lr), (x31)sp, d8-d15. Other registers are not
1106++ saved. */
1107++typedef unsigned long long __jmp_buf [22];
1108++
1109++#endif
1110++#endif
1111+--- /dev/null
1112++++ libc/ports/sysdeps/aarch64/bsd-_setjmp.S
1113+@@ -0,0 +1 @@
1114++/* _setjmp is in setjmp.S */
1115+--- /dev/null
1116++++ libc/ports/sysdeps/aarch64/bsd-setjmp.S
1117+@@ -0,0 +1 @@
1118++/* setjmp is in setjmp.S */
1119+--- /dev/null
1120++++ libc/ports/sysdeps/aarch64/configure
1121+@@ -0,0 +1,120 @@
1122++
1123++# as_fn_set_status STATUS
1124++# -----------------------
1125++# Set $? to STATUS, without forking.
1126++as_fn_set_status ()
1127++{
1128++ return $1
1129++} # as_fn_set_status
1130++
1131++# as_fn_exit STATUS
1132++# -----------------
1133++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
1134++as_fn_exit ()
1135++{
1136++ set +e
1137++ as_fn_set_status $1
1138++ exit $1
1139++} # as_fn_exit
1140++if expr a : '\(a\)' >/dev/null 2>&1 &&
1141++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
1142++ as_expr=expr
1143++else
1144++ as_expr=false
1145++fi
1146++
1147++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
1148++ as_basename=basename
1149++else
1150++ as_basename=false
1151++fi
1152++
1153++as_me=`$as_basename -- "$0" ||
1154++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
1155++ X"$0" : 'X\(//\)$' \| \
1156++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1157++$as_echo X/"$0" |
1158++ sed '/^.*\/\([^/][^/]*\)\/*$/{
1159++ s//\1/
1160++ q
1161++ }
1162++ /^X\/\(\/\/\)$/{
1163++ s//\1/
1164++ q
1165++ }
1166++ /^X\/\(\/\).*/{
1167++ s//\1/
1168++ q
1169++ }
1170++ s/.*/./; q'`
1171++
1172++
1173++ as_lineno_1=$LINENO as_lineno_1a=$LINENO
1174++ as_lineno_2=$LINENO as_lineno_2a=$LINENO
1175++ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
1176++ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
1177++ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
1178++ sed -n '
1179++ p
1180++ /[$]LINENO/=
1181++ ' <$as_myself |
1182++ sed '
1183++ s/[$]LINENO.*/&-/
1184++ t lineno
1185++ b
1186++ :lineno
1187++ N
1188++ :loop
1189++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
1190++ t loop
1191++ s/-\n.*//
1192++ ' >$as_me.lineno &&
1193++ chmod +x "$as_me.lineno" ||
1194++ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
1195++
1196++ # Don't try to exec as it changes $[0], causing all sort of problems
1197++ # (the dirname of $[0] is not the place where we might find the
1198++ # original and so on. Autoconf is especially sensitive to this).
1199++ . "./$as_me.lineno"
1200++ # Exit status is that of the last command.
1201++ exit
1202++}
1203++
1204++# This file is generated from configure.in by Autoconf. DO NOT EDIT!
1205++# Local configure fragment for sysdeps/aarch64.
1206++
1207++# Check for support of thread-local storage handling in assembler and
1208++# linker.
1209++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AARCH64 TLS support" >&5
1210++$as_echo_n "checking for AARCH64 TLS support... " >&6; }
1211++if test "${libc_cv_aarch64_tls+set}" = set; then :
1212++ $as_echo_n "(cached) " >&6
1213++else
1214++ cat > conftest.s <<\EOF
1215++ .section ".tdata", "awT", %progbits
1216++ .globl foo
1217++foo: .long 1
1218++ .section ".tbss", "awT", %nobits
1219++ .globl bar
1220++bar: .skip 4
1221++ .text
1222++ adrp x0, :tlsgd:foo
1223++ add x0, x0, #:tlsgd_lo12:foo
1224++EOF
1225++if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
1226++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
1227++ (eval $ac_try) 2>&5
1228++ ac_status=$?
1229++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1230++ test $ac_status = 0; }; }; then
1231++ libc_cv_aarch64_tls=yes
1232++else
1233++ libc_cv_aarch64_tls=no
1234++fi
1235++rm -f conftest*
1236++fi
1237++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_tls" >&5
1238++$as_echo "$libc_cv_aarch64_tls" >&6; }
1239++if test $libc_cv_aarch64_tls = no; then
1240++ as_fn_error $? "the assembler must support TLS" "$LINENO" 5
1241++fi
1242+--- /dev/null
1243++++ libc/ports/sysdeps/aarch64/configure.in
1244+@@ -0,0 +1,27 @@
1245++GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
1246++# Local configure fragment for sysdeps/aarch64.
1247++
1248++# Check for support of thread-local storage handling in assembler and
1249++# linker.
1250++AC_CACHE_CHECK(for AARCH64 TLS support, libc_cv_aarch64_tls, [dnl
1251++cat > conftest.s <<\EOF
1252++ .section ".tdata", "awT", %progbits
1253++ .globl foo
1254++foo: .long 1
1255++ .section ".tbss", "awT", %nobits
1256++ .globl bar
1257++bar: .skip 4
1258++ .text
1259++ adrp x0, :tlsgd:foo
1260++ add x0, x0, #:tlsgd_lo12:foo
1261++EOF
1262++dnl
1263++if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
1264++ libc_cv_aarch64_tls=yes
1265++else
1266++ libc_cv_aarch64_tls=no
1267++fi
1268++rm -f conftest*])
1269++if test $libc_cv_aarch64_tls = no; then
1270++ AC_MSG_ERROR([the assembler must support TLS])
1271++fi
1272+--- /dev/null
1273++++ libc/ports/sysdeps/aarch64/crti.S
1274+@@ -0,0 +1,91 @@
1275++/* Special .init and .fini section support for AArch64.
1276++ Copyright (C) 1995-2012 Free Software Foundation, Inc.
1277++ Copyright (C) 2009-2012.
1278++
1279++ This file is part of the GNU C Library.
1280++
1281++ The GNU C Library is free software; you can redistribute it and/or
1282++ modify it under the terms of the GNU Lesser General Public
1283++ License as published by the Free Software Foundation; either
1284++ version 2.1 of the License, or (at your option) any later version.
1285++
1286++ In addition to the permissions in the GNU Lesser General Public
1287++ License, the Free Software Foundation gives you unlimited
1288++ permission to link the compiled version of this file with other
1289++ programs, and to distribute those programs without any restriction
1290++ coming from the use of this file. (The GNU Lesser General Public
1291++ License restrictions do apply in other respects; for example, they
1292++ cover modification of the file, and distribution when not linked
1293++ into another program.)
1294++
1295++ Note that people who make modified versions of this file are not
1296++ obligated to grant this special exception for their modified
1297++ versions; it is their choice whether to do so. The GNU Lesser
1298++ General Public License gives permission to release a modified
1299++ version without this exception; this exception also makes it
1300++ possible to release a modified version which carries forward this
1301++ exception.
1302++
1303++ The GNU C Library is distributed in the hope that it will be useful,
1304++ but WITHOUT ANY WARRANTY; without even the implied warranty of
1305++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1306++ Lesser General Public License for more details.
1307++
1308++ You should have received a copy of the GNU Lesser General Public
1309++ License along with the GNU C Library; if not, see
1310++ <http://www.gnu.org/licenses/>. */
1311++
1312++/* crti.S puts a function prologue at the beginning of the .init and
1313++ .fini sections and defines global symbols for those addresses, so
1314++ they can be called as functions. The symbols _init and _fini are
1315++ magic and cause the linker to emit DT_INIT and DT_FINI. */
1316++
1317++#include <libc-symbols.h>
1318++
1319++#ifndef PREINIT_FUNCTION
1320++# define PREINIT_FUNCTION __gmon_start__
1321++#endif
1322++
1323++#ifndef PREINIT_FUNCTION_WEAK
1324++# define PREINIT_FUNCTION_WEAK 1
1325++#endif
1326++
1327++#if PREINIT_FUNCTION_WEAK
1328++ weak_extern (PREINIT_FUNCTION)
1329++#else
1330++ .hidden PREINIT_FUNCTION
1331++#endif
1332++
1333++#if PREINIT_FUNCTION_WEAK
1334++ .align 2
1335++ .type call_weak_fn, %function
1336++call_weak_fn:
1337++ adrp x0, :got:PREINIT_FUNCTION
1338++ ldr x0, [x0, #:got_lo12:PREINIT_FUNCTION]
1339++ cbz x0, 1f
1340++ b PREINIT_FUNCTION
1341++1:
1342++ RET
1343++ .size call_weak_fn, .-call_weak_fn
1344++#endif
1345++
1346++ .section .init,"ax",%progbits
1347++ .align 2
1348++ .global _init
1349++ .type _init, %function
1350++_init:
1351++ stp x29, x30, [sp, -16]!
1352++ mov x29, sp
1353++#if PREINIT_FUNCTION_WEAK
1354++ bl call_weak_fn
1355++#else
1356++ bl PREINIT_FUNCTION
1357++#endif
1358++
1359++ .section .fini,"ax",%progbits
1360++ .align 2
1361++ .global _fini
1362++ .type _fini, %function
1363++_fini:
1364++ stp x29, x30, [sp, -16]!
1365++ mov x29, sp
1366+--- /dev/null
1367++++ libc/ports/sysdeps/aarch64/crtn.S
1368+@@ -0,0 +1,47 @@
1369++/* Special .init and .fini section support for AArch64.
1370++ Copyright (C) 1995-2012 Free Software Foundation, Inc.
1371++ Copyright (C) 2009-2012.
1372++
1373++ This file is part of the GNU C Library.
1374++
1375++ The GNU C Library is free software; you can redistribute it and/or
1376++ modify it under the terms of the GNU Lesser General Public
1377++ License as published by the Free Software Foundation; either
1378++ version 2.1 of the License, or (at your option) any later version.
1379++
1380++ In addition to the permissions in the GNU Lesser General Public
1381++ License, the Free Software Foundation gives you unlimited
1382++ permission to link the compiled version of this file with other
1383++ programs, and to distribute those programs without any restriction
1384++ coming from the use of this file. (The GNU Lesser General Public
1385++ License restrictions do apply in other respects; for example, they
1386++ cover modification of the file, and distribution when not linked
1387++ into another program.)
1388++
1389++ Note that people who make modified versions of this file are not
1390++ obligated to grant this special exception for their modified
1391++ versions; it is their choice whether to do so. The GNU Lesser
1392++ General Public License gives permission to release a modified
1393++ version without this exception; this exception also makes it
1394++ possible to release a modified version which carries forward this
1395++ exception.
1396++
1397++ The GNU C Library is distributed in the hope that it will be useful,
1398++ but WITHOUT ANY WARRANTY; without even the implied warranty of
1399++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1400++ Lesser General Public License for more details.
1401++
1402++ You should have received a copy of the GNU Lesser General Public
1403++ License along with the GNU C Library; if not, see
1404++ <http://www.gnu.org/licenses/>. */
1405++
1406++/* crtn.S puts function epilogues in the .init and .fini sections
1407++ corresponding to the prologues in crti.S. */
1408++
1409++ .section .init,"ax",%progbits
1410++ ldp x29, x30, [sp], 16
1411++ RET
1412++
1413++ .section .fini,"ax",%progbits
1414++ ldp x29, x30, [sp], 16
1415++ RET
1416+--- /dev/null
1417++++ libc/ports/sysdeps/aarch64/dl-irel.h
1418+@@ -0,0 +1,36 @@
1419++/* Machine-dependent ELF indirect relocation inline functions.
1420++ AArch64 version.
1421++ Copyright (C) 2012 Free Software Foundation, Inc.
1422++ This file is part of the GNU C Library.
1423++
1424++ The GNU C Library is free software; you can redistribute it and/or
1425++ modify it under the terms of the GNU Lesser General Public
1426++ License as published by the Free Software Foundation; either
1427++ version 2.1 of the License, or (at your option) any later version.
1428++
1429++ The GNU C Library is distributed in the hope that it will be useful,
1430++ but WITHOUT ANY WARRANTY; without even the implied warranty of
1431++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1432++ Lesser General Public License for more details.
1433++
1434++ You should have received a copy of the GNU Lesser General Public
1435++ License along with the GNU C Library; if not, see
1436++ <http://www.gnu.org/licenses/>. */
1437++
1438++#ifndef _DL_IREL_H
1439++#define _DL_IREL_H
1440++
1441++#include <stdio.h>
1442++#include <unistd.h>
1443++
1444++/* AArch64 does not yet implement IFUNC support. However since
1445++ 2011-06-20 provision of a elf_ifunc_invoke has been mandatory. */
1446++
1447++static inline ElfW(Addr)
1448++__attribute ((always_inline))
1449++elf_ifunc_invoke (ElfW(Addr) addr)
1450++{
1451++ return ((ElfW(Addr) (*) (void)) (addr)) ();
1452++}
1453++
1454++#endif
1455+--- /dev/null
1456++++ libc/ports/sysdeps/aarch64/dl-link.sym
1457+@@ -0,0 +1,15 @@
1458++#include <stddef.h>
1459++#include <sysdep.h>
1460++#include <link.h>
1461++#include <dl-tlsdesc.h>
1462++
1463++DL_SIZEOF_RG sizeof(struct La_aarch64_regs)
1464++DL_SIZEOF_RV sizeof(struct La_aarch64_retval)
1465++
1466++DL_OFFSET_RG_X0 offsetof(struct La_aarch64_regs, lr_xreg)
1467++DL_OFFSET_RG_D0 offsetof(struct La_aarch64_regs, lr_dreg)
1468++DL_OFFSET_RG_SP offsetof(struct La_aarch64_regs, lr_sp)
1469++DL_OFFSET_RG_LR offsetof(struct La_aarch64_regs, lr_lr)
1470++
1471++DL_OFFSET_RV_X0 offsetof(struct La_aarch64_retval, lrv_xreg)
1472++DL_OFFSET_RV_D0 offsetof(struct La_aarch64_retval, lrv_dreg)
1473+--- /dev/null
1474++++ libc/ports/sysdeps/aarch64/dl-machine.h
1475+@@ -0,0 +1,390 @@
1476++/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,
1477++ 2006, 2009, 2010 Free Software Foundation, Inc.
1478++ Copyright (C) 2009-2012.
1479++
1480++ This file is part of the GNU C Library.
1481++
1482++ The GNU C Library is free software; you can redistribute it and/or
1483++ modify it under the terms of the GNU Lesser General Public License as
1484++ published by the Free Software Foundation; either version 2.1 of the
1485++ License, or (at your option) any later version.
1486++
1487++ The GNU C Library is distributed in the hope that it will be useful,
1488++ but WITHOUT ANY WARRANTY; without even the implied warranty of
1489++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1490++ Lesser General Public License for more details.
1491++
1492++ You should have received a copy of the GNU Lesser General Public
1493++ License along with the GNU C Library; if not, see
1494++ <http://www.gnu.org/licenses/>. */
1495++
1496++#ifndef dl_machine_h
1497++#define dl_machine_h
1498++
1499++#define ELF_MACHINE_NAME "aarch64"
1500++
1501++#include <tls.h>
1502++#include <dl-tlsdesc.h>
1503++
1504++/* Return nonzero iff ELF header is compatible with the running host. */
1505++static inline int __attribute__ ((unused))
1506++elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
1507++{
1508++ return ehdr->e_machine == EM_AARCH64;
1509++}
1510++
1511++/* Return the link-time address of _DYNAMIC. Conveniently, this is the
1512++ first element of the GOT. */
1513++static inline ElfW(Addr) __attribute__ ((unused))
1514++elf_machine_dynamic (void)
1515++{
1516++ ElfW(Addr) addr = (ElfW(Addr)) &_DYNAMIC;
1517++ return addr;
1518++}
1519++
1520++/* Return the run-time load address of the shared object. */
1521++
1522++static inline ElfW(Addr) __attribute__ ((unused))
1523++elf_machine_load_address (void)
1524++{
1525++ /* To figure out the load address we use the definition that for any symbol:
1526++ dynamic_addr(symbol) = static_addr(symbol) + load_addr
1527++
1528++ The choice of symbol is arbitrary. The static address we obtain
1529++ by constructing a non GOT reference to the symbol, the dynamic
1530++ address of the symbol we compute using adrp/add to compute the
1531++ symbol's address relative to the PC. */
1532++
1533++ ElfW(Addr) static_addr;
1534++ ElfW(Addr) dynamic_addr;
1535++
1536++ asm (" \n\
1537++ adrp %1, _dl_start; \n\
1538++ add %1, %1, #:lo12:_dl_start \n\
1539++ ldr %w0, 1f \n\
1540++ b 2f \n\
1541++1: .word _dl_start \n\
1542++2: \n\
1543++ " : "=r" (static_addr), "=r" (dynamic_addr));
1544++ return dynamic_addr - static_addr;
1545++}
1546++
1547++/* Set up the loaded object described by L so its unrelocated PLT
1548++ entries will jump to the on-demand fixup code in dl-runtime.c. */
1549++
1550++static inline int __attribute__ ((unused))
1551++elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
1552++{
1553++ if (l->l_info[DT_JMPREL] && lazy)
1554++ {
1555++ ElfW(Addr) *got;
1556++ extern void _dl_runtime_resolve (ElfW(Word));
1557++ extern void _dl_runtime_profile (ElfW(Word));
1558++
1559++ got = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]);
1560++ if (got[1])
1561++ {
1562++ l->l_mach.plt = got[1] + l->l_addr;
1563++ }
1564++ got[1] = (ElfW(Addr)) l;
1565++
1566++ /* The got[2] entry contains the address of a function which gets
1567++ called to get the address of a so far unresolved function and
1568++ jump to it. The profiling extension of the dynamic linker allows
1569++ to intercept the calls to collect information. In this case we
1570++ don't store the address in the GOT so that all future calls also
1571++ end in this function. */
1572++ if ( profile)
1573++ {
1574++ got[2] = (ElfW(Addr)) &_dl_runtime_profile;
1575++
1576++ if (GLRO(dl_profile) != NULL
1577++ && _dl_name_match_p (GLRO(dl_profile), l))
1578++ /* Say that we really want profiling and the timers are
1579++ started. */
1580++ GL(dl_profile_map) = l;
1581++ }
1582++ else
1583++ {
1584++ /* This function will get called to fix up the GOT entry
1585++ indicated by the offset on the stack, and then jump to
1586++ the resolved address. */
1587++ got[2] = (ElfW(Addr)) &_dl_runtime_resolve;
1588++ }
1589++ }
1590++
1591++ if (l->l_info[ADDRIDX (DT_TLSDESC_GOT)] && lazy)
1592++ *(Elf64_Addr*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_GOT)]) + l->l_addr)
1593++ = (Elf64_Addr) &_dl_tlsdesc_resolve_rela;
1594++
1595++ return lazy;
1596++}
1597++
1598++/* Initial entry point for the dynamic linker. The C function
1599++ _dl_start is the real entry point, its return value is the user
1600++ program's entry point */
1601++
1602++#define RTLD_START asm ("\
1603++.text \n\
1604++.globl _start \n\
1605++.type _start, %function \n\
1606++.globl _dl_start_user \n\
1607++.type _dl_start_user, %function \n\
1608++_start: \n\
1609++ mov x0, sp \n\
1610++ bl _dl_start \n\
1611++ // returns user entry point in x0 \n\
1612++ mov x21, x0 \n\
1613++_dl_start_user: \n\
1614++ // get the original arg count \n\
1615++ ldr x1, [sp] \n\
1616++ // get the argv address \n\
1617++ add x2, sp, #8 \n\
1618++ // get _dl_skip_args to see if we were \n\
1619++ // invoked as an executable \n\
1620++ adrp x4, _dl_skip_args \n\
1621++ ldr w4, [x4, #:lo12:_dl_skip_args] \n\
1622++ // do we need to adjust argc/argv \n\
1623++ cmp w4, 0 \n\
1624++ beq .L_done_stack_adjust \n\
1625++ // subtract _dl_skip_args from original arg count \n\
1626++ sub x1, x1, x4 \n\
1627++ // store adjusted argc back to stack \n\
1628++ str x1, [sp] \n\
1629++ // find the first unskipped argument \n\
1630++ mov x3, x2 \n\
1631++ add x4, x2, x4, lsl #3 \n\
1632++ // shuffle argv down \n\
1633++1: ldr x5, [x4], #8 \n\
1634++ str x5, [x3], #8 \n\
1635++ cmp x5, #0 \n\
1636++ bne 1b \n\
1637++ // shuffle envp down \n\
1638++1: ldr x5, [x4], #8 \n\
1639++ str x5, [x3], #8 \n\
1640++ cmp x5, #0 \n\
1641++ bne 1b \n\
1642++ // shuffle auxv down \n\
1643++1: ldp x0, x5, [x4, #16]! \n\
1644++ stp x0, x5, [x3], #16 \n\
1645++ cmp x0, #0 \n\
1646++ bne 1b \n\
1647++ // Update _dl_argv \n\
1648++ adrp x3, _dl_argv \n\
1649++ str x2, [x3, #:lo12:_dl_argv] \n\
1650++.L_done_stack_adjust: \n\
1651++ // compute envp \n\
1652++ add x3, x2, x1, lsl #3 \n\
1653++ add x3, x3, #8 \n\
1654++ adrp x16, _rtld_local \n\
1655++ add x16, x16, #:lo12:_rtld_local \n\
1656++ ldr x0, [x16] \n\
1657++ bl _dl_init_internal \n\
1658++ // load the finalizer function \n\
1659++ adrp x0, _dl_fini \n\
1660++ add x0, x0, #:lo12:_dl_fini \n\
1661++ // jump to the user_s entry point \n\
1662++ br x21 \n\
1663++");
1664++
1665++#define elf_machine_type_class(type) \
1666++ ((((type) == R_AARCH64_JUMP_SLOT || \
1667++ (type) == R_AARCH64_TLS_DTPMOD64 || \
1668++ (type) == R_AARCH64_TLS_DTPREL64 || \
1669++ (type) == R_AARCH64_TLS_TPREL64 || \
1670++ (type) == R_AARCH64_TLSDESC) * ELF_RTYPE_CLASS_PLT) \
1671++ | (((type) == R_AARCH64_COPY) * ELF_RTYPE_CLASS_COPY))
1672++
1673++#define ELF_MACHINE_JMP_SLOT R_AARCH64_JUMP_SLOT
1674++
1675++/* AArch64 uses RELA not REL */
1676++#define ELF_MACHINE_NO_REL 1
1677++
1678++static inline ElfW(Addr)
1679++elf_machine_fixup_plt (struct link_map *map, lookup_t t,
1680++ const ElfW(Rela) *reloc,
1681++ ElfW(Addr) *reloc_addr,
1682++ ElfW(Addr) value)
1683++{
1684++ return *reloc_addr = value;
1685++}
1686++
1687++/* Return the final value of a plt relocation. */
1688++static inline ElfW(Addr)
1689++elf_machine_plt_value (struct link_map *map,
1690++ const ElfW(Rela) *reloc,
1691++ ElfW(Addr) value)
1692++{
1693++ return value;
1694++}
1695++
1696++#endif
1697++
1698++/* Names of the architecture-specific auditing callback functions. */
1699++#define ARCH_LA_PLTENTER aarch64_gnu_pltenter
1700++#define ARCH_LA_PLTEXIT aarch64_gnu_pltexit
1701++
1702++#ifdef RESOLVE_MAP
1703++
1704++auto inline void
1705++__attribute__ ((always_inline))
1706++elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
1707++ const ElfW(Sym) *sym, const struct r_found_version *version,
1708++ void *const reloc_addr_arg, int skip_ifunc)
1709++{
1710++ ElfW(Addr) *const reloc_addr = reloc_addr_arg;
1711++ const unsigned int r_type = ELF64_R_TYPE (reloc->r_info);
1712++
1713++ if (__builtin_expect (r_type == R_AARCH64_RELATIVE, 0))
1714++ *reloc_addr = map->l_addr + reloc->r_addend;
1715++ else if (__builtin_expect (r_type == R_AARCH64_NONE, 0))
1716++ return;
1717++ else
1718++ {
1719++ const ElfW(Sym) *const refsym = sym;
1720++ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
1721++ ElfW(Addr) value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
1722++
1723++ switch (r_type)
1724++ {
1725++ case R_AARCH64_COPY:
1726++ if (sym == NULL)
1727++ break;
1728++
1729++ if (sym->st_size > refsym->st_size
1730++ || (GLRO(dl_verbose) && sym->st_size < refsym->st_size))
1731++ {
1732++ const char *strtab;
1733++
1734++ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
1735++ _dl_error_printf ("\
1736++%s: Symbol `%s' has different size in shared object, consider re-linking\n",
1737++ rtld_progname ?: "<program name unknown>",
1738++ strtab + refsym->st_name);
1739++ }
1740++ memcpy (reloc_addr_arg, (void *) value,
1741++ MIN (sym->st_size, refsym->st_size));
1742++ break;
1743++
1744++ case R_AARCH64_RELATIVE:
1745++ case R_AARCH64_GLOB_DAT:
1746++ case R_AARCH64_JUMP_SLOT:
1747++ case R_AARCH64_ABS32:
1748++ case R_AARCH64_ABS64:
1749++ *reloc_addr = value + reloc->r_addend;
1750++ break;
1751++
1752++ case R_AARCH64_TLSDESC:
1753++ {
1754++ struct tlsdesc volatile *td =
1755++ (struct tlsdesc volatile *)reloc_addr;
1756++# ifndef RTLD_BOOTSTRAP
1757++ if (! sym)
1758++ {
1759++ td->arg = (void*)reloc->r_addend;
1760++ td->entry = _dl_tlsdesc_undefweak;
1761++ }
1762++ else
1763++#endif
1764++ {
1765++#ifndef RTLD_BOOTSTRAP
1766++#ifndef SHARED
1767++ CHECK_STATIC_TLS (map, sym_map);
1768++#else
1769++ if (!TRY_STATIC_TLS (map, sym_map))
1770++ {
1771++ td->arg = _dl_make_tlsdesc_dynamic
1772++ (sym_map, sym->st_value + reloc->r_addend);
1773++ td->entry = _dl_tlsdesc_dynamic;
1774++ }
1775++ else
1776++#endif
1777++#endif
1778++ {
1779++ td->arg = (void*)(sym->st_value + sym_map->l_tls_offset
1780++ + reloc->r_addend);
1781++ td->entry = _dl_tlsdesc_return;
1782++ }
1783++ }
1784++ break;
1785++ }
1786++
1787++ case R_AARCH64_TLS_DTPMOD64:
1788++#ifdef RTLD_BOOTSTRAP
1789++ *reloc_addr = 1;
1790++#else
1791++ if (sym_map != NULL)
1792++ {
1793++ *reloc_addr = sym_map->l_tls_modid;
1794++ }
1795++#endif
1796++ break;
1797++
1798++ case R_AARCH64_TLS_DTPREL64:
1799++ if (sym)
1800++ {
1801++ const char *strtab;
1802++ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
1803++ *reloc_addr = sym->st_value + reloc->r_addend;
1804++ }
1805++ break;
1806++
1807++ case R_AARCH64_TLS_TPREL64:
1808++ if (sym)
1809++ {
1810++ const char *strtab;
1811++ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
1812++ CHECK_STATIC_TLS (map, sym_map);
1813++ *reloc_addr =
1814++ sym->st_value + reloc->r_addend + sym_map->l_tls_offset;
1815++ }
1816++ break;
1817++
1818++ default:
1819++ _dl_reloc_bad_type (map, r_type, 0);
1820++ break;
1821++ }
1822++ }
1823++}
1824++
1825++inline void
1826++__attribute__ ((always_inline))
1827++elf_machine_rela_relative (ElfW(Addr) l_addr,
1828++ const ElfW(Rela) *reloc,
1829++ void *const reloc_addr_arg)
1830++{
1831++ ElfW(Addr) *const reloc_addr = reloc_addr_arg;
1832++ *reloc_addr = l_addr + reloc->r_addend;
1833++}
1834++
1835++inline void
1836++__attribute__ ((always_inline))
1837++elf_machine_lazy_rel (struct link_map *map,
1838++ ElfW(Addr) l_addr,
1839++ const ElfW(Rela) *reloc,
1840++ int skip_ifunc)
1841++{
1842++ ElfW(Addr) *const reloc_addr = (void *) (l_addr + reloc->r_offset);
1843++ const unsigned int r_type = ELF64_R_TYPE (reloc->r_info);
1844++ /* Check for unexpected PLT reloc type. */
1845++ if (__builtin_expect (r_type == R_AARCH64_JUMP_SLOT, 1))
1846++ {
1847++ if (__builtin_expect (map->l_mach.plt, 0) == 0)
1848++ *reloc_addr += l_addr;
1849++ else
1850++ *reloc_addr = map->l_mach.plt;
1851++ }
1852++ else if (__builtin_expect (r_type == R_AARCH64_TLSDESC, 1))
1853++ {
1854++ struct tlsdesc volatile *td =
1855++ (struct tlsdesc volatile *)reloc_addr;
1856++
1857++ td->arg = (void*)reloc;
1858++ td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)])
1859++ + map->l_addr);
1860++ }
1861++ else
1862++ _dl_reloc_bad_type (map, r_type, 1);
1863++}
1864++
1865++#endif
1866+--- /dev/null
1867++++ libc/ports/sysdeps/aarch64/dl-sysdep.h
1868+@@ -0,0 +1,24 @@
1869++/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
1870++ Copyright (C) 2009-2012.
1871++
1872++ This file is part of the GNU C Library.
1873++
1874++ The GNU C Library is free software; you can redistribute it and/or
1875++ modify it under the terms of the GNU Lesser General Public License as
1876++ published by the Free Software Foundation; either version 2.1 of the
1877++ License, or (at your option) any later version.
1878++
1879++ The GNU C Library is distributed in the hope that it will be useful,
1880++ but WITHOUT ANY WARRANTY; without even the implied warranty of
1881++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1882++ Lesser General Public License for more details.
1883++
1884++ You should have received a copy of the GNU Lesser General Public
1885++ License along with the GNU C Library; if not, see
1886++ <http://www.gnu.org/licenses/>. */
1887++
1888++#include_next <dl-sysdep.h>
1889++
1890++/* _dl_argv cannot be attribute_relro, because _dl_start_user
1891++ might write into it after _dl_start returns. */
1892++#define DL_ARGV_NOT_RELRO 1
1893+--- /dev/null
1894++++ libc/ports/sysdeps/aarch64/dl-tls.h
1895+@@ -0,0 +1,31 @@
1896++/* Copyright (C) 2005 Free Software Foundation, Inc.
1897++ Copyright (C) 2009-2012.
1898++
1899++ This file is part of the GNU C Library.
1900++
1901++ The GNU C Library is free software; you can redistribute it and/or
1902++ modify it under the terms of the GNU Lesser General Public License as
1903++ published by the Free Software Foundation; either version 2.1 of the
1904++ License, or (at your option) any later version.
1905++
1906++ The GNU C Library is distributed in the hope that it will be useful,
1907++ but WITHOUT ANY WARRANTY; without even the implied warranty of
1908++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1909++ Lesser General Public License for more details.
1910++
1911++ You should have received a copy of the GNU Lesser General Public
1912++ License along with the GNU C Library; if not, see
1913++ <http://www.gnu.org/licenses/>. */
1914++
1915++/* Type used for the representation of TLS information in the GOT. */
1916++typedef struct
1917++{
1918++ unsigned long int ti_module;
1919++ unsigned long int ti_offset;
1920++} tls_index;
1921++
1922++
1923++extern void *__tls_get_addr (tls_index *ti);
1924++
1925++/* Value used for dtv entries for which the allocation is delayed. */
1926++#define TLS_DTV_UNALLOCATED ((void *) -1l)
1927+--- /dev/null
1928++++ libc/ports/sysdeps/aarch64/dl-tlsdesc.S
1929+@@ -0,0 +1,330 @@
1930++/* Thread-local storage handling in the ELF dynamic linker.
1931++ AArch64 version.
1932++ Copyright (C) 2011 Free Software Foundation, Inc.
1933++ Copyright (C) 2011, 2012.
1934++
1935++ This file is part of the GNU C Library.
1936++
1937++ The GNU C Library is free software; you can redistribute it and/or
1938++ modify it under the terms of the GNU Lesser General Public
1939++ License as published by the Free Software Foundation; either
1940++ version 2.1 of the License, or (at your option) any later version.
1941++
1942++ The GNU C Library is distributed in the hope that it will be useful,
1943++ but WITHOUT ANY WARRANTY; without even the implied warranty of
1944++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1945++ Lesser General Public License for more details.
1946++
1947++ You should have received a copy of the GNU Lesser General Public
1948++ License along with the GNU C Library; if not, see
1949++ <http://www.gnu.org/licenses/>. */
1950++
1951++#include <sysdep.h>
1952++#include <tls.h>
1953++#include "tlsdesc.h"
1954++
1955++#define NSAVEDQREGPAIRS 16
1956++#define SAVE_Q_REGISTERS \
1957++ stp q0, q1, [sp, #-32*NSAVEDQREGPAIRS]!; \
1958++ cfi_adjust_cfa_offset (32*NSAVEDQREGPAIRS); \
1959++ stp q2, q3, [sp, #32*1]; \
1960++ stp q4, q5, [sp, #32*2]; \
1961++ stp q6, q7, [sp, #32*3]; \
1962++ stp q8, q9, [sp, #32*4]; \
1963++ stp q10, q11, [sp, #32*5]; \
1964++ stp q12, q13, [sp, #32*6]; \
1965++ stp q14, q15, [sp, #32*7]; \
1966++ stp q16, q17, [sp, #32*8]; \
1967++ stp q18, q19, [sp, #32*9]; \
1968++ stp q20, q21, [sp, #32*10]; \
1969++ stp q22, q23, [sp, #32*11]; \
1970++ stp q24, q25, [sp, #32*12]; \
1971++ stp q26, q27, [sp, #32*13]; \
1972++ stp q28, q29, [sp, #32*14]; \
1973++ stp q30, q31, [sp, #32*15];
1974++
1975++#define RESTORE_Q_REGISTERS \
1976++ ldp q2, q3, [sp, #32*1]; \
1977++ ldp q4, q5, [sp, #32*2]; \
1978++ ldp q6, q7, [sp, #32*3]; \
1979++ ldp q8, q9, [sp, #32*4]; \
1980++ ldp q10, q11, [sp, #32*5]; \
1981++ ldp q12, q13, [sp, #32*6]; \
1982++ ldp q14, q15, [sp, #32*7]; \
1983++ ldp q16, q17, [sp, #32*8]; \
1984++ ldp q18, q19, [sp, #32*9]; \
1985++ ldp q20, q21, [sp, #32*10]; \
1986++ ldp q22, q23, [sp, #32*11]; \
1987++ ldp q24, q25, [sp, #32*12]; \
1988++ ldp q26, q27, [sp, #32*13]; \
1989++ ldp q28, q29, [sp, #32*14]; \
1990++ ldp q30, q31, [sp, #32*15]; \
1991++ ldp q0, q1, [sp], #32*NSAVEDQREGPAIRS; \
1992++ cfi_adjust_cfa_offset (-32*NSAVEDQREGPAIRS);
1993++
1994++ .text
1995++
1996++ /* Compute the thread pointer offset for symbols in the static
1997++ TLS block. The offset is the same for all threads.
1998++ Prototype:
1999++ _dl_tlsdesc_return (tlsdesc *) ;
2000++ */
2001++ .hidden _dl_tlsdesc_return
2002++ .global _dl_tlsdesc_return
2003++ .type _dl_tlsdesc_return,%function
2004++ cfi_startproc
2005++ .align 2
2006++_dl_tlsdesc_return:
2007++ ldr x0, [x0, #8]
2008++ RET
2009++ cfi_endproc
2010++ .size _dl_tlsdesc_return, .-_dl_tlsdesc_return
2011++
2012++ /* Handler for undefined weak TLS symbols.
2013++ Prototype:
2014++ _dl_tlsdesc_undefweak (tlsdesc *);
2015++
2016++ The second word of the descriptor contains the addend.
2017++ Return the addend minus the thread pointer. This ensures
2018++ that when the caller adds on the thread pointer it gets back
2019++ the addend. */
2020++
2021++ .hidden _dl_tlsdesc_undefweak
2022++ .global _dl_tlsdesc_undefweak
2023++ .type _dl_tlsdesc_undefweak,%function
2024++ cfi_startproc
2025++ .align 2
2026++_dl_tlsdesc_undefweak:
2027++ str x1, [sp, #-16]!
2028++ cfi_adjust_cfa_offset(16)
2029++ ldr x0, [x0, #8]
2030++ mrs x1, tpidr_el0
2031++ sub x0, x0, x1
2032++ ldr x1, [sp], #16
2033++ cfi_adjust_cfa_offset(16)
2034++ RET
2035++ cfi_endproc
2036++ .size _dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak
2037++
2038++#ifdef SHARED
2039++ /* Handler for dynamic TLS symbols.
2040++ Prototype:
2041++ _dl_tlsdesc_dynamic (tlsdesc *) ;
2042++
2043++ The second word of the descriptor points to a
2044++ tlsdesc_dynamic_arg structure.
2045++
2046++ Returns the offset between the thread pointer and the
2047++ object referenced by the argument.
2048++
2049++ ptrdiff_t
2050++ __attribute__ ((__regparm__ (1)))
2051++ _dl_tlsdesc_dynamic (struct tlsdesc *tdp)
2052++ {
2053++ struct tlsdesc_dynamic_arg *td = tdp->arg;
2054++ dtv_t *dtv = *(dtv_t **)((char *)__thread_pointer + DTV_OFFSET);
2055++ if (__builtin_expect (td->gen_count <= dtv[0].counter
2056++ && (dtv[td->tlsinfo.ti_module].pointer.val
2057++ != TLS_DTV_UNALLOCATED),
2058++ 1))
2059++ return dtv[td->tlsinfo.ti_module].pointer.val
2060++ + td->tlsinfo.ti_offset
2061++ - __thread_pointer;
2062++
2063++ return ___tls_get_addr (&td->tlsinfo) - __thread_pointer;
2064++ }
2065++ */
2066++
2067++ .hidden _dl_tlsdesc_dynamic
2068++ .global _dl_tlsdesc_dynamic
2069++ .type _dl_tlsdesc_dynamic,%function
2070++ cfi_startproc
2071++ .align 2
2072++_dl_tlsdesc_dynamic:
2073++#define NSAVEXREGPAIRS 2
2074++ stp x29, x30, [sp,#-(32+16*NSAVEXREGPAIRS)]!
2075++ cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
2076++ mov x29, sp
2077++
2078++ /* Save just enough registers to support fast path, if we fall
2079++ into slow path we will save additional registers. */
2080++
2081++ stp x1, x2, [sp, #32+16*0]
2082++ stp x3, x4, [sp, #32+16*1]
2083++
2084++ mrs x4, tpidr_el0
2085++ ldr x1, [x0,#8]
2086++ ldr x0, [x4]
2087++ ldr x3, [x1,#16]
2088++ ldr x2, [x0]
2089++ cmp x3, x2
2090++ b.hi 2f
2091++ ldr x2, [x1]
2092++ add x0, x0, x2, lsl #4
2093++ ldr x0, [x0]
2094++ cmn x0, #0x1
2095++ b.eq 2f
2096++ ldr x1, [x1,#8]
2097++ add x0, x0, x1
2098++ sub x0, x0, x4
2099++1:
2100++ ldp x1, x2, [sp, #32+16*0]
2101++ ldp x3, x4, [sp, #32+16*1]
2102++
2103++ ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
2104++ cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
2105++#undef NSAVEXREGPAIRS
2106++ RET
2107++2:
2108++ /* This is the slow path. We need to call __tls_get_addr() which
2109++ means we need to save and restore all the register that the
2110++ callee will trash. */
2111++
2112++ /* Save the remaining registers that we must treat as caller save. */
2113++#define NSAVEXREGPAIRS 7
2114++ stp x5, x6, [sp, #-16*NSAVEXREGPAIRS]!
2115++ cfi_adjust_cfa_offset (16*NSAVEXREGPAIRS)
2116++ stp x7, x8, [sp, #16*1]
2117++ stp x9, x10, [sp, #16*2]
2118++ stp x11, x12, [sp, #16*3]
2119++ stp x13, x14, [sp, #16*4]
2120++ stp x15, x16, [sp, #16*5]
2121++ stp x17, x18, [sp, #16*6]
2122++
2123++ SAVE_Q_REGISTERS
2124++
2125++ mov x0, x1
2126++ bl __tls_get_addr
2127++
2128++ mrs x1, tpidr_el0
2129++ sub x0, x0, x1
2130++
2131++ RESTORE_Q_REGISTERS
2132++
2133++ ldp x7, x8, [sp, #16*1]
2134++ ldp x9, x10, [sp, #16*2]
2135++ ldp x11, x12, [sp, #16*3]
2136++ ldp x13, x14, [sp, #16*4]
2137++ ldp x15, x16, [sp, #16*5]
2138++ ldp x17, x18, [sp, #16*6]
2139++ ldp x5, x6, [sp], #16*NSAVEXREGPAIRS
2140++ cfi_adjust_cfa_offset (-16*NSAVEXREGPAIRS)
2141++ b 1b
2142++ cfi_endproc
2143++ .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic
2144++#undef NSAVEXREGPAIRS
2145++#endif
2146++
2147++ /* This function is a wrapper for a lazy resolver for TLS_DESC
2148++ RELA relocations.
2149++ When the actual resolver returns, it will have adjusted the
2150++ TLS descriptor such that we can tail-call it for it to return
2151++ the TP offset of the symbol. */
2152++
2153++ .hidden _dl_tlsdesc_resolve_rela
2154++ .global _dl_tlsdesc_resolve_rela
2155++ .type _dl_tlsdesc_resolve_rela,%function
2156++ cfi_startproc
2157++ .align 2
2158++_dl_tlsdesc_resolve_rela:
2159++#define NSAVEXREGPAIRS 9
2160++ stp x29, x30, [sp, #-(32+16*NSAVEXREGPAIRS)]!
2161++ cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
2162++ mov x29, sp
2163++ stp x1, x4, [sp, #32+16*0]
2164++ stp x5, x6, [sp, #32+16*1]
2165++ stp x7, x8, [sp, #32+16*2]
2166++ stp x9, x10, [sp, #32+16*3]
2167++ stp x11, x12, [sp, #32+16*4]
2168++ stp x13, x14, [sp, #32+16*5]
2169++ stp x15, x16, [sp, #32+16*6]
2170++ stp x17, x18, [sp, #32+16*7]
2171++ str x0, [sp, #32+16*8]
2172++
2173++ SAVE_Q_REGISTERS
2174++
2175++ ldr x1, [x3, #8]
2176++ bl _dl_tlsdesc_resolve_rela_fixup
2177++
2178++ RESTORE_Q_REGISTERS
2179++
2180++ ldr x0, [sp, #32+16*8]
2181++ ldr x1, [x0]
2182++ blr x1
2183++
2184++ ldp x1, x4, [sp, #32+16*0]
2185++ ldp x5, x6, [sp, #32+16*1]
2186++ ldp x7, x8, [sp, #32+16*2]
2187++ ldp x9, x10, [sp, #32+16*3]
2188++ ldp x11, x12, [sp, #32+16*4]
2189++ ldp x13, x14, [sp, #32+16*5]
2190++ ldp x15, x16, [sp, #32+16*6]
2191++ ldp x17, x18, [sp, #32+16*7]
2192++ ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
2193++ cfi_adjust_cfa_offset (-32+16*NSAVEXREGPAIRS)
2194++ ldp x2, x3, [sp], #16
2195++ cfi_adjust_cfa_offset (-16)
2196++ RET
2197++#undef NSAVEXREGPAIRS
2198++ cfi_endproc
2199++ .size _dl_tlsdesc_resolve_rela, .-_dl_tlsdesc_resolve_rela
2200++
2201++ /* This function is a placeholder for lazy resolving of TLS
2202++ relocations. Once some thread starts resolving a TLS
2203++ relocation, it sets up the TLS descriptor to use this
2204++ resolver, such that other threads that would attempt to
2205++ resolve it concurrently may skip the call to the original lazy
2206++ resolver and go straight to a condition wait.
2207++
2208++ When the actual resolver returns, it will have adjusted the
2209++ TLS descriptor such that we can tail-call it for it to return
2210++ the TP offset of the symbol. */
2211++
2212++ .hidden _dl_tlsdesc_resolve_hold
2213++ .global _dl_tlsdesc_resolve_hold
2214++ .type _dl_tlsdesc_resolve_hold,%function
2215++ cfi_startproc
2216++ .align 2
2217++_dl_tlsdesc_resolve_hold:
2218++#define NSAVEXREGPAIRS 10
2219++1:
2220++ stp x29, x30, [sp, #-(32+16*NSAVEXREGPAIRS)]!
2221++ cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
2222++ mov x29, sp
2223++ stp x1, x2, [sp, #32+16*0]
2224++ stp x3, x4, [sp, #32+16*1]
2225++ stp x5, x6, [sp, #32+16*2]
2226++ stp x7, x8, [sp, #32+16*3]
2227++ stp x9, x10, [sp, #32+16*4]
2228++ stp x11, x12, [sp, #32+16*5]
2229++ stp x13, x14, [sp, #32+16*6]
2230++ stp x15, x16, [sp, #32+16*7]
2231++ stp x17, x18, [sp, #32+16*8]
2232++ str x0, [sp, #32+16*9]
2233++
2234++ SAVE_Q_REGISTERS
2235++
2236++ adr x1, 1b
2237++ bl _dl_tlsdesc_resolve_hold_fixup
2238++
2239++ RESTORE_Q_REGISTERS
2240++
2241++ ldr x0, [sp, #32+16*9]
2242++ ldr x1, [x0]
2243++ blr x1
2244++
2245++ ldp x1, x2, [sp, #32+16*0]
2246++ ldp x3, x4, [sp, #32+16*1]
2247++ ldp x5, x6, [sp, #32+16*2]
2248++ ldp x7, x8, [sp, #32+16*3]
2249++ ldp x9, x10, [sp, #32+16*4]
2250++ ldp x11, x12, [sp, #32+16*5]
2251++ ldp x13, x14, [sp, #32+16*6]
2252++ ldp x15, x16, [sp, #32+16*7]
2253++ ldp x17, x18, [sp, #32+16*8]
2254++ ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
2255++ cfi_adjust_cfa_offset (-32+16*NSAVEXREGPAIRS)
2256++ RET
2257++ cfi_endproc
2258++ .size _dl_tlsdesc_resolve_hold, .-_dl_tlsdesc_resolve_hold
2259++#undef NSAVEXREGPAIRS
2260+--- /dev/null
2261++++ libc/ports/sysdeps/aarch64/dl-tlsdesc.h
2262+@@ -0,0 +1,72 @@
2263++/* Thread-local storage descriptor handling in the ELF dynamic linker.
2264++ AArch64 version.
2265++ Copyright (C) 2011 Free Software Foundation, Inc.
2266++ Copyright (C) 2011, 2012.
2267++
2268++ This file is part of the GNU C Library.
2269++
2270++ The GNU C Library is free software; you can redistribute it and/or
2271++ modify it under the terms of the GNU Lesser General Public
2272++ License as published by the Free Software Foundation; either
2273++ version 2.1 of the License, or (at your option) any later version.
2274++
2275++ The GNU C Library is distributed in the hope that it will be useful,
2276++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2277++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2278++ Lesser General Public License for more details.
2279++
2280++ You should have received a copy of the GNU Lesser General Public
2281++ License along with the GNU C Library; if not, see
2282++ <http://www.gnu.org/licenses/>. */
2283++
2284++#ifndef _AARCH64_DL_TLSDESC_H
2285++#define _AARCH64_DL_TLSDESC_H 1
2286++
2287++/* Use this to access DT_TLSDESC_PLT and DT_TLSDESC_GOT. */
2288++#ifndef ADDRIDX
2289++#define ADDRIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
2290++ + DT_EXTRANUM + DT_VALNUM + DT_ADDRTAGIDX (tag))
2291++#endif
2292++
2293++/* Type used to represent a TLS descriptor in the GOT. */
2294++struct tlsdesc
2295++{
2296++ ptrdiff_t (*entry) (struct tlsdesc *);
2297++ void *arg;
2298++};
2299++
2300++typedef struct dl_tls_index
2301++{
2302++ unsigned long int ti_module;
2303++ unsigned long int ti_offset;
2304++} tls_index;
2305++
2306++/* Type used as the argument in a TLS descriptor for a symbol that
2307++ needs dynamic TLS offsets. */
2308++struct tlsdesc_dynamic_arg
2309++{
2310++ tls_index tlsinfo;
2311++ size_t gen_count;
2312++};
2313++
2314++extern ptrdiff_t attribute_hidden
2315++_dl_tlsdesc_return (struct tlsdesc *);
2316++
2317++extern ptrdiff_t attribute_hidden
2318++_dl_tlsdesc_undefweak (struct tlsdesc *);
2319++
2320++extern ptrdiff_t attribute_hidden
2321++_dl_tlsdesc_resolve_rela (struct tlsdesc *);
2322++
2323++extern ptrdiff_t attribute_hidden
2324++_dl_tlsdesc_resolve_hold (struct tlsdesc *);
2325++
2326++# ifdef SHARED
2327++extern void *internal_function _dl_make_tlsdesc_dynamic (struct link_map *,
2328++ size_t);
2329++
2330++extern ptrdiff_t attribute_hidden
2331++_dl_tlsdesc_dynamic (struct tlsdesc *);
2332++#endif
2333++
2334++#endif
2335+--- /dev/null
2336++++ libc/ports/sysdeps/aarch64/dl-trampoline.S
2337+@@ -0,0 +1,277 @@
2338++/* Copyright (C) 2005, 2010 Free Software Foundation, Inc.
2339++ Copyright (C) 2009-2012.
2340++
2341++ This file is part of the GNU C Library.
2342++
2343++ The GNU C Library is free software; you can redistribute it and/or
2344++ modify it under the terms of the GNU Lesser General Public License as
2345++ published by the Free Software Foundation; either version 2.1 of the
2346++ License, or (at your option) any later version.
2347++
2348++ The GNU C Library is distributed in the hope that it will be useful,
2349++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2350++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2351++ Lesser General Public License for more details.
2352++
2353++ You should have received a copy of the GNU Lesser General Public
2354++ License along with the GNU C Library. If not, see
2355++ <http://www.gnu.org/licenses/>. */
2356++
2357++#include <sysdep.h>
2358++#include <libc-symbols.h>
2359++
2360++#include "dl-link.h"
2361++
2362++#define ip0 x16
2363++#define ip1 x17
2364++#define lr x30
2365++
2366++ .text
2367++ .globl _dl_runtime_resolve
2368++ .type _dl_runtime_resolve, #function
2369++ cfi_startproc
2370++ .align 2
2371++_dl_runtime_resolve:
2372++ /* AArch64 we get called with:
2373++ ip0 &PLTGOT[2]
2374++ ip1 temp(dl resolver entry point)
2375++ [sp, #8] lr
2376++ [sp, #0] &PLTGOT[n]
2377++ */
2378++
2379++ cfi_rel_offset (lr, 8)
2380++
2381++ /* Save arguments. */
2382++ stp x8, x9, [sp, #-80]!
2383++ cfi_adjust_cfa_offset (80)
2384++ cfi_rel_offset (x8, 0)
2385++ cfi_rel_offset (x9, 8)
2386++
2387++ stp x6, x7, [sp, #16]
2388++ cfi_rel_offset (x6, 16)
2389++ cfi_rel_offset (x7, 24)
2390++
2391++ stp x4, x5, [sp, #32]
2392++ cfi_rel_offset (x4, 32)
2393++ cfi_rel_offset (x5, 40)
2394++
2395++ stp x2, x3, [sp, #48]
2396++ cfi_rel_offset (x2, 48)
2397++ cfi_rel_offset (x3, 56)
2398++
2399++ stp x0, x1, [sp, #64]
2400++ cfi_rel_offset (x0, 64)
2401++ cfi_rel_offset (x1, 72)
2402++
2403++ /* Get pointer to linker struct. */
2404++ ldr x0, [ip0, #-8]
2405++
2406++ /* Prepare to call _dl_fixup(). */
2407++ ldr x1, [sp, 80] /* Recover &PLTGOT[n] */
2408++
2409++ sub x1, x1, ip0
2410++ add x1, x1, x1, lsl #1
2411++ lsl x1, x1, #3
2412++ sub x1, x1, #192
2413++ lsr x1, x1, #3
2414++
2415++ /* Call fixup routine. */
2416++ bl _dl_fixup
2417++
2418++ /* Save the return. */
2419++ mov ip0, x0
2420++
2421++ /* Get arguments and return address back. */
2422++ ldp x0, x1, [sp, #64]
2423++ ldp x2, x3, [sp, #48]
2424++ ldp x4, x5, [sp, #32]
2425++ ldp x6, x7, [sp, #16]
2426++ ldp x8, x9, [sp], #80
2427++ cfi_adjust_cfa_offset (-80)
2428++
2429++ ldp ip1, lr, [sp], #16
2430++ cfi_adjust_cfa_offset (-16)
2431++
2432++ /* Jump to the newly found address. */
2433++ br ip0
2434++
2435++ cfi_endproc
2436++ .size _dl_runtime_resolve, .-_dl_runtime_resolve
2437++#ifndef PROF
2438++ .globl _dl_runtime_profile
2439++ .type _dl_runtime_profile, #function
2440++ cfi_startproc
2441++ .align 2
2442++_dl_runtime_profile:
2443++ /* AArch64 we get called with:
2444++ ip0 &PLTGOT[2]
2445++ ip1 temp(dl resolver entry point)
2446++ [sp, #8] lr
2447++ [sp, #0] &PLTGOT[n]
2448++
2449++ Stack frame layout:
2450++ [sp, #...] lr
2451++ [sp, #...] &PLTGOT[n]
2452++ [sp, #96] La_aarch64_regs
2453++ [sp, #48] La_aarch64_retval
2454++ [sp, #40] frame size return from pltenter
2455++ [sp, #32] dl_profile_call saved x1
2456++ [sp, #24] dl_profile_call saved x0
2457++ [sp, #16] t1
2458++ [sp, #0] x29, lr <- x29
2459++ */
2460++
2461++#define OFFSET_T1 16
2462++#define OFFSET_SAVED_CALL_X0 OFFSET_T1 + 8
2463++#define OFFSET_FS OFFSET_SAVED_CALL_X0 + 16
2464++#define OFFSET_RV OFFSET_FS + 8
2465++#define OFFSET_RG OFFSET_RV + DL_SIZEOF_RV
2466++
2467++#define SF_SIZE OFFSET_RG + DL_SIZEOF_RG
2468++
2469++#define OFFSET_PLTGOTN SF_SIZE
2470++#define OFFSET_LR OFFSET_PLTGOTN + 8
2471++
2472++ /* Save arguments. */
2473++ sub sp, sp, #SF_SIZE
2474++ cfi_adjust_cfa_offset (SF_SIZE)
2475++ stp x29, x30, [SP, #0]
2476++ mov x29, sp
2477++ cfi_def_cfa_register (x29)
2478++ cfi_rel_offset (x29, 0)
2479++ cfi_rel_offset (lr, 8)
2480++
2481++ stp x0, x1, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*0]
2482++ cfi_rel_offset (x0, OFFSET_RG + DL_OFFSET_RG_X0 + 16*0 + 0)
2483++ cfi_rel_offset (x1, OFFSET_RG + DL_OFFSET_RG_X0 + 16*0 + 8)
2484++ stp x2, x3, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*1]
2485++ cfi_rel_offset (x2, OFFSET_RG + DL_OFFSET_RG_X0 + 16*1 + 0)
2486++ cfi_rel_offset (x3, OFFSET_RG + DL_OFFSET_RG_X0 + 16*1 + 8)
2487++ stp x4, x5, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*2]
2488++ cfi_rel_offset (x4, OFFSET_RG + DL_OFFSET_RG_X0 + 16*2 + 0)
2489++ cfi_rel_offset (x5, OFFSET_RG + DL_OFFSET_RG_X0 + 16*2 + 8)
2490++ stp x6, x7, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*3]
2491++ cfi_rel_offset (x6, OFFSET_RG + DL_OFFSET_RG_X0 + 16*3 + 0)
2492++ cfi_rel_offset (x7, OFFSET_RG + DL_OFFSET_RG_X0 + 16*3 + 8)
2493++
2494++ stp d0, d1, [X29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*0]
2495++ cfi_rel_offset (d0, OFFSET_RG + DL_OFFSET_RG_D0 + 16*0)
2496++ cfi_rel_offset (d1, OFFSET_RG + DL_OFFSET_RG_D0 + 16*0 + 8)
2497++ stp d2, d3, [X29, #OFFSET_RG+ DL_OFFSET_RG_D0 + 16*1]
2498++ cfi_rel_offset (d2, OFFSET_RG + DL_OFFSET_RG_D0 + 16*1 + 0)
2499++ cfi_rel_offset (d3, OFFSET_RG + DL_OFFSET_RG_D0 + 16*1 + 8)
2500++ stp d4, d5, [X29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*2]
2501++ cfi_rel_offset (d4, OFFSET_RG + DL_OFFSET_RG_D0 + 16*2 + 0)
2502++ cfi_rel_offset (d5, OFFSET_RG + DL_OFFSET_RG_D0 + 16*2 + 8)
2503++ stp d6, d7, [X29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*3]
2504++ cfi_rel_offset (d6, OFFSET_RG + DL_OFFSET_RG_D0 + 16*3 + 0)
2505++ cfi_rel_offset (d7, OFFSET_RG + DL_OFFSET_RG_D0 + 16*3 + 8)
2506++
2507++ add x0, x29, #SF_SIZE + 16
2508++ ldr x1, [x29, #OFFSET_LR]
2509++ stp x0, x1, [x29, #OFFSET_RG + DL_OFFSET_RG_SP]
2510++
2511++ /* Get pointer to linker struct. */
2512++ ldr x0, [ip0, #-8]
2513++
2514++ /* Prepare to call _dl_profile_fixup(). */
2515++ ldr x1, [x29, OFFSET_PLTGOTN] /* Recover &PLTGOT[n] */
2516++
2517++ sub x1, x1, ip0
2518++ add x1, x1, x1, lsl #1
2519++ lsl x1, x1, #3
2520++ sub x1, x1, #192
2521++ lsr x1, x1, #3
2522++
2523++ stp x0, x1, [x29, #OFFSET_SAVED_CALL_X0]
2524++
2525++ /* Set up extra args for _dl_profile_fixup */
2526++ ldr x2, [x29, #OFFSET_LR] /* load saved LR */
2527++ add x3, x29, #OFFSET_RG /* address of La_aarch64_reg */
2528++ add x4, x29, #OFFSET_FS /* address of framesize */
2529++ bl _dl_profile_fixup
2530++
2531++ ldr ip0, [x29, #OFFSET_FS] /* framesize == 0 */
2532++ cmp ip0, #0
2533++ bge 1f
2534++ cfi_remember_state
2535++
2536++ /* Save the return. */
2537++ mov ip0, x0
2538++
2539++ /* Get arguments and return address back. */
2540++ ldp x0, x1, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*0]
2541++ ldp x2, x3, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*1]
2542++ ldp x4, x5, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*2]
2543++ ldp x6, x7, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*3]
2544++ ldp d0, d1, [x29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*0]
2545++ ldp d2, d3, [x29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*1]
2546++ ldp d4, d5, [x29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*2]
2547++ ldp d6, d7, [x29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*3]
2548++
2549++ cfi_def_cfa_register (sp)
2550++ ldp x29, x30, [x29, #0]
2551++ cfi_restore(x29)
2552++ cfi_restore(x30)
2553++
2554++ add sp, sp, SF_SIZE + 16
2555++ cfi_adjust_cfa_offset (- SF_SIZE - 16)
2556++
2557++ /* Jump to the newly found address. */
2558++ br ip0
2559++
2560++ cfi_restore_state
2561++1:
2562++ /* The new frame size is in ip0. */
2563++
2564++ sub x1, x29, ip0
2565++ and sp, x1, #0xfffffffffffffff0
2566++
2567++ str x0, [x29, #OFFSET_T1]
2568++
2569++ mov x0, sp
2570++ add x1, x29, #SF_SIZE + 16
2571++ mov x2, ip0
2572++ bl memcpy
2573++
2574++ ldr ip0, [x29, #OFFSET_T1]
2575++
2576++ /* Call the function. */
2577++ ldp x0, x1, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*0]
2578++ ldp x2, x3, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*1]
2579++ ldp x4, x5, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*2]
2580++ ldp x6, x7, [x29, #OFFSET_RG + DL_OFFSET_RG_X0 + 16*3]
2581++ ldp d0, d1, [x29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*0]
2582++ ldp d2, d3, [x29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*1]
2583++ ldp d4, d5, [x29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*2]
2584++ ldp d6, d7, [x29, #OFFSET_RG + DL_OFFSET_RG_D0 + 16*3]
2585++ blr ip0
2586++ stp x0, x1, [x29, #OFFSET_RV + DL_OFFSET_RV_X0]
2587++ stp d0, d1, [x29, #OFFSET_RV + DL_OFFSET_RV_D0 + 16*0]
2588++ stp d2, d3, [x29, #OFFSET_RV + DL_OFFSET_RV_D0 + 16*1]
2589++
2590++ /* Setup call to pltexit */
2591++ ldp x0, x1, [x29, #OFFSET_SAVED_CALL_X0]
2592++ add x2, x29, #OFFSET_RG
2593++ add x3, x29, #OFFSET_RV
2594++ bl _dl_call_pltexit
2595++
2596++ ldp x0, x1, [x29, #OFFSET_RV + DL_OFFSET_RV_X0]
2597++ ldp d0, d1, [x29, #OFFSET_RV + DL_OFFSET_RV_D0 + 16*0]
2598++ ldp d2, d3, [x29, #OFFSET_RV + DL_OFFSET_RV_D0 + 16*1]
2599++ /* LR from within La_aarch64_reg */
2600++ ldr lr, [x29, #OFFSET_RG + DL_OFFSET_RG_LR]
2601++ cfi_restore(lr)
2602++ mov sp, x29
2603++ cfi_def_cfa_register (sp)
2604++ ldr x29, [x29, #0]
2605++ cfi_restore(x29)
2606++ add sp, sp, SF_SIZE + 16
2607++ cfi_adjust_cfa_offset (- SF_SIZE - 16)
2608++
2609++ br lr
2610++
2611++ cfi_endproc
2612++ .size _dl_runtime_profile, .-_dl_runtime_profile
2613++#endif
2614++ .previous
2615+--- /dev/null
2616++++ libc/ports/sysdeps/aarch64/fclrexcpt.c
2617+@@ -0,0 +1,36 @@
2618++/* Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
2619++ Copyright (C) 2009-2012.
2620++
2621++ This file is part of the GNU C Library.
2622++
2623++ The GNU C Library is free software; you can redistribute it and/or
2624++ modify it under the terms of the GNU Lesser General Public License as
2625++ published by the Free Software Foundation; either version 2.1 of the
2626++ License, or (at your option) any later version.
2627++
2628++ The GNU C Library is distributed in the hope that it will be useful,
2629++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2630++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2631++ Lesser General Public License for more details.
2632++
2633++ You should have received a copy of the GNU Lesser General Public
2634++ License along with the GNU C Library; if not, see
2635++ <http://www.gnu.org/licenses/>. */
2636++
2637++#include <fenv.h>
2638++#include <fpu-control.h>
2639++
2640++int
2641++feclearexcept (int excepts)
2642++{
2643++ fpu_fpsr_t fpsr;
2644++
2645++ excepts &= FE_ALL_EXCEPT;
2646++
2647++ _FPU_GETFPSR (fpsr);
2648++ fpsr = (fpsr & ~FE_ALL_EXCEPT) | (fpsr & FE_ALL_EXCEPT & ~excepts);
2649++
2650++ _FPU_SETFPSR (fpsr);
2651++
2652++ return 0;
2653++}
2654+--- /dev/null
2655++++ libc/ports/sysdeps/aarch64/fedisblxcpt.c
2656+@@ -0,0 +1,41 @@
2657++/* Copyright (C) 2001 Free Software Foundation, Inc.
2658++ Copyright (C) 2009-2012.
2659++
2660++ This file is part of the GNU C Library.
2661++
2662++ The GNU C Library is free software; you can redistribute it and/or
2663++ modify it under the terms of the GNU Lesser General Public License as
2664++ published by the Free Software Foundation; either version 2.1 of the
2665++ License, or (at your option) any later version.
2666++
2667++ The GNU C Library is distributed in the hope that it will be useful,
2668++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2669++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2670++ Lesser General Public License for more details.
2671++
2672++ You should have received a copy of the GNU Lesser General Public
2673++ License along with the GNU C Library; if not, see
2674++ <http://www.gnu.org/licenses/>. */
2675++
2676++#include <fenv.h>
2677++#include <fpu-control.h>
2678++
2679++int
2680++fedisableexcept (int excepts)
2681++{
2682++ fpu_fpcr_t fpcr;
2683++ int original_excepts;
2684++
2685++ _FPU_GETFPCR(fpcr);
2686++
2687++ original_excepts = (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
2688++
2689++ excepts &= FE_ALL_EXCEPT;
2690++
2691++ fpcr &= ~(excepts << FE_EXCEPT_SHIFT);
2692++
2693++ _FPU_SETFPCR(fpcr);
2694++ _ISB ();
2695++
2696++ return original_excepts;
2697++}
2698+--- /dev/null
2699++++ libc/ports/sysdeps/aarch64/feenablxcpt.c
2700+@@ -0,0 +1,41 @@
2701++/* Copyright (C) 2001 Free Software Foundation, Inc.
2702++ Copyright (C) 2009-2012.
2703++
2704++ This file is part of the GNU C Library.
2705++
2706++ The GNU C Library is free software; you can redistribute it and/or
2707++ modify it under the terms of the GNU Lesser General Public License as
2708++ published by the Free Software Foundation; either version 2.1 of the
2709++ License, or (at your option) any later version.
2710++
2711++ The GNU C Library is distributed in the hope that it will be useful,
2712++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2713++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2714++ Lesser General Public License for more details.
2715++
2716++ You should have received a copy of the GNU Lesser General Public
2717++ License along with the GNU C Library; if not, see
2718++ <http://www.gnu.org/licenses/>. */
2719++
2720++#include <fenv.h>
2721++#include <fpu-control.h>
2722++
2723++int
2724++feenableexcept (int excepts)
2725++{
2726++ fpu_fpcr_t fpcr;
2727++ int original_excepts;
2728++
2729++ _FPU_GETFPCR(fpcr);
2730++
2731++ original_excepts = (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
2732++
2733++ excepts &= FE_ALL_EXCEPT;
2734++
2735++ fpcr |= (excepts << FE_EXCEPT_SHIFT);
2736++
2737++ _FPU_SETFPCR(fpcr);
2738++ _ISB ();
2739++
2740++ return original_excepts;
2741++}
2742+--- /dev/null
2743++++ libc/ports/sysdeps/aarch64/fegetenv.c
2744+@@ -0,0 +1,34 @@
2745++/* Copyright (C) 1997,98,99,2000,01,10 Free Software Foundation, Inc.
2746++ Copyright (C) 2009-2012.
2747++
2748++ This file is part of the GNU C Library.
2749++
2750++ The GNU C Library is free software; you can redistribute it and/or
2751++ modify it under the terms of the GNU Lesser General Public License as
2752++ published by the Free Software Foundation; either version 2.1 of the
2753++ License, or (at your option) any later version.
2754++
2755++ The GNU C Library is distributed in the hope that it will be useful,
2756++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2757++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2758++ Lesser General Public License for more details.
2759++
2760++ You should have received a copy of the GNU Lesser General Public
2761++ License along with the GNU C Library; if not, see
2762++ <http://www.gnu.org/licenses/>. */
2763++
2764++#include <fenv.h>
2765++#include <fpu-control.h>
2766++
2767++int
2768++fegetenv (fenv_t *envp)
2769++{
2770++ fpu_fpcr_t fpcr;
2771++ fpu_fpsr_t fpsr;
2772++ _FPU_GETFPCR (fpcr);
2773++ _FPU_GETFPSR (fpsr);
2774++ envp->fpcr = fpcr;
2775++ envp->fpsr = fpsr;
2776++ return 0;
2777++}
2778++libm_hidden_def (fegetenv)
2779+--- /dev/null
2780++++ libc/ports/sysdeps/aarch64/fegetexcept.c
2781+@@ -0,0 +1,29 @@
2782++/* Copyright (C) 2001 Free Software Foundation, Inc.
2783++ Copyright (C) 2009-2012.
2784++
2785++ This file is part of the GNU C Library.
2786++
2787++ The GNU C Library is free software; you can redistribute it and/or
2788++ modify it under the terms of the GNU Lesser General Public License as
2789++ published by the Free Software Foundation; either version 2.1 of the
2790++ License, or (at your option) any later version.
2791++
2792++ The GNU C Library is distributed in the hope that it will be useful,
2793++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2794++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2795++ Lesser General Public License for more details.
2796++
2797++ You should have received a copy of the GNU Lesser General Public
2798++ License along with the GNU C Library; if not, see
2799++ <http://www.gnu.org/licenses/>. */
2800++
2801++#include <fenv.h>
2802++#include <fpu-control.h>
2803++
2804++int
2805++fegetexcept (void)
2806++{
2807++ fpu_fpcr_t fpcr;
2808++ _FPU_GETFPCR (fpcr);
2809++ return (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
2810++}
2811+--- /dev/null
2812++++ libc/ports/sysdeps/aarch64/fegetround.c
2813+@@ -0,0 +1,29 @@
2814++/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
2815++ Copyright (C) 2009-2012.
2816++
2817++ This file is part of the GNU C Library.
2818++
2819++ The GNU C Library is free software; you can redistribute it and/or
2820++ modify it under the terms of the GNU Lesser General Public License as
2821++ published by the Free Software Foundation; either version 2.1 of the
2822++ License, or (at your option) any later version.
2823++
2824++ The GNU C Library is distributed in the hope that it will be useful,
2825++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2826++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2827++ Lesser General Public License for more details.
2828++
2829++ You should have received a copy of the GNU Lesser General Public
2830++ License along with the GNU C Library; if not, see
2831++ <http://www.gnu.org/licenses/>. */
2832++
2833++#include <fenv.h>
2834++#include <fpu-control.h>
2835++
2836++int
2837++fegetround (void)
2838++{
2839++ fpu_fpcr_t fpcr;
2840++ _FPU_GETFPCR (fpcr);
2841++ return fpcr & FE_TOWARDZERO;
2842++}
2843+--- /dev/null
2844++++ libc/ports/sysdeps/aarch64/feholdexcpt.c
2845+@@ -0,0 +1,49 @@
2846++/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
2847++ Copyright (C) 2009-2012.
2848++
2849++ This file is part of the GNU C Library.
2850++
2851++ The GNU C Library is free software; you can redistribute it and/or
2852++ modify it under the terms of the GNU Lesser General Public License as
2853++ published by the Free Software Foundation; either version 2.1 of the
2854++ License, or (at your option) any later version.
2855++
2856++ The GNU C Library is distributed in the hope that it will be useful,
2857++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2858++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2859++ Lesser General Public License for more details.
2860++
2861++ You should have received a copy of the GNU Lesser General Public
2862++ License along with the GNU C Library; if not, see
2863++ <http://www.gnu.org/licenses/>. */
2864++
2865++#include <fenv.h>
2866++#include <fpu-control.h>
2867++
2868++int
2869++feholdexcept (fenv_t *envp)
2870++{
2871++ fpu_fpsr_t fpsr;
2872++ fpu_fpcr_t fpcr;
2873++
2874++ _FPU_GETFPCR (fpcr);
2875++ envp->fpcr = fpcr;
2876++
2877++ _FPU_GETFPSR (fpsr);
2878++ envp->fpsr = fpsr;
2879++
2880++ /* Now set all exceptions to non-stop. */
2881++ fpcr &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
2882++
2883++ /* And clear all exception flags. */
2884++ fpsr &= ~FE_ALL_EXCEPT;
2885++
2886++ _FPU_SETFPSR(fpsr);
2887++
2888++ _FPU_SETFPCR(fpcr);
2889++ _ISB ();
2890++
2891++ return 0;
2892++}
2893++
2894++libm_hidden_def (feholdexcept)
2895+--- /dev/null
2896++++ libc/ports/sysdeps/aarch64/fesetenv.c
2897+@@ -0,0 +1,62 @@
2898++/* Copyright (C) 1997,98,99,2000,01,02 Free Software Foundation, Inc.
2899++ Copyright (C) 2009-2012.
2900++
2901++ This file is part of the GNU C Library.
2902++
2903++ The GNU C Library is free software; you can redistribute it and/or
2904++ modify it under the terms of the GNU Lesser General Public License as
2905++ published by the Free Software Foundation; either version 2.1 of the
2906++ License, or (at your option) any later version.
2907++
2908++ The GNU C Library is distributed in the hope that it will be useful,
2909++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2910++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2911++ Lesser General Public License for more details.
2912++
2913++ You should have received a copy of the GNU Lesser General Public
2914++ License along with the GNU C Library; if not, see
2915++ <http://www.gnu.org/licenses/>. */
2916++
2917++#include <fenv.h>
2918++#include <fpu-control.h>
2919++
2920++int
2921++fesetenv (const fenv_t *envp)
2922++{
2923++ fpu_fpcr_t fpcr;
2924++ fpu_fpsr_t fpsr;
2925++
2926++ _FPU_GETFPCR (fpcr);
2927++ _FPU_GETFPSR (fpsr);
2928++
2929++ fpcr &= _FPU_FPCR_RESERVED;
2930++ fpsr &= _FPU_FPSR_RESERVED;
2931++
2932++ if (envp == FE_DFL_ENV)
2933++ {
2934++ fpcr |= _FPU_FPCR_DEFAULT;
2935++ fpsr |= _FPU_FPSR_DEFAULT;
2936++ }
2937++ else if (envp == FE_NOMASK_ENV)
2938++ {
2939++ fpcr |= _FPU_FPCR_IEEE;
2940++ fpsr |= _FPU_FPSR_IEEE;
2941++ }
2942++ else
2943++ {
2944++ fpcr |= envp->fpcr & ~_FPU_FPCR_RESERVED;
2945++ fpsr |= envp->fpsr & ~_FPU_FPSR_RESERVED;
2946++ }
2947++
2948++ _FPU_SETFPSR (fpsr);
2949++
2950++ _FPU_SETFPCR (fpcr);
2951++
2952++ /* The instruction stream must be syncrnonized after any write to
2953++ FPCR */
2954++ _ISB ();
2955++
2956++ return 0;
2957++}
2958++
2959++libm_hidden_def (fesetenv)
2960+--- /dev/null
2961++++ libc/ports/sysdeps/aarch64/fesetround.c
2962+@@ -0,0 +1,48 @@
2963++/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
2964++ Copyright (C) 2009-2012.
2965++
2966++ This file is part of the GNU C Library.
2967++
2968++ The GNU C Library is free software; you can redistribute it and/or
2969++ modify it under the terms of the GNU Lesser General Public License as
2970++ published by the Free Software Foundation; either version 2.1 of the
2971++ License, or (at your option) any later version.
2972++
2973++ The GNU C Library is distributed in the hope that it will be useful,
2974++ but WITHOUT ANY WARRANTY; without even the implied warranty of
2975++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2976++ Lesser General Public License for more details.
2977++
2978++ You should have received a copy of the GNU Lesser General Public
2979++ License along with the GNU C Library; if not, see
2980++ <http://www.gnu.org/licenses/>. */
2981++
2982++#include <fenv.h>
2983++#include <fpu-control.h>
2984++
2985++int
2986++fesetround (int round)
2987++{
2988++ fpu_fpcr_t fpcr;
2989++
2990++ switch (round)
2991++ {
2992++ case FE_TONEAREST:
2993++ case FE_UPWARD:
2994++ case FE_DOWNWARD:
2995++ case FE_TOWARDZERO:
2996++ _FPU_GETFPCR (fpcr);
2997++ fpcr = (fpcr & ~FE_TOWARDZERO) | round;
2998++
2999++ _FPU_SETFPCR (fpcr);
3000++ _ISB ();
3001++ return 0;
3002++
3003++ default:
3004++ return 1;
3005++ }
3006++
3007++ return 1;
3008++}
3009++
3010++libm_hidden_def (fesetround)
3011+--- /dev/null
3012++++ libc/ports/sysdeps/aarch64/feupdateenv.c
3013+@@ -0,0 +1,39 @@
3014++/* Copyright (C) 2011 Free Software Foundation, Inc.
3015++ Copyright (C) 2009-2012.
3016++
3017++ This file is part of the GNU C Library.
3018++
3019++ The GNU C Library is free software; you can redistribute it and/or
3020++ modify it under the terms of the GNU Lesser General Public License as
3021++ published by the Free Software Foundation; either version 2.1 of the
3022++ License, or (at your option) any later version.
3023++
3024++ The GNU C Library is distributed in the hope that it will be useful,
3025++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3026++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3027++ Lesser General Public License for more details.
3028++
3029++ You should have received a copy of the GNU Lesser General Public
3030++ License along with the GNU C Library; if not, see
3031++ <http://www.gnu.org/licenses/>. */
3032++
3033++#include <fenv.h>
3034++#include <fpu-control.h>
3035++
3036++int
3037++feupdateenv (const fenv_t *envp)
3038++{
3039++ fpu_fpsr_t fpsr;
3040++
3041++ /* Get the current exception state. */
3042++ _FPU_GETFPSR (fpsr);
3043++
3044++ /* Install new environment. */
3045++ fesetenv (envp);
3046++
3047++ /* Raise the saved exceptions. */
3048++ feraiseexcept (fpsr & FE_ALL_EXCEPT);
3049++
3050++ return 0;
3051++}
3052++libm_hidden_def (feupdateenv)
3053+--- /dev/null
3054++++ libc/ports/sysdeps/aarch64/fgetexcptflg.c
3055+@@ -0,0 +1,34 @@
3056++/* Copyright (C) 2001 Free Software Foundation, Inc.
3057++ Copyright (C) 2009-2012.
3058++
3059++ This file is part of the GNU C Library.
3060++
3061++ The GNU C Library is free software; you can redistribute it and/or
3062++ modify it under the terms of the GNU Lesser General Public License as
3063++ published by the Free Software Foundation; either version 2.1 of the
3064++ License, or (at your option) any later version.
3065++
3066++ The GNU C Library is distributed in the hope that it will be useful,
3067++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3068++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3069++ Lesser General Public License for more details.
3070++
3071++ You should have received a copy of the GNU Lesser General Public
3072++ License along with the GNU C Library; if not, see
3073++ <http://www.gnu.org/licenses/>. */
3074++
3075++#include <fenv.h>
3076++#include <fpu-control.h>
3077++
3078++int
3079++fegetexceptflag (fexcept_t *flagp, int excepts)
3080++{
3081++ fpu_fpsr_t fpsr;
3082++
3083++ /* Get the current exceptions. */
3084++ _FPU_GETFPSR (fpsr);
3085++
3086++ *flagp = fpsr & excepts & FE_ALL_EXCEPT;
3087++
3088++ return 0;
3089++}
3090+--- /dev/null
3091++++ libc/ports/sysdeps/aarch64/fpu-control.h
3092+@@ -0,0 +1,79 @@
3093++/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
3094++ Copyright (C) 2009-2012.
3095++
3096++ This file is part of the GNU C Library.
3097++
3098++ The GNU C Library is free software; you can redistribute it and/or
3099++ modify it under the terms of the GNU Lesser General Public License as
3100++ published by the Free Software Foundation; either version 2.1 of the
3101++ License, or (at your option) any later version.
3102++
3103++ The GNU C Library is distributed in the hope that it will be useful,
3104++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3105++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3106++ Lesser General Public License for more details.
3107++
3108++ You should have received a copy of the GNU Lesser General Public
3109++ License along with the GNU C Library; if not, see
3110++ <http://www.gnu.org/licenses/>. */
3111++
3112++#ifndef _FPU_CONTROL_H
3113++#define _FPU_CONTROL_H
3114++
3115++/* Macros for accessing the FPCR and FPSR. */
3116++
3117++#define _FPU_GETFPCR(fpcr) \
3118++ __asm__ __volatile__ ("mrs %0, fpcr" : "=r" (fpcr))
3119++
3120++#define _FPU_SETFPCR(fpcr) \
3121++ __asm__ __volatile__ ("msr fpcr, %0" : : "r" (fpcr))
3122++
3123++#define _FPU_GETFPSR(fpsr) \
3124++ __asm__ __volatile__ ("mrs %0, fpsr" : "=r" (fpsr))
3125++
3126++#define _FPU_SETFPSR(fpsr) \
3127++ __asm__ __volatile__ ("msr fpsr, %0" : : "r" (fpsr))
3128++
3129++#define _ISB() \
3130++ __asm__ __volatile__ ("isb")
3131++
3132++/* Reserved bits should be preserved when modifying register
3133++ contents. These two masks indicate which bits in each of FPCR and
3134++ FPSR should not be changed. */
3135++
3136++#define _FPU_FPCR_RESERVED 0xfe0fe0ff
3137++#define _FPU_FPSR_RESERVED 0x0fffffe0
3138++
3139++#define _FPU_FPCR_DEFAULT 0x00000000
3140++#define _FPU_FPSR_DEFAULT 0x00000000
3141++
3142++/* Layout of FPCR and FPSR:
3143++
3144++ | | | | | | | |
3145++ 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0
3146++ s s s s s s s s s s s
3147++ c c c c c c c c c c c c
3148++ N Z C V Q A D F R R S S S L L L I U U I U O D I I U U I U O D I
3149++ C H N Z M M T T B E E E D N N X F F Z O D N N X F F Z O
3150++ P O O R R Z N N N E K K E E E E E C K K C C C C C
3151++ D D I I P
3152++ E E D D
3153++ E E
3154++ */
3155++#define _FPU_FPCR_MASK_IXE 0x1000
3156++#define _FPU_FPCR_MASK_UFE 0x0800
3157++#define _FPU_FPCR_MASK_OFE 0x0400
3158++#define _FPU_FPCR_MASK_DZE 0x0200
3159++#define _FPU_FPCR_MASK_IOE 0x0100
3160++
3161++#define _FPU_FPCR_IEEE \
3162++ (_FPU_FPCR_DEFAULT | _FPU_FPCR_MASK_IXE | \
3163++ _FPU_FPCR_MASK_UFE | _FPU_FPCR_MASK_OFE | \
3164++ _FPU_FPCR_MASK_DZE | _FPU_FPCR_MASK_IOE)
3165++
3166++#define _FPU_FPSR_IEEE 0
3167++
3168++typedef unsigned int fpu_fpcr_t;
3169++typedef unsigned int fpu_fpsr_t;
3170++
3171++#endif
3172+--- /dev/null
3173++++ libc/ports/sysdeps/aarch64/fraiseexcpt.c
3174+@@ -0,0 +1,93 @@
3175++/* Copyright (C) 1997,98,99,2000,01,02 Free Software Foundation, Inc.
3176++ Copyright (C) 2009-2012.
3177++
3178++ This file is part of the GNU C Library.
3179++
3180++ The GNU C Library is free software; you can redistribute it and/or
3181++ modify it under the terms of the GNU Lesser General Public License as
3182++ published by the Free Software Foundation; either version 2.1 of the
3183++ License, or (at your option) any later version.
3184++
3185++ The GNU C Library is distributed in the hope that it will be useful,
3186++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3187++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3188++ Lesser General Public License for more details.
3189++
3190++ You should have received a copy of the GNU Lesser General Public
3191++ License along with the GNU C Library; if not, see
3192++ <http://www.gnu.org/licenses/>. */
3193++
3194++#include <fenv.h>
3195++#include <fpu-control.h>
3196++#include <float.h>
3197++
3198++int
3199++feraiseexcept (int excepts)
3200++{
3201++ int fpsr;
3202++ const float fp_zero = 0.0;
3203++ const float fp_one = 1.0;
3204++ const float fp_max = FLT_MAX;
3205++ const float fp_min = FLT_MIN;
3206++ const float fp_1e32 = 1.0e32f;
3207++ const float fp_two = 2.0;
3208++ const float fp_three = 3.0;
3209++
3210++ /* Raise exceptions represented by EXCEPTS. But we must raise only
3211++ one signal at a time. It is important that if the OVERFLOW or
3212++ UNDERFLOW exception and the inexact exception are given at the
3213++ same time, the OVERFLOW or UNDERFLOW exception precedes the
3214++ INEXACT exception.
3215++
3216++ After each exception we read from the FPSR, to force the
3217++ exception to be raised immediately. */
3218++
3219++ if (FE_INVALID & excepts)
3220++ __asm__ __volatile__ (
3221++ "ldr s0, %1\n\t"
3222++ "fdiv s0, s0, s0\n\t"
3223++ "mrs %0, fpsr" : "=r" (fpsr)
3224++ : "m" (fp_zero)
3225++ : "d0");
3226++
3227++ if (FE_DIVBYZERO & excepts)
3228++ __asm__ __volatile__ (
3229++ "ldr s0, %1\n\t"
3230++ "ldr s1, %2\n\t"
3231++ "fdiv s0, s0, s1\n\t"
3232++ "mrs %0, fpsr" : "=r" (fpsr)
3233++ : "m" (fp_one), "m" (fp_zero)
3234++ : "d0", "d1");
3235++
3236++ if (FE_OVERFLOW & excepts)
3237++ /* There's no way to raise overflow without also raising inexact. */
3238++ __asm__ __volatile__ (
3239++ "ldr s0, %1\n\t"
3240++ "ldr s1, %2\n\t"
3241++ "fadd s0, s0, s1\n\t"
3242++ "mrs %0, fpsr" : "=r" (fpsr)
3243++ : "m" (fp_max), "m" (fp_1e32)
3244++ : "d0", "d1");
3245++
3246++ if (FE_UNDERFLOW & excepts)
3247++ __asm__ __volatile__ (
3248++ "ldr s0, %1\n\t"
3249++ "ldr s1, %2\n\t"
3250++ "fdiv s0, s0, s1\n\t"
3251++ "mrs %0, fpsr" : "=r" (fpsr)
3252++ : "m" (fp_min), "m" (fp_three)
3253++ : "d0", "d1");
3254++
3255++ if (FE_INEXACT & excepts)
3256++ __asm__ __volatile__ (
3257++ "ldr s0, %1\n\t"
3258++ "ldr s1, %2\n\t"
3259++ "fdiv s0, s0, s1\n\t"
3260++ "mrs %0, fpsr" : "=r" (fpsr)
3261++ : "m" (fp_two), "m" (fp_three)
3262++ : "d0", "d1");
3263++
3264++ return 0;
3265++}
3266++
3267++libm_hidden_def (feraiseexcept)
3268+--- /dev/null
3269++++ libc/ports/sysdeps/aarch64/fsetexcptflg.c
3270+@@ -0,0 +1,40 @@
3271++/* Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
3272++ Copyright (C) 2009-2012.
3273++
3274++ This file is part of the GNU C Library.
3275++
3276++ The GNU C Library is free software; you can redistribute it and/or
3277++ modify it under the terms of the GNU Lesser General Public License as
3278++ published by the Free Software Foundation; either version 2.1 of the
3279++ License, or (at your option) any later version.
3280++
3281++ The GNU C Library is distributed in the hope that it will be useful,
3282++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3283++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3284++ Lesser General Public License for more details.
3285++
3286++ You should have received a copy of the GNU Lesser General Public
3287++ License along with the GNU C Library; if not, see
3288++ <http://www.gnu.org/licenses/>. */
3289++
3290++#include <fenv.h>
3291++#include <math.h>
3292++#include <fpu-control.h>
3293++
3294++int
3295++fesetexceptflag (const fexcept_t *flagp, int excepts)
3296++{
3297++ fpu_fpsr_t fpsr;
3298++
3299++ /* Get the current environment. */
3300++ _FPU_GETFPSR (fpsr);
3301++
3302++ /* Set the desired exception mask. */
3303++ fpsr &= ~(excepts & FE_ALL_EXCEPT);
3304++ fpsr |= (*flagp & excepts & FE_ALL_EXCEPT);
3305++
3306++ /* Save state back to the FPU. */
3307++ _FPU_SETFPSR (fpsr);
3308++
3309++ return 0;
3310++}
3311+--- /dev/null
3312++++ libc/ports/sysdeps/aarch64/ftestexcept.c
3313+@@ -0,0 +1,33 @@
3314++/* Copyright (C) 1997, 1998, 2010 Free Software Foundation, Inc.
3315++ Copyright (C) 2009-2012.
3316++
3317++ This file is part of the GNU C Library.
3318++
3319++ The GNU C Library is free software; you can redistribute it and/or
3320++ modify it under the terms of the GNU Lesser General Public License as
3321++ published by the Free Software Foundation; either version 2.1 of the
3322++ License, or (at your option) any later version.
3323++
3324++ The GNU C Library is distributed in the hope that it will be useful,
3325++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3326++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3327++ Lesser General Public License for more details.
3328++
3329++ You should have received a copy of the GNU Lesser General Public
3330++ License along with the GNU C Library; if not, see
3331++ <http://www.gnu.org/licenses/>. */
3332++
3333++#include <fenv.h>
3334++#include <fpu-control.h>
3335++
3336++int
3337++fetestexcept (int excepts)
3338++{
3339++ fpu_fpsr_t fpsr;
3340++
3341++ /* Get current exceptions. */
3342++ _FPU_GETFPSR(fpsr);
3343++
3344++ return fpsr & excepts & FE_ALL_EXCEPT;
3345++}
3346++libm_hidden_def (fetestexcept)
3347+--- /dev/null
3348++++ libc/ports/sysdeps/aarch64/jmpbuf-offsets.h
3349+@@ -0,0 +1,45 @@
3350++/* Copyright (C) 2006 Free Software Foundation, Inc.
3351++ Copyright (C) 2009-2012.
3352++
3353++ This file is part of the GNU C Library.
3354++
3355++ The GNU C Library is free software; you can redistribute it and/or
3356++ modify it under the terms of the GNU Lesser General Public License as
3357++ published by the Free Software Foundation; either version 2.1 of the
3358++ License, or (at your option) any later version.
3359++
3360++ The GNU C Library is distributed in the hope that it will be useful,
3361++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3362++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3363++ Lesser General Public License for more details.
3364++
3365++ You should have received a copy of the GNU Lesser General Public
3366++ License along with the GNU C Library. If not, see
3367++ <http://www.gnu.org/licenses/>. */
3368++
3369++#define JB_X19 0
3370++#define JB_X20 1
3371++#define JB_X21 2
3372++#define JB_X22 3
3373++#define JB_X23 4
3374++#define JB_X24 5
3375++#define JB_X25 6
3376++#define JB_X26 7
3377++#define JB_X27 8
3378++#define JB_X28 9
3379++#define JB_X29 10
3380++#define JB_LR 11
3381++#define JB_SP 13
3382++
3383++#define JB_D8 14
3384++#define JB_D9 15
3385++#define JB_D10 16
3386++#define JB_D11 17
3387++#define JB_D12 18
3388++#define JB_D13 19
3389++#define JB_D14 20
3390++#define JB_D15 21
3391++
3392++/* Helper for generic ____longjmp_chk(). */
3393++#define JB_FRAME_ADDRESS(buf) \
3394++ ((void *) (unsigned long) (buf[JB_SP]))
3395+--- /dev/null
3396++++ libc/ports/sysdeps/aarch64/jmpbuf-unwind.h
3397+@@ -0,0 +1,47 @@
3398++/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
3399++ Copyright (C) 2009-2012.
3400++
3401++ This file is part of the GNU C Library.
3402++
3403++ The GNU C Library is free software; you can redistribute it and/or
3404++ modify it under the terms of the GNU Lesser General Public License as
3405++ published by the Free Software Foundation; either version 2.1 of the
3406++ License, or (at your option) any later version.
3407++
3408++ The GNU C Library is distributed in the hope that it will be useful,
3409++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3410++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3411++ Lesser General Public License for more details.
3412++
3413++ You should have received a copy of the GNU Lesser General Public
3414++ License along with the GNU C Library; if not, see
3415++ <http://www.gnu.org/licenses/>. */
3416++
3417++#include <setjmp.h>
3418++#include <jmpbuf-offsets.h>
3419++#include <stdint.h>
3420++#include <unwind.h>
3421++
3422++/* Test if longjmp to JMPBUF would unwind the frame
3423++ containing a local variable at ADDRESS. */
3424++#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
3425++ ((void *) (address) < (void *) demangle (jmpbuf[JB_SP]))
3426++
3427++#define _JMPBUF_CFA_UNWINDS_ADJ(jmpbuf, context, adj) \
3428++ _JMPBUF_UNWINDS_ADJ (jmpbuf, (void *) _Unwind_GetCFA (context), adj)
3429++
3430++static inline uintptr_t __attribute__ ((unused))
3431++_jmpbuf_sp (__jmp_buf jmpbuf)
3432++{
3433++ uintptr_t sp = jmpbuf[JB_SP];
3434++#ifdef PTR_DEMANGLE
3435++ PTR_DEMANGLE (sp);
3436++#endif
3437++ return sp;
3438++}
3439++
3440++#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
3441++ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
3442++
3443++/* We use the normal longjmp for unwinding. */
3444++#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
3445+--- /dev/null
3446++++ libc/ports/sysdeps/aarch64/ldsodefs.h
3447+@@ -0,0 +1,49 @@
3448++/* Copyright (C) 2005 Free Software Foundation, Inc.
3449++ Copyright (C) 2009-2012.
3450++
3451++ This file is part of the GNU C Library.
3452++
3453++ The GNU C Library is free software; you can redistribute it and/or
3454++ modify it under the terms of the GNU Lesser General Public License as
3455++ published by the Free Software Foundation; either version 2.1 of the
3456++ License, or (at your option) any later version.
3457++
3458++ The GNU C Library is distributed in the hope that it will be useful,
3459++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3460++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3461++ Lesser General Public License for more details.
3462++
3463++ You should have received a copy of the GNU Lesser General Public
3464++ License along with the GNU C Library; if not, see
3465++ <http://www.gnu.org/licenses/>. */
3466++
3467++#ifndef _AARCH64_LDSODEFS_H
3468++#define _AARCH64_LDSODEFS_H 1
3469++
3470++#include <elf.h>
3471++
3472++struct La_aarch64_regs;
3473++struct La_aarch64_retval;
3474++
3475++#define ARCH_PLTENTER_MEMBERS \
3476++ ElfW(Addr) (*aarch64_gnu_pltenter) (ElfW(Sym) *, \
3477++ unsigned int, \
3478++ uintptr_t *, \
3479++ uintptr_t *, \
3480++ struct La_aarch64_regs *, \
3481++ unsigned int *, \
3482++ const char *, \
3483++ long int *)
3484++
3485++#define ARCH_PLTEXIT_MEMBERS \
3486++ ElfW(Addr) (*aarch64_gnu_pltexit) (ElfW(Sym) *, \
3487++ unsigned int, \
3488++ uintptr_t *, \
3489++ uintptr_t *, \
3490++ struct La_aarch64_regs *, \
3491++ struct La_aarch64_retval *, \
3492++ const char *)
3493++
3494++#include_next <ldsodefs.h>
3495++
3496++#endif
3497+--- /dev/null
3498++++ libc/ports/sysdeps/aarch64/libc-tls.c
3499+@@ -0,0 +1,33 @@
3500++/* Copyright (C) 2005 Free Software Foundation, Inc.
3501++ Copyright (C) 2009-2012.
3502++
3503++ This file is part of the GNU C Library.
3504++
3505++ The GNU C Library is free software; you can redistribute it and/or
3506++ modify it under the terms of the GNU Lesser General Public License as
3507++ published by the Free Software Foundation; either version 2.1 of the
3508++ License, or (at your option) any later version.
3509++
3510++ The GNU C Library is distributed in the hope that it will be useful,
3511++ but WITHOUT ANY WARRANTY; without even the implied warranty of
3512++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3513++ Lesser General Public License for more details.
3514++
3515++ You should have received a copy of the GNU Lesser General Public
3516++ License along with the GNU C Library; if not, see
3517++ <http://www.gnu.org/licenses/>. */
3518++
3519++#include <csu/libc-tls.c>
3520++#include <dl-tls.h>
3521++
3522++/* On AArch64, linker optimizations are not required, so __tls_get_addr
3523++ can be called even in statically linked binaries. In this case module
3524++ must be always 1 and PT_TLS segment exist in the binary, otherwise it
3525++ would not link. */
3526++
3527++void *
3528++__tls_get_addr (tls_index *ti)
3529++{
3530++ dtv_t *dtv = THREAD_DTV ();
3531++ return (char *) dtv[1].pointer.val + ti->ti_offset;
3532++}
3533+--- /dev/null
3534++++ libc/ports/sysdeps/aarch64/libm-test-ulps
3535+@@ -0,0 +1,3350 @@
3536++# Begin of automatic generation
3537++
3538++# acos_downward
3539++Test "acos_downward (-0) == pi/2":
3540++float: 1
3541++ifloat: 1
3542++Test "acos_downward (-0.5) == M_PI_6l*4.0":
3543++double: 1
3544++idouble: 1
3545++Test "acos_downward (-1) == pi":
3546++float: 1
3547++ifloat: 1
3548++Test "acos_downward (0) == pi/2":
3549++float: 1
3550++ifloat: 1
3551++Test "acos_downward (0.5) == M_PI_6l*2.0":
3552++double: 1
3553++float: 1
3554++idouble: 1
3555++ifloat: 1
3556++ildouble: 1
3557++ldouble: 1
3558++
3559++# acos_towardzero
3560++Test "acos_towardzero (-0) == pi/2":
3561++float: 1
3562++ifloat: 1
3563++Test "acos_towardzero (-0.5) == M_PI_6l*4.0":
3564++double: 1
3565++idouble: 1
3566++Test "acos_towardzero (-1) == pi":
3567++float: 1
3568++ifloat: 1
3569++Test "acos_towardzero (0) == pi/2":
3570++float: 1
3571++ifloat: 1
3572++Test "acos_towardzero (0.5) == M_PI_6l*2.0":
3573++double: 1
3574++float: 1
3575++idouble: 1
3576++ifloat: 1
3577++ildouble: 1
3578++ldouble: 1
3579++
3580++# acos_upward
3581++Test "acos_upward (-0) == pi/2":
3582++ildouble: 1
3583++ldouble: 1
3584++Test "acos_upward (-1) == pi":
3585++ildouble: 1
3586++ldouble: 1
3587++Test "acos_upward (0) == pi/2":
3588++ildouble: 1
3589++ldouble: 1
3590++
3591++# asin_downward
3592++Test "asin_downward (-0.5) == -pi/6":
3593++double: 1
3594++idouble: 1
3595++ildouble: 1
3596++ldouble: 1
3597++Test "asin_downward (-1.0) == -pi/2":
3598++ildouble: 1
3599++ldouble: 1
3600++Test "asin_downward (0.5) == pi/6":
3601++double: 1
3602++idouble: 1
3603++ildouble: 1
3604++ldouble: 1
3605++Test "asin_downward (1.0) == pi/2":
3606++float: 1
3607++ifloat: 1
3608++
3609++# asin_towardzero
3610++Test "asin_towardzero (-0.5) == -pi/6":
3611++double: 1
3612++idouble: 1
3613++Test "asin_towardzero (-1.0) == -pi/2":
3614++float: 1
3615++ifloat: 1
3616++Test "asin_towardzero (0.5) == pi/6":
3617++double: 1
3618++idouble: 1
3619++Test "asin_towardzero (1.0) == pi/2":
3620++float: 1
3621++ifloat: 1
3622++
3623++# asin_upward
3624++Test "asin_upward (-1.0) == -pi/2":
3625++float: 1
3626++ifloat: 1
3627++Test "asin_upward (1.0) == pi/2":
3628++ildouble: 1
3629++ldouble: 1
3630++
3631++# atan2
3632++Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
3633++ildouble: 1
3634++ldouble: 1
3635++Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
3636++float: 1
3637++ifloat: 1
3638++ildouble: 1
3639++ldouble: 1
3640++Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
3641++float: 1
3642++ifloat: 1
3643++ildouble: 1
3644++ldouble: 1
3645++Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
3646++float: 1
3647++ifloat: 1
3648++ildouble: 1
3649++ldouble: 1
3650++
3651++# atanh
3652++Test "atanh (0.75) == 0.972955074527656652552676371721589865":
3653++float: 1
3654++ifloat: 1
3655++
3656++# cacos
3657++Test "Imaginary part of: cacos (+0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i":
3658++double: 2
3659++float: 1
3660++idouble: 2
3661++ifloat: 1
3662++ildouble: 1
3663++ldouble: 1
3664++Test "Imaginary part of: cacos (+0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i":
3665++double: 2
3666++float: 1
3667++idouble: 2
3668++ifloat: 1
3669++ildouble: 3
3670++ldouble: 3
3671++Test "Imaginary part of: cacos (+0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i":
3672++double: 2
3673++float: 1
3674++idouble: 2
3675++ifloat: 1
3676++ildouble: 2
3677++ldouble: 2
3678++Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
3679++float: 1
3680++ifloat: 1
3681++ildouble: 1
3682++ldouble: 1
3683++Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
3684++double: 1
3685++float: 1
3686++idouble: 1
3687++ifloat: 1
3688++ildouble: 1
3689++ldouble: 1
3690++Test "Imaginary part of: cacos (+0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i":
3691++double: 1
3692++idouble: 1
3693++ildouble: 1
3694++ldouble: 1
3695++Test "Imaginary part of: cacos (-0 + 0.5 i) == pi/2 - 0.4812118250596034474977589134243684231352 i":
3696++double: 2
3697++float: 1
3698++idouble: 2
3699++ifloat: 1
3700++ildouble: 1
3701++ldouble: 1
3702++Test "Imaginary part of: cacos (-0 + 1.0 i) == pi/2 - 0.8813735870195430252326093249797923090282 i":
3703++double: 2
3704++float: 1
3705++idouble: 2
3706++ifloat: 1
3707++ildouble: 3
3708++ldouble: 3
3709++Test "Imaginary part of: cacos (-0 + 1.5 i) == pi/2 - 1.194763217287109304111930828519090523536 i":
3710++double: 2
3711++float: 1
3712++idouble: 2
3713++ifloat: 1
3714++ildouble: 2
3715++ldouble: 2
3716++Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
3717++float: 1
3718++ifloat: 1
3719++ildouble: 1
3720++ldouble: 1
3721++Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
3722++double: 1
3723++float: 1
3724++idouble: 1
3725++ifloat: 1
3726++ildouble: 1
3727++ldouble: 1
3728++Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i":
3729++double: 1
3730++idouble: 1
3731++ildouble: 1
3732++ldouble: 1
3733++Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i":
3734++double: 1
3735++float: 1
3736++idouble: 1
3737++ifloat: 1
3738++ildouble: 1
3739++ldouble: 1
3740++Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i":
3741++double: 1
3742++idouble: 1
3743++ildouble: 1
3744++ldouble: 1
3745++Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i":
3746++double: 1
3747++idouble: 1
3748++ildouble: 1
3749++ldouble: 1
3750++Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
3751++ildouble: 1
3752++ldouble: 1
3753++Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i":
3754++double: 1
3755++float: 1
3756++idouble: 1
3757++ifloat: 1
3758++ildouble: 1
3759++ldouble: 1
3760++
3761++# cacosh
3762++Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
3763++float: 1
3764++ifloat: 1
3765++ildouble: 1
3766++ldouble: 1
3767++Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
3768++double: 1
3769++float: 1
3770++idouble: 1
3771++ifloat: 1
3772++ildouble: 1
3773++ldouble: 1
3774++Test "Real part of: cacosh (+0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i":
3775++double: 1
3776++idouble: 1
3777++ildouble: 1
3778++ldouble: 1
3779++Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
3780++float: 1
3781++ifloat: 1
3782++ildouble: 1
3783++ldouble: 1
3784++Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
3785++double: 1
3786++float: 1
3787++idouble: 1
3788++ifloat: 1
3789++ildouble: 1
3790++ldouble: 1
3791++Test "Real part of: cacosh (+0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i":
3792++double: 1
3793++idouble: 1
3794++ildouble: 1
3795++ldouble: 1
3796++Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
3797++float: 1
3798++ifloat: 1
3799++ildouble: 1
3800++ldouble: 1
3801++Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
3802++double: 1
3803++float: 1
3804++idouble: 1
3805++ifloat: 1
3806++ildouble: 1
3807++ldouble: 1
3808++Test "Real part of: cacosh (-0 + 1.5 i) == 1.194763217287109304111930828519090523536 + pi/2 i":
3809++double: 1
3810++idouble: 1
3811++ildouble: 1
3812++ldouble: 1
3813++Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
3814++float: 1
3815++ifloat: 1
3816++ildouble: 1
3817++ldouble: 1
3818++Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
3819++double: 1
3820++float: 1
3821++idouble: 1
3822++ifloat: 1
3823++ildouble: 1
3824++ldouble: 1
3825++Test "Real part of: cacosh (-0 - 1.5 i) == 1.194763217287109304111930828519090523536 - pi/2 i":
3826++double: 1
3827++idouble: 1
3828++ildouble: 1
3829++ldouble: 1
3830++Test "Imaginary part of: cacosh (-0.5 + +0 i) == +0 + 2.094395102393195492308428922186335256131 i":
3831++double: 1
3832++idouble: 1
3833++Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.094395102393195492308428922186335256131 i":
3834++double: 1
3835++idouble: 1
3836++Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i":
3837++float: 1
3838++ifloat: 1
3839++ildouble: 1
3840++ldouble: 1
3841++Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i":
3842++float: 1
3843++ifloat: 1
3844++ildouble: 1
3845++ldouble: 1
3846++Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
3847++float: 1
3848++ifloat: 1
3849++ildouble: 1
3850++ldouble: 1
3851++Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i":
3852++float: 1
3853++ifloat: 1
3854++ildouble: 1
3855++ldouble: 1
3856++Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i":
3857++float: 1
3858++ifloat: 1
3859++ildouble: 1
3860++ldouble: 1
3861++
3862++# casin
3863++Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i":
3864++double: 2
3865++float: 1
3866++idouble: 2
3867++ifloat: 1
3868++ildouble: 1
3869++ldouble: 1
3870++Test "Imaginary part of: casin (+0 + 1.0 i) == +0 + 0.8813735870195430252326093249797923090282 i":
3871++double: 2
3872++float: 1
3873++idouble: 2
3874++ifloat: 1
3875++ildouble: 3
3876++ldouble: 3
3877++Test "Imaginary part of: casin (+0 + 1.5 i) == +0 + 1.194763217287109304111930828519090523536 i":
3878++double: 2
3879++float: 1
3880++idouble: 2
3881++ifloat: 1
3882++ildouble: 2
3883++ldouble: 2
3884++Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i":
3885++float: 1
3886++ifloat: 1
3887++ildouble: 1
3888++ldouble: 1
3889++Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i":
3890++double: 1
3891++float: 1
3892++idouble: 1
3893++ifloat: 1
3894++ildouble: 1
3895++ldouble: 1
3896++Test "Imaginary part of: casin (+0 - 1.5 i) == +0 - 1.194763217287109304111930828519090523536 i":
3897++double: 1
3898++idouble: 1
3899++ildouble: 1
3900++ldouble: 1
3901++Test "Imaginary part of: casin (-0 + 0.5 i) == -0 + 0.4812118250596034474977589134243684231352 i":
3902++double: 2
3903++float: 1
3904++idouble: 2
3905++ifloat: 1
3906++ildouble: 1
3907++ldouble: 1
3908++Test "Imaginary part of: casin (-0 + 1.0 i) == -0 + 0.8813735870195430252326093249797923090282 i":
3909++double: 2
3910++float: 1
3911++idouble: 2
3912++ifloat: 1
3913++ildouble: 3
3914++ldouble: 3
3915++Test "Imaginary part of: casin (-0 + 1.5 i) == -0 + 1.194763217287109304111930828519090523536 i":
3916++double: 2
3917++float: 1
3918++idouble: 2
3919++ifloat: 1
3920++ildouble: 2
3921++ldouble: 2
3922++Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i":
3923++float: 1
3924++ifloat: 1
3925++ildouble: 1
3926++ldouble: 1
3927++Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i":
3928++double: 1
3929++float: 1
3930++idouble: 1
3931++ifloat: 1
3932++ildouble: 1
3933++ldouble: 1
3934++Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i":
3935++double: 1
3936++idouble: 1
3937++ildouble: 1
3938++ldouble: 1
3939++Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i":
3940++double: 1
3941++float: 1
3942++idouble: 1
3943++ifloat: 1
3944++ildouble: 1
3945++ldouble: 1
3946++Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
3947++double: 1
3948++float: 1
3949++idouble: 1
3950++ifloat: 1
3951++Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
3952++ildouble: 1
3953++ldouble: 1
3954++Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i":
3955++double: 1
3956++float: 1
3957++idouble: 1
3958++ifloat: 1
3959++ildouble: 1
3960++ldouble: 1
3961++
3962++# casinh
3963++Test "Real part of: casinh (-0 + 1.5 i) == -0.9624236501192068949955178268487368462704 + pi/2 i":
3964++double: 1
3965++float: 1
3966++idouble: 1
3967++ifloat: 1
3968++ildouble: 1
3969++ldouble: 1
3970++Test "Real part of: casinh (-0 - 1.5 i) == -0.9624236501192068949955178268487368462704 - pi/2 i":
3971++double: 1
3972++float: 1
3973++idouble: 1
3974++ifloat: 1
3975++ildouble: 1
3976++ldouble: 1
3977++Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i":
3978++double: 2
3979++float: 1
3980++idouble: 2
3981++ifloat: 1
3982++ildouble: 1
3983++ldouble: 1
3984++Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i":
3985++double: 2
3986++float: 1
3987++idouble: 2
3988++ifloat: 1
3989++ildouble: 1
3990++ldouble: 1
3991++Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i":
3992++double: 2
3993++float: 1
3994++idouble: 2
3995++ifloat: 1
3996++ildouble: 3
3997++ldouble: 3
3998++Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i":
3999++double: 2
4000++float: 1
4001++idouble: 2
4002++ifloat: 1
4003++ildouble: 3
4004++ldouble: 3
4005++Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i":
4006++double: 2
4007++float: 1
4008++idouble: 2
4009++ifloat: 1
4010++ildouble: 2
4011++ldouble: 2
4012++Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i":
4013++double: 2
4014++float: 1
4015++idouble: 2
4016++ifloat: 1
4017++ildouble: 2
4018++ldouble: 2
4019++Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
4020++double: 5
4021++float: 1
4022++idouble: 5
4023++ifloat: 1
4024++ildouble: 4
4025++ldouble: 4
4026++Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
4027++double: 3
4028++float: 6
4029++idouble: 3
4030++ifloat: 6
4031++ildouble: 2
4032++ldouble: 2
4033++Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i":
4034++float: 1
4035++ifloat: 1
4036++ildouble: 1
4037++ldouble: 1
4038++Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i":
4039++float: 1
4040++ifloat: 1
4041++ildouble: 1
4042++ldouble: 1
4043++Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
4044++float: 1
4045++ifloat: 1
4046++ildouble: 1
4047++ldouble: 1
4048++Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
4049++double: 1
4050++float: 1
4051++idouble: 1
4052++ifloat: 1
4053++ildouble: 1
4054++ldouble: 1
4055++Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i":
4056++double: 1
4057++float: 1
4058++idouble: 1
4059++ifloat: 1
4060++ildouble: 1
4061++ldouble: 1
4062++Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i":
4063++double: 1
4064++float: 1
4065++idouble: 1
4066++ifloat: 1
4067++ildouble: 1
4068++ldouble: 1
4069++Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i":
4070++double: 1
4071++idouble: 1
4072++ildouble: 1
4073++ldouble: 1
4074++Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i":
4075++double: 1
4076++idouble: 1
4077++ildouble: 1
4078++ldouble: 1
4079++
4080++# catan
4081++Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
4082++double: 1
4083++float: 1
4084++idouble: 1
4085++ifloat: 1
4086++Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
4087++ildouble: 1
4088++ldouble: 1
4089++
4090++# catanh
4091++Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
4092++double: 4
4093++idouble: 4
4094++Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
4095++double: 1
4096++idouble: 1
4097++ildouble: 1
4098++ldouble: 1
4099++Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
4100++ildouble: 1
4101++ldouble: 1
4102++
4103++# cbrt
4104++Test "cbrt (-0.001) == -0.1":
4105++ildouble: 1
4106++ldouble: 1
4107++Test "cbrt (-27.0) == -3.0":
4108++double: 1
4109++idouble: 1
4110++Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
4111++double: 1
4112++idouble: 1
4113++
4114++# ccos
4115++Test "Imaginary part of: ccos (-0.75 + 11357.25 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
4116++ildouble: 1
4117++ldouble: 1
4118++Test "Imaginary part of: ccos (-0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
4119++double: 1
4120++idouble: 1
4121++ildouble: 1
4122++ldouble: 1
4123++Test "Real part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4124++ildouble: 1
4125++ldouble: 1
4126++Test "Imaginary part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4127++float: 1
4128++ifloat: 1
4129++ildouble: 1
4130++ldouble: 1
4131++Test "Imaginary part of: ccos (-0.75 - 11357.25 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
4132++ildouble: 1
4133++ldouble: 1
4134++Test "Imaginary part of: ccos (-0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
4135++double: 1
4136++idouble: 1
4137++ildouble: 1
4138++ldouble: 1
4139++Test "Real part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4140++ildouble: 1
4141++ldouble: 1
4142++Test "Imaginary part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4143++float: 1
4144++ifloat: 1
4145++ildouble: 1
4146++ldouble: 1
4147++Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
4148++ildouble: 1
4149++ldouble: 1
4150++Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
4151++float: 1
4152++ifloat: 1
4153++ildouble: 1
4154++ldouble: 1
4155++Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
4156++double: 1
4157++float: 1
4158++idouble: 1
4159++ifloat: 1
4160++Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
4161++float: 1
4162++ifloat: 1
4163++Test "Imaginary part of: ccos (0.75 + 11357.25 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
4164++ildouble: 1
4165++ldouble: 1
4166++Test "Imaginary part of: ccos (0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
4167++double: 1
4168++idouble: 1
4169++ildouble: 1
4170++ldouble: 1
4171++Test "Real part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4172++ildouble: 1
4173++ldouble: 1
4174++Test "Imaginary part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4175++float: 1
4176++ifloat: 1
4177++ildouble: 1
4178++ldouble: 1
4179++Test "Imaginary part of: ccos (0.75 - 11357.25 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
4180++ildouble: 1
4181++ldouble: 1
4182++Test "Imaginary part of: ccos (0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
4183++double: 1
4184++idouble: 1
4185++ildouble: 1
4186++ldouble: 1
4187++Test "Real part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4188++ildouble: 1
4189++ldouble: 1
4190++Test "Imaginary part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4191++float: 1
4192++ifloat: 1
4193++ildouble: 1
4194++ldouble: 1
4195++Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i":
4196++double: 1
4197++idouble: 1
4198++Test "Imaginary part of: ccos (0x1p-16434 + 22730 i) == inf - 1.217853148905605987081057582351152052687e4924 i":
4199++ildouble: 1
4200++ldouble: 1
4201++
4202++# ccosh
4203++Test "Imaginary part of: ccosh (-11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
4204++ildouble: 1
4205++ldouble: 1
4206++Test "Imaginary part of: ccosh (-11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
4207++ildouble: 1
4208++ldouble: 1
4209++Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
4210++float: 1
4211++ifloat: 1
4212++ildouble: 1
4213++ldouble: 1
4214++Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
4215++float: 1
4216++ifloat: 1
4217++ildouble: 1
4218++ldouble: 1
4219++Test "Imaginary part of: ccosh (-710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
4220++double: 1
4221++idouble: 1
4222++ildouble: 1
4223++ldouble: 1
4224++Test "Imaginary part of: ccosh (-710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
4225++double: 1
4226++idouble: 1
4227++ildouble: 1
4228++ldouble: 1
4229++Test "Real part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4230++ildouble: 1
4231++ldouble: 1
4232++Test "Imaginary part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4233++float: 1
4234++ifloat: 1
4235++ildouble: 1
4236++ldouble: 1
4237++Test "Real part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4238++ildouble: 1
4239++ldouble: 1
4240++Test "Imaginary part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4241++float: 1
4242++ifloat: 1
4243++ildouble: 1
4244++ldouble: 1
4245++Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
4246++double: 1
4247++float: 1
4248++idouble: 1
4249++ifloat: 1
4250++Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
4251++float: 1
4252++ifloat: 1
4253++Test "Imaginary part of: ccosh (11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
4254++ildouble: 1
4255++ldouble: 1
4256++Test "Imaginary part of: ccosh (11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
4257++ildouble: 1
4258++ldouble: 1
4259++Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i":
4260++double: 1
4261++idouble: 1
4262++Test "Imaginary part of: ccosh (22730 + 0x1p-16434 i) == inf + 1.217853148905605987081057582351152052687e4924 i":
4263++ildouble: 1
4264++ldouble: 1
4265++Test "Imaginary part of: ccosh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
4266++double: 1
4267++idouble: 1
4268++ildouble: 1
4269++ldouble: 1
4270++Test "Imaginary part of: ccosh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
4271++double: 1
4272++idouble: 1
4273++ildouble: 1
4274++ldouble: 1
4275++Test "Real part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4276++ildouble: 1
4277++ldouble: 1
4278++Test "Imaginary part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4279++float: 1
4280++ifloat: 1
4281++ildouble: 1
4282++ldouble: 1
4283++Test "Real part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4284++ildouble: 1
4285++ldouble: 1
4286++Test "Imaginary part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4287++float: 1
4288++ifloat: 1
4289++ildouble: 1
4290++ldouble: 1
4291++
4292++# cexp
4293++Test "Imaginary part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i":
4294++ildouble: 1
4295++ldouble: 1
4296++Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
4297++ildouble: 1
4298++ldouble: 1
4299++Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
4300++float: 1
4301++ifloat: 1
4302++ildouble: 1
4303++ldouble: 1
4304++Test "Imaginary part of: cexp (-720 + 0.75 i) == 1.486960657116368433685753325516638551722e-313 + 1.385247284245720590980701226843815229385e-313 i":
4305++ildouble: 1
4306++ldouble: 1
4307++Test "Imaginary part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i":
4308++double: 1
4309++idouble: 1
4310++Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
4311++float: 1
4312++ifloat: 1
4313++Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
4314++ildouble: 1
4315++ldouble: 1
4316++Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i":
4317++double: 1
4318++idouble: 1
4319++Test "Imaginary part of: cexp (1440 + 0x1p-1074 i) == inf + 1.196295853897226111293303155636183216483e302 i plus overflow exception":
4320++double: 1
4321++idouble: 1
4322++Test "Imaginary part of: cexp (22730 + 0x1p-16434 i) == inf + 2.435706297811211974162115164702304105374e4924 i":
4323++ildouble: 1
4324++ldouble: 1
4325++Test "Imaginary part of: cexp (22730 + 0x1p-16434 i) == inf + 2.435706297811211974162115164702304105374e4924 i plus overflow exception":
4326++ildouble: 1
4327++ldouble: 1
4328++Test "Real part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
4329++double: 2
4330++float: 1
4331++idouble: 2
4332++ifloat: 1
4333++ildouble: 1
4334++ldouble: 1
4335++Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
4336++double: 1
4337++idouble: 1
4338++Test "Real part of: cexp (500 + 0x1p1023 i) == -1.159886268932754433233243794561351783426e217 + 7.904017694554466595359379965081774849708e216 i":
4339++double: 1
4340++idouble: 1
4341++Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
4342++double: 1
4343++idouble: 1
4344++Test "Imaginary part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
4345++double: 1
4346++idouble: 1
4347++ildouble: 1
4348++ldouble: 1
4349++Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
4350++float: 1
4351++ifloat: 1
4352++ildouble: 1
4353++ldouble: 1
4354++Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
4355++float: 2
4356++ifloat: 2
4357++ildouble: 1
4358++ldouble: 1
4359++
4360++# clog
4361++Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
4362++float: 1
4363++ifloat: 1
4364++ildouble: 1
4365++ldouble: 1
4366++Test "Imaginary part of: clog (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 709.8942846690411016323109979483151967689 + 0.4636476090008061606231772164674799632783 i":
4367++double: 1
4368++idouble: 1
4369++Test "Real part of: clog (0x1.fp+16383 + 0x1.fp+16383 i) == 11356.83823118610934184548269774874545400 + pi/4 i":
4370++ildouble: 1
4371++ldouble: 1
4372++Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
4373++double: 1
4374++idouble: 1
4375++Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i":
4376++float: 1
4377++ifloat: 1
4378++
4379++# clog10
4380++Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
4381++double: 1
4382++float: 1
4383++idouble: 1
4384++ifloat: 1
4385++Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
4386++double: 1
4387++float: 1
4388++idouble: 1
4389++ifloat: 1
4390++Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
4391++ildouble: 1
4392++ldouble: 1
4393++Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
4394++double: 1
4395++idouble: 1
4396++ildouble: 1
4397++ldouble: 1
4398++Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
4399++double: 1
4400++float: 1
4401++idouble: 1
4402++ifloat: 1
4403++Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
4404++double: 1
4405++float: 1
4406++idouble: 1
4407++ifloat: 1
4408++Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
4409++double: 1
4410++float: 1
4411++idouble: 1
4412++ifloat: 1
4413++Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
4414++double: 1
4415++float: 1
4416++idouble: 1
4417++ifloat: 1
4418++Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
4419++double: 1
4420++idouble: 1
4421++Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
4422++double: 1
4423++float: 1
4424++idouble: 1
4425++ifloat: 1
4426++Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
4427++double: 1
4428++float: 1
4429++idouble: 1
4430++ifloat: 1
4431++Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
4432++double: 1
4433++float: 1
4434++idouble: 1
4435++ifloat: 1
4436++Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
4437++double: 1
4438++float: 1
4439++idouble: 1
4440++ifloat: 1
4441++Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
4442++float: 1
4443++ifloat: 1
4444++Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
4445++ildouble: 1
4446++ldouble: 1
4447++Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
4448++double: 1
4449++float: 1
4450++idouble: 1
4451++ifloat: 1
4452++Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i":
4453++float: 1
4454++ifloat: 1
4455++Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 308.4052305577487344482591243175787477115 + pi/4*log10(e) i":
4456++double: 1
4457++idouble: 1
4458++Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 308.3031705664207720674749211936626341569 + 0.2013595981366865903254995612594728746470 i":
4459++double: 1
4460++idouble: 1
4461++Test "Real part of: clog10 (0x1.fp+16383 + 0x1.fp+16383 i) == 4932.212175672014259683102930239951947672 + pi/4*log10(e) i":
4462++ildouble: 1
4463++ldouble: 1
4464++Test "Real part of: clog10 (0x1.fp+16383 + 0x1p+16383 i) == 4932.112944269463028900262609694408579449 + 0.2069271710841128115912940666587802677383 i":
4465++ildouble: 1
4466++ldouble: 1
4467++Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
4468++double: 1
4469++idouble: 1
4470++Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
4471++double: 1
4472++idouble: 1
4473++Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
4474++double: 1
4475++idouble: 1
4476++Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i":
4477++double: 1
4478++float: 1
4479++idouble: 1
4480++ifloat: 1
4481++Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i":
4482++double: 1
4483++float: 1
4484++idouble: 1
4485++ifloat: 1
4486++Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
4487++double: 1
4488++float: 1
4489++idouble: 1
4490++ifloat: 1
4491++Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
4492++double: 1
4493++float: 1
4494++idouble: 1
4495++ifloat: 1
4496++Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
4497++double: 1
4498++float: 1
4499++idouble: 1
4500++ifloat: 1
4501++Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
4502++double: 1
4503++float: 1
4504++idouble: 1
4505++ifloat: 1
4506++
4507++# cos
4508++Test "cos (M_PI_6l * 2.0) == 0.5":
4509++double: 1
4510++idouble: 1
4511++Test "cos (M_PI_6l * 4.0) == -0.5":
4512++double: 2
4513++float: 1
4514++idouble: 2
4515++ifloat: 1
4516++ildouble: 1
4517++ldouble: 1
4518++
4519++# cos_downward
4520++Test "cos_downward (1) == 0.5403023058681397174009366074429766037323":
4521++float: 1
4522++ifloat: 1
4523++Test "cos_downward (10) == -0.8390715290764524522588639478240648345199":
4524++ildouble: 1
4525++ldouble: 1
4526++Test "cos_downward (2) == -0.4161468365471423869975682295007621897660":
4527++float: 1
4528++ifloat: 1
4529++ildouble: 1
4530++ldouble: 1
4531++Test "cos_downward (3) == -0.9899924966004454572715727947312613023937":
4532++float: 1
4533++ifloat: 1
4534++ildouble: 1
4535++ldouble: 1
4536++Test "cos_downward (4) == -0.6536436208636119146391681830977503814241":
4537++float: 1
4538++ifloat: 1
4539++Test "cos_downward (5) == 0.2836621854632262644666391715135573083344":
4540++float: 1
4541++ifloat: 1
4542++ildouble: 1
4543++ldouble: 1
4544++Test "cos_downward (6) == 0.9601702866503660205456522979229244054519":
4545++ildouble: 1
4546++ldouble: 1
4547++Test "cos_downward (7) == 0.7539022543433046381411975217191820122183":
4548++float: 1
4549++ifloat: 1
4550++ildouble: 1
4551++ldouble: 1
4552++Test "cos_downward (8) == -0.1455000338086135258688413818311946826093":
4553++float: 1
4554++ifloat: 1
4555++ildouble: 2
4556++ldouble: 2
4557++
4558++# cos_tonearest
4559++Test "cos_tonearest (7) == 0.7539022543433046381411975217191820122183":
4560++float: 1
4561++ifloat: 1
4562++
4563++# cos_towardzero
4564++Test "cos_towardzero (10) == -0.8390715290764524522588639478240648345199":
4565++ildouble: 1
4566++ldouble: 1
4567++Test "cos_towardzero (2) == -0.4161468365471423869975682295007621897660":
4568++float: 1
4569++ifloat: 1
4570++ildouble: 1
4571++ldouble: 1
4572++Test "cos_towardzero (3) == -0.9899924966004454572715727947312613023937":
4573++float: 1
4574++ifloat: 1
4575++ildouble: 1
4576++ldouble: 1
4577++Test "cos_towardzero (5) == 0.2836621854632262644666391715135573083344":
4578++float: 1
4579++ifloat: 1
4580++ildouble: 1
4581++ldouble: 1
4582++Test "cos_towardzero (6) == 0.9601702866503660205456522979229244054519":
4583++ildouble: 1
4584++ldouble: 1
4585++Test "cos_towardzero (7) == 0.7539022543433046381411975217191820122183":
4586++float: 1
4587++ifloat: 1
4588++ildouble: 1
4589++ldouble: 1
4590++Test "cos_towardzero (8) == -0.1455000338086135258688413818311946826093":
4591++float: 1
4592++ifloat: 1
4593++ildouble: 2
4594++ldouble: 2
4595++
4596++# cos_upward
4597++Test "cos_upward (1) == 0.5403023058681397174009366074429766037323":
4598++ildouble: 1
4599++ldouble: 1
4600++Test "cos_upward (10) == -0.8390715290764524522588639478240648345199":
4601++float: 1
4602++ifloat: 1
4603++Test "cos_upward (4) == -0.6536436208636119146391681830977503814241":
4604++ildouble: 1
4605++ldouble: 1
4606++Test "cos_upward (6) == 0.9601702866503660205456522979229244054519":
4607++float: 1
4608++ifloat: 1
4609++Test "cos_upward (7) == 0.7539022543433046381411975217191820122183":
4610++float: 1
4611++ifloat: 1
4612++Test "cos_upward (9) == -0.9111302618846769883682947111811653112463":
4613++float: 2
4614++ifloat: 2
4615++ildouble: 1
4616++ldouble: 1
4617++
4618++# cosh_downward
4619++Test "cosh_downward (22) == 1792456423.065795780980053377632656584997":
4620++float: 1
4621++ifloat: 1
4622++ildouble: 1
4623++ldouble: 1
4624++Test "cosh_downward (23) == 4872401723.124451300068625740569997090344":
4625++float: 1
4626++ifloat: 1
4627++ildouble: 1
4628++ldouble: 1
4629++Test "cosh_downward (24) == 13244561064.92173614708845674912733665919":
4630++float: 1
4631++ifloat: 1
4632++ildouble: 1
4633++ldouble: 1
4634++
4635++# cosh_tonearest
4636++Test "cosh_tonearest (22) == 1792456423.065795780980053377632656584997":
4637++ildouble: 1
4638++ldouble: 1
4639++
4640++# cosh_towardzero
4641++Test "cosh_towardzero (22) == 1792456423.065795780980053377632656584997":
4642++float: 1
4643++ifloat: 1
4644++ildouble: 1
4645++ldouble: 1
4646++Test "cosh_towardzero (23) == 4872401723.124451300068625740569997090344":
4647++float: 1
4648++ifloat: 1
4649++ildouble: 1
4650++ldouble: 1
4651++Test "cosh_towardzero (24) == 13244561064.92173614708845674912733665919":
4652++float: 1
4653++ifloat: 1
4654++ildouble: 1
4655++ldouble: 1
4656++
4657++# cosh_upward
4658++Test "cosh_upward (22) == 1792456423.065795780980053377632656584997":
4659++ildouble: 1
4660++ldouble: 1
4661++Test "cosh_upward (23) == 4872401723.124451300068625740569997090344":
4662++ildouble: 1
4663++ldouble: 1
4664++Test "cosh_upward (24) == 13244561064.92173614708845674912733665919":
4665++ildouble: 1
4666++ldouble: 1
4667++
4668++# cpow
4669++Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
4670++float: 1
4671++ifloat: 1
4672++Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
4673++float: 1
4674++ifloat: 1
4675++Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
4676++double: 1
4677++float: 4
4678++idouble: 1
4679++ifloat: 4
4680++ildouble: 4
4681++ldouble: 4
4682++Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
4683++ildouble: 1
4684++ldouble: 1
4685++Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
4686++double: 2
4687++float: 3
4688++idouble: 2
4689++ifloat: 3
4690++ildouble: 11
4691++ldouble: 11
4692++Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
4693++ildouble: 2
4694++ldouble: 2
4695++Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
4696++double: 1
4697++float: 5
4698++idouble: 1
4699++ifloat: 5
4700++ildouble: 2
4701++ldouble: 2
4702++Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
4703++float: 2
4704++ifloat: 2
4705++Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
4706++double: 2
4707++float: 2
4708++idouble: 2
4709++ifloat: 2
4710++ildouble: 1
4711++ldouble: 1
4712++
4713++# csin
4714++Test "Real part of: csin (-0.75 + 11357.25 i) == -8.385498349388321535962327491346664141020e4931 + 9.001213196851067077465606717616495588201e4931 i":
4715++ildouble: 1
4716++ldouble: 1
4717++Test "Real part of: csin (-0.75 + 710.5 i) == -1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i":
4718++double: 1
4719++idouble: 1
4720++ildouble: 1
4721++ldouble: 1
4722++Test "Real part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i":
4723++float: 1
4724++ifloat: 1
4725++ildouble: 1
4726++ldouble: 1
4727++Test "Imaginary part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i":
4728++ildouble: 1
4729++ldouble: 1
4730++Test "Real part of: csin (-0.75 - 11357.25 i) == -8.385498349388321535962327491346664141020e4931 - 9.001213196851067077465606717616495588201e4931 i":
4731++ildouble: 1
4732++ldouble: 1
4733++Test "Real part of: csin (-0.75 - 710.5 i) == -1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i":
4734++double: 1
4735++idouble: 1
4736++ildouble: 1
4737++ldouble: 1
4738++Test "Real part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i":
4739++float: 1
4740++ifloat: 1
4741++ildouble: 1
4742++ldouble: 1
4743++Test "Imaginary part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i":
4744++ildouble: 1
4745++ldouble: 1
4746++Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
4747++ildouble: 1
4748++ldouble: 1
4749++Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
4750++ildouble: 1
4751++ldouble: 1
4752++Test "Real part of: csin (0.75 + 11357.25 i) == 8.385498349388321535962327491346664141020e4931 + 9.001213196851067077465606717616495588201e4931 i":
4753++ildouble: 1
4754++ldouble: 1
4755++Test "Real part of: csin (0.75 + 710.5 i) == 1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i":
4756++double: 1
4757++idouble: 1
4758++ildouble: 1
4759++ldouble: 1
4760++Test "Real part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i":
4761++float: 1
4762++ifloat: 1
4763++ildouble: 1
4764++ldouble: 1
4765++Test "Imaginary part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i":
4766++ildouble: 1
4767++ldouble: 1
4768++Test "Real part of: csin (0.75 - 11357.25 i) == 8.385498349388321535962327491346664141020e4931 - 9.001213196851067077465606717616495588201e4931 i":
4769++ildouble: 1
4770++ldouble: 1
4771++Test "Real part of: csin (0.75 - 710.5 i) == 1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i":
4772++double: 1
4773++idouble: 1
4774++ildouble: 1
4775++ldouble: 1
4776++Test "Real part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i":
4777++float: 1
4778++ifloat: 1
4779++ildouble: 1
4780++ldouble: 1
4781++Test "Imaginary part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i":
4782++ildouble: 1
4783++ldouble: 1
4784++Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i":
4785++double: 1
4786++idouble: 1
4787++Test "Real part of: csin (0x1p-16434 + 22730 i) == 1.217853148905605987081057582351152052687e4924 + inf i":
4788++ildouble: 1
4789++ldouble: 1
4790++
4791++# csinh
4792++Test "Imaginary part of: csinh (-11357.25 + 0.75 i) == -9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
4793++ildouble: 1
4794++ldouble: 1
4795++Test "Imaginary part of: csinh (-11357.25 - 0.75 i) == -9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
4796++ildouble: 1
4797++ldouble: 1
4798++Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
4799++ildouble: 1
4800++ldouble: 1
4801++Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
4802++double: 1
4803++idouble: 1
4804++Test "Imaginary part of: csinh (-710.5 + 0.75 i) == -1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
4805++double: 1
4806++idouble: 1
4807++ildouble: 1
4808++ldouble: 1
4809++Test "Imaginary part of: csinh (-710.5 - 0.75 i) == -1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
4810++double: 1
4811++idouble: 1
4812++ildouble: 1
4813++ldouble: 1
4814++Test "Real part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4815++ildouble: 1
4816++ldouble: 1
4817++Test "Imaginary part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4818++float: 1
4819++ifloat: 1
4820++ildouble: 1
4821++ldouble: 1
4822++Test "Real part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4823++ildouble: 1
4824++ldouble: 1
4825++Test "Imaginary part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4826++float: 1
4827++ifloat: 1
4828++ildouble: 1
4829++ldouble: 1
4830++Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
4831++float: 1
4832++ifloat: 1
4833++Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
4834++float: 1
4835++ifloat: 1
4836++Test "Imaginary part of: csinh (11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
4837++ildouble: 1
4838++ldouble: 1
4839++Test "Imaginary part of: csinh (11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
4840++ildouble: 1
4841++ldouble: 1
4842++Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i":
4843++double: 1
4844++idouble: 1
4845++Test "Imaginary part of: csinh (22730 + 0x1p-16434 i) == inf + 1.217853148905605987081057582351152052687e4924 i":
4846++ildouble: 1
4847++ldouble: 1
4848++Test "Imaginary part of: csinh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
4849++double: 1
4850++idouble: 1
4851++ildouble: 1
4852++ldouble: 1
4853++Test "Imaginary part of: csinh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
4854++double: 1
4855++idouble: 1
4856++ildouble: 1
4857++ldouble: 1
4858++Test "Real part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4859++ildouble: 1
4860++ldouble: 1
4861++Test "Imaginary part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
4862++float: 1
4863++ifloat: 1
4864++ildouble: 1
4865++ldouble: 1
4866++Test "Real part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4867++ildouble: 1
4868++ldouble: 1
4869++Test "Imaginary part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
4870++float: 1
4871++ifloat: 1
4872++ildouble: 1
4873++ldouble: 1
4874++
4875++# csqrt
4876++Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
4877++float: 1
4878++ifloat: 1
4879++ildouble: 1
4880++ldouble: 1
4881++Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
4882++float: 1
4883++ifloat: 1
4884++ildouble: 1
4885++ldouble: 1
4886++Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
4887++ildouble: 1
4888++ldouble: 1
4889++Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i":
4890++float: 1
4891++ifloat: 1
4892++Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i":
4893++double: 1
4894++idouble: 1
4895++Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i":
4896++double: 1
4897++idouble: 1
4898++ildouble: 1
4899++ldouble: 1
4900++Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i":
4901++double: 1
4902++idouble: 1
4903++ildouble: 1
4904++ldouble: 1
4905++Test "Real part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i) == 1.179514222452201722651836720466795901016e+2466 + 4.885707879516577666702435054303191575148e+2465 i":
4906++ildouble: 1
4907++ldouble: 1
4908++Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i) == 1.179514222452201722651836720466795901016e+2466 + 4.885707879516577666702435054303191575148e+2465 i":
4909++ildouble: 1
4910++ldouble: 1
4911++Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1p+16383 i) == 1.106698967236475180613254276996359485630e+2466 + 2.687568007603946993388538156299100955642e+2465 i":
4912++ildouble: 1
4913++ldouble: 1
4914++Test "Imaginary part of: csqrt (0x1p-16440 + 0x1p-16441 i) == 3.514690655930285351254618340783294558136e-2475 + 8.297059146828716918029689466551384219370e-2476 i":
4915++ildouble: 1
4916++ldouble: 1
4917++
4918++# ctan
4919++Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
4920++float: 1
4921++ifloat: 1
4922++Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
4923++double: 1
4924++idouble: 1
4925++ildouble: 1
4926++ldouble: 1
4927++Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
4928++float: 1
4929++ifloat: 1
4930++ildouble: 1
4931++ldouble: 1
4932++Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
4933++double: 1
4934++float: 1
4935++idouble: 1
4936++ifloat: 1
4937++ildouble: 2
4938++ldouble: 2
4939++Test "Real part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
4940++double: 1
4941++idouble: 1
4942++Test "Imaginary part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
4943++ildouble: 2
4944++ldouble: 2
4945++Test "Real part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
4946++float: 1
4947++ifloat: 1
4948++ildouble: 2
4949++ldouble: 2
4950++Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
4951++double: 1
4952++float: 1
4953++idouble: 1
4954++ifloat: 1
4955++ildouble: 1
4956++ldouble: 1
4957++Test "Real part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i":
4958++ildouble: 1
4959++ldouble: 1
4960++Test "Imaginary part of: ctan (0x1p16383 + 1 i) == 0.1608598776370396607204448234354670036772 + 0.8133818522051542536316746743877629761488 i":
4961++ildouble: 2
4962++ldouble: 2
4963++Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i":
4964++float: 1
4965++ifloat: 1
4966++ildouble: 1
4967++ldouble: 1
4968++Test "Real part of: ctan (1 + 355 i) == 8.140551093483276762350406321792653551513e-309 + 1.0 i":
4969++ildouble: 2
4970++ldouble: 2
4971++Test "Real part of: ctan (1 + 365 i) == 1.677892637497921890115075995898773550884e-317 + 1.0 i":
4972++ildouble: 1
4973++ldouble: 1
4974++Test "Real part of: ctan (1 + 45 i) == 1.490158918874345552942703234806348520895e-39 + 1.000000000000000000000000000000000000001 i":
4975++ildouble: 2
4976++ldouble: 2
4977++Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636e-41 + 1.0 i":
4978++ildouble: 1
4979++ldouble: 1
4980++
4981++# ctanh
4982++Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
4983++double: 1
4984++float: 2
4985++idouble: 1
4986++ifloat: 2
4987++Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
4988++double: 1
4989++idouble: 1
4990++Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i) == 0.0 - 2.287733242885645987394874673945769518150e7 i":
4991++float: 1
4992++ifloat: 1
4993++ildouble: 1
4994++ldouble: 1
4995++Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
4996++double: 1
4997++float: 1
4998++idouble: 1
4999++ifloat: 1
5000++ildouble: 1
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches