aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/nvptx
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2016-05-26 14:22:40 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2016-05-26 14:22:40 +0000
commit40774fafdcb3e9c4bbe2ad02f4c3ca9e4ea53f08 (patch)
tree44476b7a1487d1e877a2e72db3c14a88c3d2ce53 /libgcc/config/nvptx
parentb4557008c45c0a44ae848c71d31ce4ed6316d043 (diff)
downloadgcc-40774fafdcb3e9c4bbe2ad02f4c3ca9e4ea53f08.zip
gcc-40774fafdcb3e9c4bbe2ad02f4c3ca9e4ea53f08.tar.gz
gcc-40774fafdcb3e9c4bbe2ad02f4c3ca9e4ea53f08.tar.bz2
free.asm: Delete.
* config/nvptx/free.asm: Delete. * config/nvptx/malloc.asm: Delete. * config/nvptx/realloc.c: Delete. * t-nvptx: Update. From-SVN: r236773
Diffstat (limited to 'libgcc/config/nvptx')
-rw-r--r--libgcc/config/nvptx/free.asm50
-rw-r--r--libgcc/config/nvptx/malloc.asm55
-rw-r--r--libgcc/config/nvptx/realloc.c50
-rw-r--r--libgcc/config/nvptx/t-nvptx5
4 files changed, 1 insertions, 159 deletions
diff --git a/libgcc/config/nvptx/free.asm b/libgcc/config/nvptx/free.asm
deleted file mode 100644
index 3b8e39e..0000000
--- a/libgcc/config/nvptx/free.asm
+++ /dev/null
@@ -1,50 +0,0 @@
-// A wrapper around free to enable a realloc implementation.
-
-// Copyright (C) 2014-2016 Free Software Foundation, Inc.
-
-// This file is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option) any
-// later version.
-
-// This file 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
-// General Public License for more details.
-
-// Under Section 7 of GPL version 3, you are granted additional
-// permissions described in the GCC Runtime Library Exception, version
-// 3.1, as published by the Free Software Foundation.
-
-// You should have received a copy of the GNU General Public License and
-// a copy of the GCC Runtime Library Exception along with this program;
-// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-// <http://www.gnu.org/licenses/>.
-
- .version 3.1
- .target sm_30
- .address_size 64
-
-.extern .func free(.param.u64 %in_ar1);
-
-// BEGIN GLOBAL FUNCTION DEF: __nvptx_free
-.visible .func __nvptx_free(.param.u64 %in_ar1)
-{
- .reg.u64 %ar1;
- .reg.u64 %hr10;
- .reg.u64 %r23;
- .reg.pred %r25;
- .reg.u64 %r27;
- ld.param.u64 %ar1, [%in_ar1];
- mov.u64 %r23, %ar1;
- setp.eq.u64 %r25,%r23,0;
- @%r25 bra $L1;
- add.u64 %r27, %r23, -8;
- {
- .param.u64 %out_arg0;
- st.param.u64 [%out_arg0], %r27;
- call free, (%out_arg0);
- }
-$L1:
- ret;
- }
diff --git a/libgcc/config/nvptx/malloc.asm b/libgcc/config/nvptx/malloc.asm
deleted file mode 100644
index 3d60981..0000000
--- a/libgcc/config/nvptx/malloc.asm
+++ /dev/null
@@ -1,55 +0,0 @@
-// A wrapper around malloc to enable a realloc implementation.
-
-// Copyright (C) 2014-2016 Free Software Foundation, Inc.
-
-// This file is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option) any
-// later version.
-
-// This file 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
-// General Public License for more details.
-
-// Under Section 7 of GPL version 3, you are granted additional
-// permissions described in the GCC Runtime Library Exception, version
-// 3.1, as published by the Free Software Foundation.
-
-// You should have received a copy of the GNU General Public License and
-// a copy of the GCC Runtime Library Exception along with this program;
-// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-// <http://www.gnu.org/licenses/>.
-
- .version 3.1
- .target sm_30
- .address_size 64
-
-.extern .func (.param.u64 %out_retval) malloc(.param.u64 %in_ar1);
-
-// BEGIN GLOBAL FUNCTION DEF: __nvptx_malloc
-.visible .func (.param.u64 %out_retval) __nvptx_malloc(.param.u64 %in_ar1)
-{
- .reg.u64 %ar1;
-.reg.u64 %retval;
- .reg.u64 %hr10;
- .reg.u64 %r26;
- .reg.u64 %r28;
- .reg.u64 %r29;
- .reg.u64 %r31;
- ld.param.u64 %ar1, [%in_ar1];
- mov.u64 %r26, %ar1;
- add.u64 %r28, %r26, 8;
- {
- .param.u64 %retval_in;
- .param.u64 %out_arg0;
- st.param.u64 [%out_arg0], %r28;
- call (%retval_in), malloc, (%out_arg0);
- ld.param.u64 %r29, [%retval_in];
- }
- st.u64 [%r29], %r26;
- add.u64 %r31, %r29, 8;
- mov.u64 %retval, %r31;
- st.param.u64 [%out_retval], %retval;
- ret;
-}
diff --git a/libgcc/config/nvptx/realloc.c b/libgcc/config/nvptx/realloc.c
deleted file mode 100644
index 82d6a02..0000000
--- a/libgcc/config/nvptx/realloc.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Implement realloc with the help of the malloc and free wrappers.
-
- Copyright (C) 2014-2016 Free Software Foundation, Inc.
-
- This file is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3, or (at your option) any
- later version.
-
- This file 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
- General Public License for more details.
-
- Under Section 7 of GPL version 3, you are granted additional
- permissions described in the GCC Runtime Library Exception, version
- 3.1, as published by the Free Software Foundation.
-
- You should have received a copy of the GNU General Public License and
- a copy of the GCC Runtime Library Exception along with this program;
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <stddef.h>
-#include "nvptx-malloc.h"
-
-void *
-__nvptx_realloc (void *ptr, size_t newsz)
-{
- if (newsz == 0)
- {
- __nvptx_free (ptr);
- return NULL;
- }
- void *newptr = __nvptx_malloc (newsz);
-
- size_t oldsz;
- if (ptr == NULL)
- oldsz = 0;
- else
- {
- size_t *sp = __extension__ (size_t *)(ptr - 8);
- oldsz = *sp;
- }
- if (oldsz != 0)
- __builtin_memcpy (newptr, ptr, oldsz > newsz ? newsz : oldsz);
-
- __nvptx_free (ptr);
- return newptr;
-}
diff --git a/libgcc/config/nvptx/t-nvptx b/libgcc/config/nvptx/t-nvptx
index 6001021..daf252f 100644
--- a/libgcc/config/nvptx/t-nvptx
+++ b/libgcc/config/nvptx/t-nvptx
@@ -1,7 +1,4 @@
-LIB2ADD=$(srcdir)/config/nvptx/malloc.asm \
- $(srcdir)/config/nvptx/free.asm \
- $(srcdir)/config/nvptx/realloc.c \
- $(srcdir)/config/nvptx/reduction.c
+LIB2ADD=$(srcdir)/config/nvptx/reduction.c
LIB2ADDEH=
LIB2FUNCS_EXCLUDE=__main