summaryrefslogtreecommitdiff
path: root/libgcc/libgcc2.h
diff options
context:
space:
mode:
authorJames Greenhalgh <james.greenhalgh@arm.com>2016-09-09 09:40:22 +0000
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>2016-09-09 09:40:22 +0000
commit0abcd6cc738c5afd131c232ddb6809e6ff8e8def (patch)
treefa60721ba37968ad4ebd70293c6f08a547f86ddf /libgcc/libgcc2.h
parentf67a81a5e266a110963062cf3d76c98d8bcb0974 (diff)
[Patch libgcc] Enable HCmode multiply and divide (mulhc3/divhc3)
This patch arranges for half-precision complex multiply and divide routines to be built if __LIBGCC_HAS_HF_MODE__. This will be true if the target supports the _Float16 type. libgcc/ PR target/63250 * Makefile.in (lib2funcs): Build _mulhc3 and _divhc3. * libgcc2.h (LIBGCC_HAS_HF_MODE): Conditionally define. (HFtype): Likewise. (HCtype): Likewise. (__divhc3): Likewise. (__mulhc3): Likewise. * libgcc2.c: Support _mulhc3 and _divhc3. From-SVN: r240043
Diffstat (limited to 'libgcc/libgcc2.h')
-rw-r--r--libgcc/libgcc2.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h
index 72bb873ac33..c46fb77a6ec 100644
--- a/libgcc/libgcc2.h
+++ b/libgcc/libgcc2.h
@@ -34,6 +34,12 @@ extern void __clear_cache (char *, char *);
extern void __eprintf (const char *, const char *, unsigned int, const char *)
__attribute__ ((__noreturn__));
+#ifdef __LIBGCC_HAS_HF_MODE__
+#define LIBGCC2_HAS_HF_MODE 1
+#else
+#define LIBGCC2_HAS_HF_MODE 0
+#endif
+
#ifdef __LIBGCC_HAS_SF_MODE__
#define LIBGCC2_HAS_SF_MODE 1
#else
@@ -133,6 +139,10 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
#endif
#endif
+#if LIBGCC2_HAS_HF_MODE
+typedef float HFtype __attribute__ ((mode (HF)));
+typedef _Complex float HCtype __attribute__ ((mode (HC)));
+#endif
#if LIBGCC2_HAS_SF_MODE
typedef float SFtype __attribute__ ((mode (SF)));
typedef _Complex float SCtype __attribute__ ((mode (SC)));
@@ -424,6 +434,10 @@ extern SItype __negvsi2 (SItype);
#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */
#undef int
+#if LIBGCC2_HAS_HF_MODE
+extern HCtype __divhc3 (HFtype, HFtype, HFtype, HFtype);
+extern HCtype __mulhc3 (HFtype, HFtype, HFtype, HFtype);
+#endif
#if LIBGCC2_HAS_SF_MODE
extern DWtype __fixsfdi (SFtype);
extern SFtype __floatdisf (DWtype);