From: kettenis Date: Tue, 26 Dec 2017 15:11:17 +0000 (+0000) Subject: Add ARM EABI runtime aliases to the GCC runtime functions that we include X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5349095281f7554b85fbc0c5ce414759c083515b;p=openbsd Add ARM EABI runtime aliases to the GCC runtime functions that we include in libc. ok patrick@, jsg@, guenther@ --- diff --git a/lib/libc/arch/arm/Symbols.list b/lib/libc/arch/arm/Symbols.list index 2c79e9b439e..bd7e8cb6c9f 100644 --- a/lib/libc/arch/arm/Symbols.list +++ b/lib/libc/arch/arm/Symbols.list @@ -58,6 +58,32 @@ frexpl ldexpl modfl +/* EABI */ +__aeabi_idiv +__aeabi_idivmod +__aeabi_uidiv +__aeabi_uidivmod + +/* EABI softfloat */ +__aeabi_d2f +__aeabi_d2iz +__aeabi_d2lz +__aeabi_dadd +__aeabi_ddiv +__aeabi_dmul +__aeabi_dsub +__aeabi_f2d +__aeabi_f2iz +__aeabi_f2lz +__aeabi_fadd +__aeabi_fdiv +__aeabi_fmul +__aeabi_fsub +__aeabi_i2d +__aeabi_i2f +__aeabi_l2d +__aeabi_l2f + /* dlfcn */ dl_unwind_find_exidx __gnu_Unwind_Find_exidx diff --git a/lib/libc/arch/arm/gen/divsi3.S b/lib/libc/arch/arm/gen/divsi3.S index ad14f803a8f..a95dbda7fe3 100644 --- a/lib/libc/arch/arm/gen/divsi3.S +++ b/lib/libc/arch/arm/gen/divsi3.S @@ -1,4 +1,4 @@ -/* $OpenBSD: divsi3.S,v 1.3 2016/08/06 19:16:09 guenther Exp $ */ +/* $OpenBSD: divsi3.S,v 1.4 2017/12/26 15:11:17 kettenis Exp $ */ /* $NetBSD: divsi3.S,v 1.5 2003/04/05 23:08:51 bjh21 Exp $ */ /* @@ -385,3 +385,8 @@ ENTRY(__divsi3) addhs r3, r3, r2 mov r0, r3 mov pc, lr + +STRONG_ALIAS(__aeabi_idiv, __divsi3) +STRONG_ALIAS(__aeabi_idivmod, __divsi3) +STRONG_ALIAS(__aeabi_uidiv, __udivsi3) +STRONG_ALIAS(__aeabi_uidivmod, __udivsi3) diff --git a/lib/libc/quad/fixdfdi.c b/lib/libc/quad/fixdfdi.c index 861cf354ab6..f389242393f 100644 --- a/lib/libc/quad/fixdfdi.c +++ b/lib/libc/quad/fixdfdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fixdfdi.c,v 1.5 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: fixdfdi.c,v 1.6 2017/12/26 15:11:17 kettenis Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -52,3 +52,7 @@ __fixdfdi(double x) else return ((quad_t)(u_quad_t)x); } + +#ifdef __ARM_EABI__ +__strong_alias(__aeabi_d2lz, __fixdfdi); +#endif diff --git a/lib/libc/quad/fixsfdi.c b/lib/libc/quad/fixsfdi.c index fb28d469235..d8b4f96d33c 100644 --- a/lib/libc/quad/fixsfdi.c +++ b/lib/libc/quad/fixsfdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fixsfdi.c,v 1.6 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: fixsfdi.c,v 1.7 2017/12/26 15:11:17 kettenis Exp $ */ /*- * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. @@ -54,3 +54,7 @@ __fixsfdi(float x) else return ((quad_t)(u_quad_t)x); } + +#ifdef __ARM_EABI__ +__strong_alias(__aeabi_f2lz, __fixsfdi); +#endif diff --git a/lib/libc/quad/fixunsdfdi.c b/lib/libc/quad/fixunsdfdi.c index ed04c130d9a..21cea67151d 100644 --- a/lib/libc/quad/fixunsdfdi.c +++ b/lib/libc/quad/fixunsdfdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fixunsdfdi.c,v 1.7 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: fixunsdfdi.c,v 1.8 2017/12/26 15:11:17 kettenis Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -70,3 +70,7 @@ __fixunsdfdi(double x) t.ul[H] = tmp; return (t.uq); } + +#ifdef __ARM_EABI__ +__strong_alias(__aeabi_d2ulz, __fixunsdfdi); +#endif diff --git a/lib/libc/quad/fixunssfdi.c b/lib/libc/quad/fixunssfdi.c index 359779e0cdc..bc75c6d9f40 100644 --- a/lib/libc/quad/fixunssfdi.c +++ b/lib/libc/quad/fixunssfdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fixunssfdi.c,v 1.5 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: fixunssfdi.c,v 1.6 2017/12/26 15:11:17 kettenis Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -91,3 +91,7 @@ __fixunssfdi(float f) t.ul[L] = (u_int)x; return (t.uq); } + +#ifdef __ARM_EABI__ +__strong_alias(__aeabi_f2ulz, __fixunssfdi); +#endif diff --git a/lib/libc/quad/floatdidf.c b/lib/libc/quad/floatdidf.c index 5cdc8393f2c..2b9beb0f261 100644 --- a/lib/libc/quad/floatdidf.c +++ b/lib/libc/quad/floatdidf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: floatdidf.c,v 1.6 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: floatdidf.c,v 1.7 2017/12/26 15:11:17 kettenis Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -64,3 +64,7 @@ __floatdidf(quad_t x) return (neg ? -d : d); } + +#ifdef __ARM_EABI__ +__strong_alias(__aeabi_l2d, __floatdidf); +#endif diff --git a/lib/libc/quad/floatdisf.c b/lib/libc/quad/floatdisf.c index 6134787f13d..1e6726b51d4 100644 --- a/lib/libc/quad/floatdisf.c +++ b/lib/libc/quad/floatdisf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: floatdisf.c,v 1.6 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: floatdisf.c,v 1.7 2017/12/26 15:11:17 kettenis Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -66,3 +66,7 @@ __floatdisf(quad_t x) return (neg ? -f : f); } + +#ifdef __ARM_EABI__ +__strong_alias(__aeabi_l2f, __floatdisf); +#endif diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version index 858859a0e22..06e36d252f9 100644 --- a/lib/libc/shlib_version +++ b/lib/libc/shlib_version @@ -1,4 +1,4 @@ major=92 -minor=1 +minor=2 # note: If changes were made to include/thread_private.h or if system # calls were added/changed then librthread/shlib_version also be updated. diff --git a/lib/libc/softfloat/softfloat-for-gcc.h b/lib/libc/softfloat/softfloat-for-gcc.h index 3162626ee76..22bfcad717e 100644 --- a/lib/libc/softfloat/softfloat-for-gcc.h +++ b/lib/libc/softfloat/softfloat-for-gcc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softfloat-for-gcc.h,v 1.1 2006/11/06 15:11:37 drahn Exp $ */ +/* $OpenBSD: softfloat-for-gcc.h,v 1.2 2017/12/26 15:11:17 kettenis Exp $ */ /* $NetBSD: softfloat-for-gcc.h,v 1.6 2003/07/26 19:24:51 salo Exp $ */ /* @@ -42,3 +42,25 @@ #define float32_to_float64 __extendsfdf2 #define float64_to_float32 __truncdfsf2 +#ifdef __ARM_EABI__ +__strong_alias(__aeabi_fadd, __addsf3); +__strong_alias(__aeabi_dadd, __adddf3); +__strong_alias(__aeabi_fsub, __subsf3); +__strong_alias(__aeabi_dsub, __subdf3); +__strong_alias(__aeabi_fmul, __mulsf3); +__strong_alias(__aeabi_dmul, __muldf3); +__strong_alias(__aeabi_fdiv, __divsf3); +__strong_alias(__aeabi_ddiv, __divdf3); +__strong_alias(__aeabi_i2f, __floatsisf); +__strong_alias(__aeabi_i2d, __floatsidf); +__strong_alias(__aeabi_l2f, __floatdisf); +__strong_alias(__aeabi_l2d, __floatdidf); +__strong_alias(__aeabi_f2iz, __fixsfsi); +__strong_alias(__aeabi_d2iz, __fixdfsi); +__strong_alias(__aeabi_f2lz, __fixsfdi); +__strong_alias(__aeabi_d2lz, __fixdfdi); +__strong_alias(__aeabi_f2uiz, __fixunssfsi); +__strong_alias(__aeabi_d2uiz, __fixunsdfsi); +__strong_alias(__aeabi_f2d, __extendsfdf2); +__strong_alias(__aeabi_d2f, __truncdfsf2); +#endif