public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] AArch64 rename .x file to .c
@ 2012-11-20 12:08 Marcus Shawcroft
  2012-11-20 19:26 ` Thomas Schwinge
  0 siblings, 1 reply; 2+ messages in thread
From: Marcus Shawcroft @ 2012-11-20 12:08 UTC (permalink / raw)
  To: libc-ports; +Cc: Andreas Jaeger

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

This patch addresses the comment on choice of file name  raised by Andreas here:

http://sourceware.org/ml/libc-ports/2012-11/msg00066.html

/Marcus

2012-11-19  Marcus Shawcroft  <marcus.shawcroft@linaro.org>

        * sysdeps/aarch64/fpu/s_frint.x: Renamed to...
        * sysdeps/aarch64/fpu/s_frint.c: New file.
        * sysdeps/aarch64/fpu/s_frintf.x: Renamed to...
        * sysdeps/aarch64/fpu/s_frintf.c: 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.

[-- Attachment #2: 0002-Rename-.x-files.patch --]
[-- Type: application/octet-stream, Size: 9602 bytes --]

diff --git a/ports/sysdeps/aarch64/fpu/s_ceil.c b/ports/sysdeps/aarch64/fpu/s_ceil.c
index 087b9b4..9fe7ced 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 <s_frint.x>
+#include <s_frint.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_ceilf.c b/ports/sysdeps/aarch64/fpu/s_ceilf.c
index e503f99..a20a972 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 <s_frintf.x>
+#include <s_frintf.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_floor.c b/ports/sysdeps/aarch64/fpu/s_floor.c
index 3f914b6..216d472 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 <s_frint.x>
+#include <s_frint.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_floorf.c b/ports/sysdeps/aarch64/fpu/s_floorf.c
index f5452c5..debf00d 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 <s_frintf.x>
+#include <s_frintf.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_frint.c b/ports/sysdeps/aarch64/fpu/s_frint.c
new file mode 100644
index 0000000..3c24031
--- /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
+   <http://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+
+#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 3c24031..0000000
--- 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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <math.h>
-
-#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 0000000..873addc
--- /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
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef FUNC
+#error FUNC not defined
+#endif
+#define TYPE float
+#define REGS "s"
+#include <s_frint.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_frintf.x b/ports/sysdeps/aarch64/fpu/s_frintf.x
deleted file mode 100644
index 8ce97df..0000000
--- 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
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef FUNC
-#error FUNC not defined
-#endif
-#define TYPE float
-#define REGS "s"
-#include <s_frint.x>
diff --git a/ports/sysdeps/aarch64/fpu/s_nearbyint.c b/ports/sysdeps/aarch64/fpu/s_nearbyint.c
index 11fcd01..a0b3105 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 <s_frint.x>
+#include <s_frint.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_nearbyintf.c b/ports/sysdeps/aarch64/fpu/s_nearbyintf.c
index 8d6af83..5e964f8 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 <s_frintf.x>
+#include <s_frintf.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_rint.c b/ports/sysdeps/aarch64/fpu/s_rint.c
index 7f37f7c..1b0ae90 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
    <http://www.gnu.org/licenses/>.  */
 
-#define FUNC	rint
+#define FUNC rint
 #define INSN "frintx"
-#include <s_frint.x>
+#include <s_frint.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_rintf.c b/ports/sysdeps/aarch64/fpu/s_rintf.c
index 2d7832a..1d27189 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 <s_frintf.x>
+#include <s_frintf.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_round.c b/ports/sysdeps/aarch64/fpu/s_round.c
index 71ec254..70b50a8 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 <s_frint.x>
+#include <s_frint.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_roundf.c b/ports/sysdeps/aarch64/fpu/s_roundf.c
index 919a752..74b81ad 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 <s_frintf.x>
+#include <s_frintf.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_trunc.c b/ports/sysdeps/aarch64/fpu/s_trunc.c
index caf7ec1..cd22762 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 <s_frint.x>
+#include <s_frint.c>
diff --git a/ports/sysdeps/aarch64/fpu/s_truncf.c b/ports/sysdeps/aarch64/fpu/s_truncf.c
index 3cbba72..f81bd50 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 <s_frintf.x>
+#include <s_frintf.c>
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] AArch64 rename .x file to .c
  2012-11-20 12:08 [PATCH] AArch64 rename .x file to .c Marcus Shawcroft
@ 2012-11-20 19:26 ` Thomas Schwinge
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Schwinge @ 2012-11-20 19:26 UTC (permalink / raw)
  To: Marcus Shawcroft; +Cc: Andreas Jaeger, libc-ports

[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]

Hi!

On Tue, 20 Nov 2012 12:08:43 +0000, Marcus Shawcroft <marcus.shawcroft@linaro.org> wrote:
> This patch addresses the comment on choice of file name  raised by Andreas here:
> 
> http://sourceware.org/ml/libc-ports/2012-11/msg00066.html
> 
> /Marcus
> 
> 2012-11-19  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
> 
>         * sysdeps/aarch64/fpu/s_frint.x: Renamed to...
>         * sysdeps/aarch64/fpu/s_frint.c: New file.

Typically the following style is used, as far as I can tell:

	* sysdeps/aarch64/fpu/s_frint.c: ... this new file.

>         * sysdeps/aarch64/fpu/s_frintf.x: Renamed to...
>         * sysdeps/aarch64/fpu/s_frintf.c: 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.

Looks good to me.

(Using ranges for copyright years is part of another patch.)


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-20 19:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-20 12:08 [PATCH] AArch64 rename .x file to .c Marcus Shawcroft
2012-11-20 19:26 ` Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).