* config/nvptx/free.asm: Delete.
* config/nvptx/malloc.asm: Delete.
* config/nvptx/realloc.c: Delete.
* t-nvptx: Update.
From-SVN: r236773
+2016-05-26 Nathan Sidwell <nathan@acm.org>
+
+ * config/nvptx/free.asm: Delete.
+ * config/nvptx/malloc.asm: Delete.
+ * config/nvptx/realloc.c: Delete.
+ * t-nvptx: Update.
+
2016-05-25 Nathan Sidwell <nathan@acm.org>
* config/nvptx/crt0.s: Delete.
+++ /dev/null
-// 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;
- }
+++ /dev/null
-// 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;
-}
+++ /dev/null
-/* 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;
-}
-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