From: Nathan Sidwell Date: Thu, 26 May 2016 14:22:40 +0000 (+0000) Subject: free.asm: Delete. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40774fafdcb3e9c4bbe2ad02f4c3ca9e4ea53f08;p=gcc.git free.asm: Delete. * config/nvptx/free.asm: Delete. * config/nvptx/malloc.asm: Delete. * config/nvptx/realloc.c: Delete. * t-nvptx: Update. From-SVN: r236773 --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 0b07f0854ee..d99eb63a05d 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,10 @@ +2016-05-26 Nathan Sidwell + + * config/nvptx/free.asm: Delete. + * config/nvptx/malloc.asm: Delete. + * config/nvptx/realloc.c: Delete. + * t-nvptx: Update. + 2016-05-25 Nathan Sidwell * config/nvptx/crt0.s: Delete. diff --git a/libgcc/config/nvptx/free.asm b/libgcc/config/nvptx/free.asm deleted file mode 100644 index 3b8e39e43aa..00000000000 --- 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 -// . - - .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 3d60981ca78..00000000000 --- 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 -// . - - .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 82d6a02cdd6..00000000000 --- 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 - . */ - -#include -#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 6001021ff21..daf252f2472 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