From 887a4ca5b04ffa80ff2e20286e382eee9e5658d6 Mon Sep 17 00:00:00 2001 From: Marcus Shawcroft Date: Tue, 20 Nov 2012 23:10:51 +0000 Subject: aarch64: Rename .x files to .c --- ports/ChangeLog.aarch64 | 19 +++++++++++ ports/sysdeps/aarch64/fpu/s_ceil.c | 2 +- ports/sysdeps/aarch64/fpu/s_ceilf.c | 2 +- ports/sysdeps/aarch64/fpu/s_floor.c | 2 +- ports/sysdeps/aarch64/fpu/s_floorf.c | 2 +- ports/sysdeps/aarch64/fpu/s_frint.c | 55 ++++++++++++++++++++++++++++++++ ports/sysdeps/aarch64/fpu/s_frint.x | 55 -------------------------------- ports/sysdeps/aarch64/fpu/s_frintf.c | 24 ++++++++++++++ ports/sysdeps/aarch64/fpu/s_frintf.x | 24 -------------- ports/sysdeps/aarch64/fpu/s_nearbyint.c | 2 +- ports/sysdeps/aarch64/fpu/s_nearbyintf.c | 2 +- ports/sysdeps/aarch64/fpu/s_rint.c | 4 +-- ports/sysdeps/aarch64/fpu/s_rintf.c | 2 +- ports/sysdeps/aarch64/fpu/s_round.c | 2 +- ports/sysdeps/aarch64/fpu/s_roundf.c | 2 +- ports/sysdeps/aarch64/fpu/s_trunc.c | 2 +- ports/sysdeps/aarch64/fpu/s_truncf.c | 2 +- 17 files changed, 111 insertions(+), 92 deletions(-) create mode 100644 ports/sysdeps/aarch64/fpu/s_frint.c delete mode 100644 ports/sysdeps/aarch64/fpu/s_frint.x create mode 100644 ports/sysdeps/aarch64/fpu/s_frintf.c delete mode 100644 ports/sysdeps/aarch64/fpu/s_frintf.x diff --git a/ports/ChangeLog.aarch64 b/ports/ChangeLog.aarch64 index 403223c5ae..2a7bfc301b 100644 --- a/ports/ChangeLog.aarch64 +++ b/ports/ChangeLog.aarch64 @@ -1,3 +1,22 @@ +2012-11-20 Marcus Shawcroft + + * sysdeps/aarch64/fpu/s_frint.x: Renamed to... + * sysdeps/aarch64/fpu/s_frint.c: ... this new file. + * sysdeps/aarch64/fpu/s_frintf.x: Renamed to... + * sysdeps/aarch64/fpu/s_frintf.c: ... this new file. + * sysdeps/aarch64/fpu/s_ceil.c: Include s_frint.c. + * sysdeps/aarch64/fpu/s_floor.c: Likewise. + * sysdeps/aarch64/fpu/s_nearbyint.c: Likewise. + * sysdeps/aarch64/fpu/s_rint.c: Likewise. + * sysdeps/aarch64/fpu/s_round.c: Likewise. + * sysdeps/aarch64/fpu/s_trunc.c: Likewise. + * sysdeps/aarch64/fpu/s_ceilf.c: Include s_frintf.c. + * sysdeps/aarch64/fpu/s_floorf.c: Likewise. + * sysdeps/aarch64/fpu/s_nearbyintf.c: Likewise. + * sysdeps/aarch64/fpu/s_rintf.c: Likewise. + * sysdeps/aarch64/fpu/s_roundf.c: Likewise. + * sysdeps/aarch64/fpu/s_truncf.c: Likewise. + 2012-11-20 Marcus Shawcroft * sysdeps/aarch64/fpu/s_fma.c (__CONCATX): Don't use K&R. diff --git a/ports/sysdeps/aarch64/fpu/s_ceil.c b/ports/sysdeps/aarch64/fpu/s_ceil.c index 087b9b49e7..9fe7cedeef 100644 --- a/ports/sysdeps/aarch64/fpu/s_ceil.c +++ b/ports/sysdeps/aarch64/fpu/s_ceil.c @@ -18,4 +18,4 @@ #define FUNC ceil #define INSN "frintp" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_ceilf.c b/ports/sysdeps/aarch64/fpu/s_ceilf.c index e503f991b3..a20a972efe 100644 --- a/ports/sysdeps/aarch64/fpu/s_ceilf.c +++ b/ports/sysdeps/aarch64/fpu/s_ceilf.c @@ -18,4 +18,4 @@ #define FUNC ceilf #define INSN "frintp" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_floor.c b/ports/sysdeps/aarch64/fpu/s_floor.c index 3f914b6454..216d47251b 100644 --- a/ports/sysdeps/aarch64/fpu/s_floor.c +++ b/ports/sysdeps/aarch64/fpu/s_floor.c @@ -18,4 +18,4 @@ #define FUNC floor #define INSN "frintm" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_floorf.c b/ports/sysdeps/aarch64/fpu/s_floorf.c index f5452c5bc2..debf00d2f8 100644 --- a/ports/sysdeps/aarch64/fpu/s_floorf.c +++ b/ports/sysdeps/aarch64/fpu/s_floorf.c @@ -18,4 +18,4 @@ #define FUNC floorf #define INSN "frintm" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_frint.c b/ports/sysdeps/aarch64/fpu/s_frint.c new file mode 100644 index 0000000000..3c24031deb --- /dev/null +++ b/ports/sysdeps/aarch64/fpu/s_frint.c @@ -0,0 +1,55 @@ +/* Copyright (C) 1996, 1997, 2011, 2012 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#ifndef FUNC +#error FUNC not defined +#endif + +#ifndef TYPE +#define TYPE double +#define REGS "d" +#else +#ifndef REGS +#error REGS not defined +#endif +#endif + +#ifndef INSN +#error INSN not defined +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +TYPE +__CONCATX(__,FUNC) (TYPE x) +{ + TYPE result; + asm ( INSN "\t%" REGS "0, %" REGS "1" : + "=w" (result) : "w" (x) ); + return result; +} + +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) +#define strong_aliasx(a,b) strong_alias(a,b) +#ifdef NO_LONG_DOUBLE +strong_aliasx (__CONCATX(__,FUNC), __CONCATX(__,__CONCATX(FUNC,l))) +weak_aliasx (__CONCATX(__,FUNC), __CONCATX(FUNC,l)) +#endif diff --git a/ports/sysdeps/aarch64/fpu/s_frint.x b/ports/sysdeps/aarch64/fpu/s_frint.x deleted file mode 100644 index 3c24031deb..0000000000 --- a/ports/sysdeps/aarch64/fpu/s_frint.x +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1996, 1997, 2011, 2012 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -#ifndef FUNC -#error FUNC not defined -#endif - -#ifndef TYPE -#define TYPE double -#define REGS "d" -#else -#ifndef REGS -#error REGS not defined -#endif -#endif - -#ifndef INSN -#error INSN not defined -#endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -TYPE -__CONCATX(__,FUNC) (TYPE x) -{ - TYPE result; - asm ( INSN "\t%" REGS "0, %" REGS "1" : - "=w" (result) : "w" (x) ); - return result; -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) -#define strong_aliasx(a,b) strong_alias(a,b) -#ifdef NO_LONG_DOUBLE -strong_aliasx (__CONCATX(__,FUNC), __CONCATX(__,__CONCATX(FUNC,l))) -weak_aliasx (__CONCATX(__,FUNC), __CONCATX(FUNC,l)) -#endif diff --git a/ports/sysdeps/aarch64/fpu/s_frintf.c b/ports/sysdeps/aarch64/fpu/s_frintf.c new file mode 100644 index 0000000000..873addc9ee --- /dev/null +++ b/ports/sysdeps/aarch64/fpu/s_frintf.c @@ -0,0 +1,24 @@ +/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef FUNC +#error FUNC not defined +#endif +#define TYPE float +#define REGS "s" +#include diff --git a/ports/sysdeps/aarch64/fpu/s_frintf.x b/ports/sysdeps/aarch64/fpu/s_frintf.x deleted file mode 100644 index 8ce97df880..0000000000 --- a/ports/sysdeps/aarch64/fpu/s_frintf.x +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef FUNC -#error FUNC not defined -#endif -#define TYPE float -#define REGS "s" -#include diff --git a/ports/sysdeps/aarch64/fpu/s_nearbyint.c b/ports/sysdeps/aarch64/fpu/s_nearbyint.c index 11fcd01243..a0b3105e52 100644 --- a/ports/sysdeps/aarch64/fpu/s_nearbyint.c +++ b/ports/sysdeps/aarch64/fpu/s_nearbyint.c @@ -18,4 +18,4 @@ #define FUNC nearbyint #define INSN "frinti" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_nearbyintf.c b/ports/sysdeps/aarch64/fpu/s_nearbyintf.c index 8d6af83e7c..5e964f8f8d 100644 --- a/ports/sysdeps/aarch64/fpu/s_nearbyintf.c +++ b/ports/sysdeps/aarch64/fpu/s_nearbyintf.c @@ -18,4 +18,4 @@ #define FUNC nearbyintf #define INSN "frinti" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_rint.c b/ports/sysdeps/aarch64/fpu/s_rint.c index 7f37f7cbe1..1b0ae9097f 100644 --- a/ports/sysdeps/aarch64/fpu/s_rint.c +++ b/ports/sysdeps/aarch64/fpu/s_rint.c @@ -16,6 +16,6 @@ License along with the GNU C Library; if not, see . */ -#define FUNC rint +#define FUNC rint #define INSN "frintx" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_rintf.c b/ports/sysdeps/aarch64/fpu/s_rintf.c index 2d7832ab5b..1d27189000 100644 --- a/ports/sysdeps/aarch64/fpu/s_rintf.c +++ b/ports/sysdeps/aarch64/fpu/s_rintf.c @@ -18,4 +18,4 @@ #define FUNC rintf #define INSN "frintx" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_round.c b/ports/sysdeps/aarch64/fpu/s_round.c index 71ec2544b3..70b50a8156 100644 --- a/ports/sysdeps/aarch64/fpu/s_round.c +++ b/ports/sysdeps/aarch64/fpu/s_round.c @@ -18,4 +18,4 @@ #define FUNC round #define INSN "frinta" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_roundf.c b/ports/sysdeps/aarch64/fpu/s_roundf.c index 919a7529c8..74b81addf1 100644 --- a/ports/sysdeps/aarch64/fpu/s_roundf.c +++ b/ports/sysdeps/aarch64/fpu/s_roundf.c @@ -18,4 +18,4 @@ #define FUNC roundf #define INSN "frinta" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_trunc.c b/ports/sysdeps/aarch64/fpu/s_trunc.c index caf7ec13a1..cd22762f7a 100644 --- a/ports/sysdeps/aarch64/fpu/s_trunc.c +++ b/ports/sysdeps/aarch64/fpu/s_trunc.c @@ -18,4 +18,4 @@ #define FUNC trunc #define INSN "frintz" -#include +#include diff --git a/ports/sysdeps/aarch64/fpu/s_truncf.c b/ports/sysdeps/aarch64/fpu/s_truncf.c index 3cbba72bf9..f81bd50d36 100644 --- a/ports/sysdeps/aarch64/fpu/s_truncf.c +++ b/ports/sysdeps/aarch64/fpu/s_truncf.c @@ -18,4 +18,4 @@ #define FUNC truncf #define INSN "frintz" -#include +#include -- cgit v1.2.3