diff --git a/Makefile.am b/Makefile.am index d865c5b66..0ce5128af 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,9 +26,6 @@ endif if ARCH_MIPS include_HEADERS += include/libunwind-mips.h endif -if ARCH_TILEGX -include_HEADERS += include/libunwind-tilegx.h -endif if ARCH_X86 include_HEADERS += include/libunwind-x86.h endif @@ -87,8 +84,6 @@ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \ include/tdep-hppa/jmpbuf.h include/tdep-hppa/dwarf-config.h \ include/tdep-mips/libunwind_i.h \ include/tdep-mips/jmpbuf.h include/tdep-mips/dwarf-config.h \ - include/tdep-tilegx/libunwind_i.h \ - include/tdep-tilegx/jmpbuf.h include/tdep-tilegx/dwarf-config.h \ include/tdep-x86/libunwind_i.h \ include/tdep-x86/jmpbuf.h include/tdep-x86/dwarf-config.h \ include/tdep-x86_64/libunwind_i.h \ diff --git a/README b/README index b7f902773..62b0cdc84 100644 --- a/README +++ b/README @@ -16,7 +16,6 @@ This library supports several architecture/operating-system combinations: | Linux | SuperH | ✓ | | Linux | IA-64 | ✓ | | Linux | PARISC | Works well, but C library missing unwind-info | -| Linux | Tilegx | 64-bit mode only | | Linux | MIPS | ✓ | | Linux | RISC-V | 64-bit only | | Linux | LoongArch | 64-bit only | @@ -54,7 +53,6 @@ such dependencies | riscv | p | p | | s390x | p | p | | sh | r | | -| tilegx | r | r | | x86 | p | r | | x86_64 | p | p | diff --git a/configure.ac b/configure.ac index f755599a2..273731097 100644 --- a/configure.ac +++ b/configure.ac @@ -94,7 +94,6 @@ AC_DEFUN([SET_ARCH],[ [powerpc*],[$2=ppc$ppc_bits], [sh*],[$2=sh], [amd64],[$2=x86_64], - [tile*],[$2=tilegx], [riscv*],[$2=riscv], [loongarch64*],[$2=loongarch64], [$2=$1]) @@ -114,7 +113,7 @@ AC_ARG_ENABLE([coredump], ) AS_IF([test "$enable_coredump" = "check"], [AS_CASE([$host_arch], - [aarch64*|arm*|mips*|sh*|x86*|tile*|riscv*|loongarch64], [enable_coredump=yes], + [aarch64*|arm*|mips*|sh*|x86*|riscv*|loongarch64], [enable_coredump=yes], [enable_coredump=no])] ) AC_MSG_RESULT([$enable_coredump]) @@ -282,7 +281,7 @@ AC_ARG_ENABLE([cxx_exceptions], ) AS_IF([test $enable_cxx_exceptions = check], [AS_CASE([$target_arch], - [aarch64*|arm*|mips*|x86*|tile*|s390x*|loongarch64], [enable_cxx_exceptions=no], + [aarch64*|arm*|mips*|x86*|s390x*|loongarch64], [enable_cxx_exceptions=no], [enable_cxx_exceptions=yes])] ) AC_MSG_RESULT([$enable_cxx_exceptions]) @@ -333,7 +332,6 @@ AM_CONDITIONAL(ARCH_X86_64, test x$target_arch = xx86_64) AM_CONDITIONAL(ARCH_PPC32, test x$target_arch = xppc32) AM_CONDITIONAL(ARCH_PPC64, test x$target_arch = xppc64) AM_CONDITIONAL(ARCH_SH, test x$target_arch = xsh) -AM_CONDITIONAL(ARCH_TILEGX, test x$target_arch = xtilegx) AM_CONDITIONAL(ARCH_S390X, test x$target_arch = xs390x) AM_CONDITIONAL(ARCH_RISCV, test x$target_arch = xriscv) AM_CONDITIONAL(ARCH_LOONGARCH64, test x$target_arch = xloongarch64) @@ -344,12 +342,12 @@ AM_CONDITIONAL(OS_QNX, expr x$target_os : xnto-qnx >/dev/null) AM_CONDITIONAL(OS_SOLARIS, expr x$target_os : xsolaris >/dev/null) AC_MSG_CHECKING([for ELF helper width]) -case "${target_arch}" in -(arm|hppa|ppc32|x86|sh) use_elf32=yes; AC_MSG_RESULT([32]);; -(aarch64|ia64|ppc64|x86_64|s390x|tilegx) use_elf64=yes; AC_MSG_RESULT([64]);; -(mips|riscv|loongarch64) use_elfxx=yes; AC_MSG_RESULT([xx]);; -*) AC_MSG_ERROR([Unknown ELF target: ${target_arch}]) -esac +AS_CASE([${target_arch}], + [arm|hppa|ppc32|x86|sh], [use_elf32=yes; AC_MSG_RESULT([32])], + [aarch64|ia64|ppc64|x86_64|s390x], [use_elf64=yes; AC_MSG_RESULT([64])], + [mips|riscv|loongarch64], [use_elfxx=yes; AC_MSG_RESULT([xx])], + [AC_MSG_ERROR([Unknown ELF target: ${target_arch}])] +) AM_CONDITIONAL(USE_ELF32, [test x$use_elf32 = xyes]) AM_CONDITIONAL(USE_ELF64, [test x$use_elf64 = xyes]) AM_CONDITIONAL(USE_ELFXX, [test x$use_elfxx = xyes]) diff --git a/include/libunwind-tilegx.h b/include/libunwind-tilegx.h deleted file mode 100644 index 0f84ea65e..000000000 --- a/include/libunwind-tilegx.h +++ /dev/null @@ -1,161 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef LIBUNWIND_H -#define LIBUNWIND_H - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - -#include -#include - -#define UNW_TARGET tilegx -#define UNW_TARGET_TILEGX 1 - -#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */ - -/* This needs to be big enough to accommodate "struct cursor", while - leaving some slack for future expansion. Changing this value will - require recompiling all users of this library. Stack allocation is - relatively cheap and unwind-state copying is relatively rare, so we - want to err on making it rather too big than too small. */ - -#define UNW_TDEP_CURSOR_LEN 4096 - -/* The size of a "word" varies on TILEGX. This type is used for memory - addresses and register values. */ -typedef uint64_t unw_word_t; -typedef int64_t unw_sword_t; - -typedef long double unw_tdep_fpreg_t; - -typedef enum -{ - UNW_TILEGX_R0, - UNW_TILEGX_R1, - UNW_TILEGX_R2, - UNW_TILEGX_R3, - UNW_TILEGX_R4, - UNW_TILEGX_R5, - UNW_TILEGX_R6, - UNW_TILEGX_R7, - UNW_TILEGX_R8, - UNW_TILEGX_R9, - UNW_TILEGX_R10, - UNW_TILEGX_R11, - UNW_TILEGX_R12, - UNW_TILEGX_R13, - UNW_TILEGX_R14, - UNW_TILEGX_R15, - UNW_TILEGX_R16, - UNW_TILEGX_R17, - UNW_TILEGX_R18, - UNW_TILEGX_R19, - UNW_TILEGX_R20, - UNW_TILEGX_R21, - UNW_TILEGX_R22, - UNW_TILEGX_R23, - UNW_TILEGX_R24, - UNW_TILEGX_R25, - UNW_TILEGX_R26, - UNW_TILEGX_R27, - UNW_TILEGX_R28, - UNW_TILEGX_R29, - UNW_TILEGX_R30, - UNW_TILEGX_R31, - UNW_TILEGX_R32, - UNW_TILEGX_R33, - UNW_TILEGX_R34, - UNW_TILEGX_R35, - UNW_TILEGX_R36, - UNW_TILEGX_R37, - UNW_TILEGX_R38, - UNW_TILEGX_R39, - UNW_TILEGX_R40, - UNW_TILEGX_R41, - UNW_TILEGX_R42, - UNW_TILEGX_R43, - UNW_TILEGX_R44, - UNW_TILEGX_R45, - UNW_TILEGX_R46, - UNW_TILEGX_R47, - UNW_TILEGX_R48, - UNW_TILEGX_R49, - UNW_TILEGX_R50, - UNW_TILEGX_R51, - UNW_TILEGX_R52, - UNW_TILEGX_R53, - UNW_TILEGX_R54, - UNW_TILEGX_R55, - - /* FIXME: Other registers! */ - - UNW_TILEGX_PC, - /* For TILEGX, the CFA is the value of SP (r54) at the call site in the - previous frame. */ - UNW_TILEGX_CFA, - - UNW_TDEP_LAST_REG = UNW_TILEGX_PC, - - UNW_TDEP_IP = UNW_TILEGX_R55, /* R55 is link register for Tilegx */ - UNW_TDEP_SP = UNW_TILEGX_R54, - UNW_TDEP_EH = UNW_TILEGX_R0 /* FIXME. */ -} tilegx_regnum_t; - -typedef enum -{ - UNW_TILEGX_ABI_N64 = 2 -} tilegx_abi_t; - -#define UNW_TDEP_NUM_EH_REGS 2 /* FIXME for TILEGX. */ - -typedef struct unw_tdep_save_loc -{ - /* Additional target-dependent info on a save location. */ -} unw_tdep_save_loc_t; - -typedef ucontext_t unw_tdep_context_t; - -#include "libunwind-dynamic.h" - -typedef struct -{ - /* no tilegx-specific auxiliary proc-info */ -} unw_tdep_proc_info_t; - -#include "libunwind-common.h" - -#define unw_tdep_getcontext getcontext - -#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg) -extern int unw_tdep_is_fpreg (int); - -#if defined(__cplusplus) || defined(c_plusplus) -} -#endif - -#endif /* LIBUNWIND_H */ diff --git a/include/libunwind.h.in b/include/libunwind.h.in index 0ac692b71..5ed37ea57 100644 --- a/include/libunwind.h.in +++ b/include/libunwind.h.in @@ -23,8 +23,6 @@ # include "libunwind-x86.h" #elif defined __x86_64__ # include "libunwind-x86_64.h" -#elif defined __tilegx__ -# include "libunwind-tilegx.h" #elif defined __s390x__ # include "libunwind-s390x.h" #elif defined __riscv || defined __riscv__ diff --git a/include/tdep-tilegx/dwarf-config.h b/include/tdep-tilegx/dwarf-config.h deleted file mode 100644 index 93bc6aaec..000000000 --- a/include/tdep-tilegx/dwarf-config.h +++ /dev/null @@ -1,50 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef dwarf_config_h -#define dwarf_config_h - -/* This is FIRST_PSEUDO_REGISTER in GCC, since DWARF_FRAME_REGISTERS is not - explicitly defined. */ -#define DWARF_NUM_PRESERVED_REGS 188 - -#define DWARF_REGNUM_MAP_LENGTH (56 + 2) - -/* Return TRUE if the ADDR_SPACE uses big-endian byte-order. */ -#define dwarf_is_big_endian(addr_space) ((addr_space)->big_endian) - -/* Convert a pointer to a dwarf_cursor structure to a pointer to - unw_cursor_t. */ -#define dwarf_to_cursor(c) ((unw_cursor_t *) (c)) - -typedef struct dwarf_loc -{ - unw_word_t val; -#ifndef UNW_LOCAL_ONLY - unw_word_t type; /* see DWARF_LOC_TYPE_* macros. */ -#endif -} dwarf_loc_t; - -#endif /* dwarf_config_h */ diff --git a/include/tdep-tilegx/jmpbuf.h b/include/tdep-tilegx/jmpbuf.h deleted file mode 100644 index 3afe9e46c..000000000 --- a/include/tdep-tilegx/jmpbuf.h +++ /dev/null @@ -1,33 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -/* Use glibc's jump-buffer indices; NPTL peeks at SP: */ - -/* FIXME for Tilegx! */ - -#define JB_SP 4 -#define JB_RP 5 -#define JB_MASK_SAVED 6 -#define JB_MASK 7 diff --git a/include/tdep-tilegx/libunwind_i.h b/include/tdep-tilegx/libunwind_i.h deleted file mode 100644 index 357b7d70d..000000000 --- a/include/tdep-tilegx/libunwind_i.h +++ /dev/null @@ -1,263 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef TILEGX_LIBUNWIND_I_H -#define TILEGX_LIBUNWIND_I_H - -/* Target-dependent definitions that are internal to libunwind but need - to be shared with target-independent code. */ - -#include -#include -#include - -# include "elf64.h" -#include "mempool.h" -#include "dwarf.h" - -typedef struct -{ - /* no Tilegx-specific fast trace */ -} unw_tdep_frame_t; - -struct unw_addr_space -{ - struct unw_accessors acc; - - int big_endian; - tilegx_abi_t abi; - unsigned int addr_size; - -#ifndef UNW_REMOTE_ONLY - unw_iterate_phdr_func_t iterate_phdr_function; -#endif - unw_caching_policy_t caching_policy; - _Atomic uint32_t cache_generation; - unw_word_t dyn_generation; /* see dyn-common.h */ - unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */ - struct dwarf_rs_cache global_cache; - struct unw_debug_frame_list *debug_frames; -}; - -#define tdep_big_endian(as) ((as)->big_endian) - -struct cursor -{ - struct dwarf_cursor dwarf; /* must be first */ - unw_word_t sigcontext_addr; - unw_word_t sigcontext_sp; - unw_word_t sigcontext_pc; -}; - -#define DWARF_GET_LOC(l) ((l).val) - -#ifndef UNW_REMOTE_ONLY -typedef long tilegx_reg_t; -#endif - -#ifdef UNW_LOCAL_ONLY -#define DWARF_NULL_LOC DWARF_LOC (0, 0) -#define DWARF_IS_NULL_LOC(l) (DWARF_GET_LOC (l) == 0) -#define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r) }) -#define DWARF_IS_REG_LOC(l) 0 -#define DWARF_REG_LOC(c,r) (DWARF_LOC((unw_word_t) (intptr_t) \ - tdep_uc_addr((c)->as_arg, (r)), 0)) -#define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0) -#define DWARF_FPREG_LOC(c,r) (DWARF_LOC((unw_word_t) (intptr_t) \ - tdep_uc_addr((c)->as_arg, (r)), 0)) - -/* Tilegx has no FP. */ -static inline int -dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val) -{ - Debug (1, "Tielgx has no fp!\n"); - abort(); - return 0; -} - -static inline int -dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val) -{ - Debug (1, "Tielgx has no fp!\n"); - abort(); - return 0; -} - -static inline int -dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val) -{ - if (!DWARF_GET_LOC (loc)) - return -1; - - *val = *(tilegx_reg_t *) (intptr_t) DWARF_GET_LOC (loc); - return 0; -} - -static inline int -dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val) -{ - if (!DWARF_GET_LOC (loc)) - return -1; - - *(tilegx_reg_t *) (intptr_t) DWARF_GET_LOC (loc) = val; - return 0; -} - -#else /* !UNW_LOCAL_ONLY */ -#define DWARF_LOC_TYPE_FP (1 << 0) -#define DWARF_LOC_TYPE_REG (1 << 1) -#define DWARF_NULL_LOC DWARF_LOC (0, 0) -#define DWARF_IS_NULL_LOC(l) \ - ({ dwarf_loc_t _l = (l); _l.val == 0 && _l.type == 0; }) -#define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r), .type = (t) }) -#define DWARF_IS_REG_LOC(l) (((l).type & DWARF_LOC_TYPE_REG) != 0) -#define DWARF_IS_FP_LOC(l) (((l).type & DWARF_LOC_TYPE_FP) != 0) -#define DWARF_REG_LOC(c,r) DWARF_LOC((r), DWARF_LOC_TYPE_REG) -#define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0) -#define DWARF_FPREG_LOC(c,r) DWARF_LOC((r), (DWARF_LOC_TYPE_REG \ - | DWARF_LOC_TYPE_FP)) - -/* TILEGX has no fp. */ -static inline int -dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val) -{ - Debug (1, "Tielgx has no fp!\n"); - abort(); - return 0; -} - -static inline int -dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val) -{ - Debug (1, "Tielgx has no fp!\n"); - abort(); - return 0; -} - -static inline int -dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val) -{ - if (DWARF_IS_NULL_LOC (loc)) - return -UNW_EBADREG; - - /* If a code-generator were to save a value of type unw_word_t in a - floating-point register, we would have to support this case. I - suppose it could happen with MMX registers, but does it really - happen? */ - assert (!DWARF_IS_FP_LOC (loc)); - - if (DWARF_IS_REG_LOC (loc)) - return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), val, - 0, c->as_arg); - - return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val, - 0, c->as_arg); -} - -static inline int -dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val) -{ - if (DWARF_IS_NULL_LOC (loc)) - return -UNW_EBADREG; - - /* If a code-generator were to save a value of type unw_word_t in a - floating-point register, we would have to support this case. I - suppose it could happen with MMX registers, but does it really - happen? */ - assert (!DWARF_IS_FP_LOC (loc)); - - if (DWARF_IS_REG_LOC (loc)) - return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), &val, - 1, c->as_arg); - - return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), &val, - 1, c->as_arg); -} - -#endif /* !UNW_LOCAL_ONLY */ - -#define tdep_getcontext_trace unw_getcontext -#define tdep_init_done UNW_OBJ(init_done) -#define tdep_needs_initialization UNW_OBJ(needs_initialization) -#define tdep_init UNW_OBJ(init) -/* Platforms that support UNW_INFO_FORMAT_TABLE need to define - tdep_search_unwind_table. */ -#define tdep_search_unwind_table dwarf_search_unwind_table -#define tdep_find_unwind_table dwarf_find_unwind_table -#define tdep_uc_addr UNW_ARCH_OBJ(uc_addr) -#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image) -#define tdep_get_exe_image_path UNW_ARCH_OBJ(get_exe_image_path) -#define tdep_access_reg UNW_OBJ(access_reg) -#define tdep_access_fpreg UNW_OBJ(access_fpreg) -#define tdep_fetch_frame(c,ip,n) do {} while(0) -#define tdep_cache_frame(c) 0 -#define tdep_reuse_frame(c,frame) do {} while(0) -#define tdep_stash_frame(c,rs) do {} while(0) -#define tdep_trace(cur,addr,n) (-UNW_ENOINFO) - -#ifdef UNW_LOCAL_ONLY -#define tdep_find_proc_info(c,ip,n) \ - dwarf_find_proc_info((c)->as, (ip), &(c)->pi, (n), \ - (c)->as_arg) -#define tdep_put_unwind_info(as,pi,arg) \ - dwarf_put_unwind_info((as), (pi), (arg)) -#else -#define tdep_find_proc_info(c,ip,n) \ - (*(c)->as->acc.find_proc_info)((c)->as, (ip), &(c)->pi, (n), \ - (c)->as_arg) -#define tdep_put_unwind_info(as,pi,arg) \ - (*(as)->acc.put_unwind_info)((as), (pi), (arg)) -#endif - -#define tdep_get_as(c) ((c)->dwarf.as) -#define tdep_get_as_arg(c) ((c)->dwarf.as_arg) -#define tdep_get_ip(c) ((c)->dwarf.ip) - -extern atomic_bool tdep_init_done; - -extern void tdep_init (void); -extern int tdep_search_unwind_table (unw_addr_space_t as, - unw_word_t ip, - unw_dyn_info_t *di, - unw_proc_info_t *pi, - int need_unwind_info, - void *arg); -extern void *tdep_uc_addr (ucontext_t *uc, int reg); -extern int tdep_get_elf_image (struct elf_image *ei, - pid_t pid, unw_word_t ip, - unsigned long *segbase, - unsigned long *mapoff, - char *path, size_t pathlen); -extern void tdep_get_exe_image_path (char *path); -extern int tdep_access_reg (struct cursor *c, - unw_regnum_t reg, - unw_word_t *valp, - int write); -extern int tdep_access_fpreg (struct cursor *c, - unw_regnum_t reg, - unw_fpreg_t *valp, - int write); - -#endif /* TILEGX_LIBUNWIND_I_H */ diff --git a/include/tdep/dwarf-config.h b/include/tdep/dwarf-config.h index a37f4220e..67ebcc934 100644 --- a/include/tdep/dwarf-config.h +++ b/include/tdep/dwarf-config.h @@ -23,8 +23,6 @@ # include "tdep-x86/dwarf-config.h" #elif defined __x86_64__ || defined __amd64__ # include "tdep-x86_64/dwarf-config.h" -#elif defined __tilegx__ -# include "tdep-tilegx/dwarf-config.h" #elif defined __riscv || defined __riscv__ # include "tdep-riscv/dwarf-config.h" #elif defined __loongarch64 diff --git a/include/tdep/jmpbuf.h b/include/tdep/jmpbuf.h index 01b9ee024..0c033336a 100644 --- a/include/tdep/jmpbuf.h +++ b/include/tdep/jmpbuf.h @@ -21,8 +21,6 @@ # include "tdep-x86/jmpbuf.h" #elif defined __x86_64__ # include "tdep-x86_64/jmpbuf.h" -#elif defined __tilegx__ -# include "tdep-tilegx/jmpbuf.h" #elif defined __riscv || defined __riscv__ # include "tdep-riscv/jmpbuf.h" #elif defined __loongarch64 diff --git a/include/tdep/libunwind_i.h.in b/include/tdep/libunwind_i.h.in index 1bacc3a82..f02674466 100644 --- a/include/tdep/libunwind_i.h.in +++ b/include/tdep/libunwind_i.h.in @@ -23,8 +23,6 @@ # include "tdep-x86/libunwind_i.h" #elif defined __x86_64__ # include "tdep-x86_64/libunwind_i.h" -#elif defined __tilegx__ -# include "tdep-tilegx/libunwind_i.h" #elif defined __s390x__ # include "tdep-s390x/libunwind_i.h" #elif defined __riscv || defined __riscv__ diff --git a/src/Makefile.am b/src/Makefile.am index 38141d8d7..6ba3998a0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -352,27 +352,6 @@ libunwind_mips_la_SOURCES_mips = $(libunwind_la_SOURCES_mips_common) \ mips/Gglobal.c mips/Ginit.c mips/Ginit_local.c mips/Ginit_remote.c \ mips/Gis_signal_frame.c mips/Gregs.c mips/Gresume.c mips/Gstep.c -# The list of files that go info libunwind and libunwind-tilegx: -noinst_HEADERS += tilegx/init.h tilegx/offsets.h tilegx/unwind_i.h -libunwind_la_SOURCES_tilegx_common = $(libunwind_la_SOURCES_common) \ - tilegx/is_fpreg.c tilegx/regname.c - -# The list of files that go into libunwind: -libunwind_la_SOURCES_tilegx = $(libunwind_la_SOURCES_tilegx_common) \ - $(libunwind_la_SOURCES_local) \ - tilegx/getcontext.S \ - tilegx/Lapply_reg_state.c tilegx/Lreg_states_iterate.c \ - tilegx/Lcreate_addr_space.c tilegx/Lget_proc_info.c tilegx/Lget_save_loc.c \ - tilegx/Lglobal.c tilegx/Linit.c tilegx/Linit_local.c tilegx/Linit_remote.c \ - tilegx/Lis_signal_frame.c tilegx/Lregs.c tilegx/Lresume.c tilegx/Lstep.c - -libunwind_tilegx_la_SOURCES_tilegx = $(libunwind_la_SOURCES_tilegx_common) \ - $(libunwind_la_SOURCES_generic) \ - tilegx/Gapply_reg_state.c tilegx/Greg_states_iterate.c \ - tilegx/Gcreate_addr_space.c tilegx/Gget_proc_info.c tilegx/Gget_save_loc.c \ - tilegx/Gglobal.c tilegx/Ginit.c tilegx/Ginit_local.c tilegx/Ginit_remote.c \ - tilegx/Gis_signal_frame.c tilegx/Gregs.c tilegx/Gresume.c tilegx/Gstep.c - # The list of files that go info libunwind and libunwind-riscv: noinst_HEADERS += riscv/init.h riscv/offsets.h riscv/unwind_i.h riscv/asm.h libunwind_la_SOURCES_riscv_common = $(libunwind_la_SOURCES_common) \ @@ -713,18 +692,6 @@ if !REMOTE_ONLY endif libunwind_setjmp_la_SOURCES += mips/siglongjmp.S else -if ARCH_TILEGX - lib_LTLIBRARIES += libunwind-tilegx.la - libunwind_la_SOURCES = $(libunwind_la_SOURCES_tilegx) - libunwind_tilegx_la_SOURCES = $(libunwind_tilegx_la_SOURCES_tilegx) - libunwind_tilegx_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) - libunwind_tilegx_la_LIBADD = libunwind-dwarf-generic.la - libunwind_tilegx_la_LIBADD += libunwind-elfxx.la -if !REMOTE_ONLY - libunwind_tilegx_la_LIBADD += libunwind.la -lc -endif - libunwind_setjmp_la_SOURCES += tilegx/siglongjmp.S -else if ARCH_RISCV lib_LTLIBRARIES += libunwind-riscv.la libunwind_la_SOURCES = $(libunwind_la_SOURCES_riscv) @@ -828,7 +795,6 @@ endif # ARCH_X86_64 endif # ARCH_X86 endif # ARCH_LOONGARCH64 endif # ARCH_RISCV -endif # ARCH_TILEGX endif # ARCH_MIPS endif # ARCH_HPPA endif # ARCH_IA64 diff --git a/src/coredump/_UCD_access_reg_linux.c b/src/coredump/_UCD_access_reg_linux.c index 102ba4afc..302f7bdfd 100644 --- a/src/coredump/_UCD_access_reg_linux.c +++ b/src/coredump/_UCD_access_reg_linux.c @@ -53,9 +53,6 @@ _UCD_access_reg (unw_addr_space_t as UNUSED, #elif defined(UNW_TARGET_SH) if (regnum > UNW_SH_PR) goto badreg; -#elif defined(UNW_TARGET_TILEGX) - if (regnum > UNW_TILEGX_CFA) - goto badreg; #elif defined(UNW_TARGET_IA64) || defined(UNW_TARGET_HPPA) || defined(UNW_TARGET_PPC32) || defined(UNW_TARGET_PPC64) if (regnum >= ARRAY_SIZE(ui->prstatus->pr_reg)) goto badreg; diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c index ea13e6de8..02e0ec6d8 100644 --- a/src/ptrace/_UPT_reg_offset.c +++ b/src/ptrace/_UPT_reg_offset.c @@ -623,64 +623,6 @@ const int _UPT_reg_offset[UNW_REG_LAST + 1] = [UNW_AARCH64_SP] = 0xf8, [UNW_AARCH64_PC] = 0x100, [UNW_AARCH64_PSTATE] = 0x108 -#elif defined(UNW_TARGET_TILEGX) - [UNW_TILEGX_R0] = 0x00, - [UNW_TILEGX_R1] = 0x08, - [UNW_TILEGX_R2] = 0x10, - [UNW_TILEGX_R3] = 0x08, - [UNW_TILEGX_R4] = 0x20, - [UNW_TILEGX_R5] = 0x28, - [UNW_TILEGX_R6] = 0x30, - [UNW_TILEGX_R7] = 0x38, - [UNW_TILEGX_R8] = 0x40, - [UNW_TILEGX_R9] = 0x48, - [UNW_TILEGX_R10] = 0x50, - [UNW_TILEGX_R11] = 0x58, - [UNW_TILEGX_R12] = 0x60, - [UNW_TILEGX_R13] = 0x68, - [UNW_TILEGX_R14] = 0x70, - [UNW_TILEGX_R15] = 0x78, - [UNW_TILEGX_R16] = 0x80, - [UNW_TILEGX_R17] = 0x88, - [UNW_TILEGX_R18] = 0x90, - [UNW_TILEGX_R19] = 0x98, - [UNW_TILEGX_R20] = 0xa0, - [UNW_TILEGX_R21] = 0xa8, - [UNW_TILEGX_R22] = 0xb0, - [UNW_TILEGX_R23] = 0xb8, - [UNW_TILEGX_R24] = 0xc0, - [UNW_TILEGX_R25] = 0xc8, - [UNW_TILEGX_R26] = 0xd0, - [UNW_TILEGX_R27] = 0xd8, - [UNW_TILEGX_R28] = 0xe0, - [UNW_TILEGX_R29] = 0xe8, - [UNW_TILEGX_R30] = 0xf0, - [UNW_TILEGX_R31] = 0xf8, - [UNW_TILEGX_R32] = 0x100, - [UNW_TILEGX_R33] = 0x108, - [UNW_TILEGX_R34] = 0x110, - [UNW_TILEGX_R35] = 0x118, - [UNW_TILEGX_R36] = 0x120, - [UNW_TILEGX_R37] = 0x128, - [UNW_TILEGX_R38] = 0x130, - [UNW_TILEGX_R39] = 0x138, - [UNW_TILEGX_R40] = 0x140, - [UNW_TILEGX_R41] = 0x148, - [UNW_TILEGX_R42] = 0x150, - [UNW_TILEGX_R43] = 0x158, - [UNW_TILEGX_R44] = 0x160, - [UNW_TILEGX_R45] = 0x168, - [UNW_TILEGX_R46] = 0x170, - [UNW_TILEGX_R47] = 0x178, - [UNW_TILEGX_R48] = 0x180, - [UNW_TILEGX_R49] = 0x188, - [UNW_TILEGX_R50] = 0x190, - [UNW_TILEGX_R51] = 0x198, - [UNW_TILEGX_R52] = 0x1a0, - [UNW_TILEGX_R53] = 0x1a8, - [UNW_TILEGX_R54] = 0x1b0, - [UNW_TILEGX_R55] = 0x1b8, - [UNW_TILEGX_PC] = 0x1a0 #elif defined(UNW_TARGET_S390X) [UNW_S390X_R0] = 0x10, [UNW_S390X_R1] = 0x18, diff --git a/src/tilegx/Gapply_reg_state.c b/src/tilegx/Gapply_reg_state.c deleted file mode 100644 index 82f056da6..000000000 --- a/src/tilegx/Gapply_reg_state.c +++ /dev/null @@ -1,37 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (c) 2002-2003 Hewlett-Packard Development Company, L.P. - Contributed by David Mosberger-Tang - - Modified for x86_64 by Max Asbock - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" - -int -unw_apply_reg_state (unw_cursor_t *cursor, - void *reg_states_data) -{ - struct cursor *c = (struct cursor *) cursor; - - return dwarf_apply_reg_state (&c->dwarf, (dwarf_reg_state_t *)reg_states_data); -} diff --git a/src/tilegx/Gcreate_addr_space.c b/src/tilegx/Gcreate_addr_space.c deleted file mode 100644 index a37c1282f..000000000 --- a/src/tilegx/Gcreate_addr_space.c +++ /dev/null @@ -1,62 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include - -#include "unwind_i.h" - -unw_addr_space_t -unw_create_addr_space (unw_accessors_t *a, int byte_order) -{ -#ifdef UNW_LOCAL_ONLY - return NULL; -#else - /* - * Tilegx supports only big or little-endian, not weird stuff like - * PDP_ENDIAN. - */ - if (byte_order != 0 && byte_order_is_valid(byte_order) == 0) - return NULL; - - unw_addr_space_t as = malloc (sizeof (*as)); - if (!as) - return NULL; - - memset (as, 0, sizeof (*as)); - - as->acc = *a; - - if (byte_order == 0) - /* use host default: */ - as->big_endian = target_is_big_endian(); - else - as->big_endian = (byte_order == UNW_BIG_ENDIAN); - - as->abi = UNW_TILEGX_ABI_N64; - as->addr_size = 8; - - return as; -#endif -} diff --git a/src/tilegx/Gget_proc_info.c b/src/tilegx/Gget_proc_info.c deleted file mode 100644 index 3a158da2d..000000000 --- a/src/tilegx/Gget_proc_info.c +++ /dev/null @@ -1,48 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" - -int -unw_get_proc_info (unw_cursor_t *cursor, unw_proc_info_t *pi) -{ - struct cursor *c = (struct cursor *) cursor; - int ret; - - ret = dwarf_make_proc_info (&c->dwarf); - - if (ret < 0) - { - /* On Tilegx, some routines i.e. _start() etc has no dwarf info. - Just simply mark the end of the frames. */ - memset (pi, 0, sizeof (*pi)); - pi->start_ip = c->dwarf.ip; - pi->end_ip = c->dwarf.ip + 1; - return 0; - } - - *pi = c->dwarf.pi; - return 0; -} diff --git a/src/tilegx/Gget_save_loc.c b/src/tilegx/Gget_save_loc.c deleted file mode 100644 index fcf069789..000000000 --- a/src/tilegx/Gget_save_loc.c +++ /dev/null @@ -1,62 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" - -int -unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc) -{ - struct cursor *c = (struct cursor *) cursor; - dwarf_loc_t loc; - - loc = DWARF_NULL_LOC; /* default to "not saved" */ - - if (reg <= UNW_TILEGX_R55) - loc = c->dwarf.loc[reg - UNW_TILEGX_R0]; - else - printf("\nInvalid register!"); - - memset (sloc, 0, sizeof (*sloc)); - - if (DWARF_IS_NULL_LOC (loc)) - { - sloc->type = UNW_SLT_NONE; - return 0; - } - -#if !defined(UNW_LOCAL_ONLY) - if (DWARF_IS_REG_LOC (loc)) - { - sloc->type = UNW_SLT_REG; - sloc->u.regnum = DWARF_GET_LOC (loc); - } - else -#endif - { - sloc->type = UNW_SLT_MEMORY; - sloc->u.addr = DWARF_GET_LOC (loc); - } - return 0; -} diff --git a/src/tilegx/Gglobal.c b/src/tilegx/Gglobal.c deleted file mode 100644 index 5232d41c2..000000000 --- a/src/tilegx/Gglobal.c +++ /dev/null @@ -1,64 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" -#include "dwarf_i.h" - -__attribute__((weak)) -pthread_mutex_t tilegx_lock = PTHREAD_MUTEX_INITIALIZER; -HIDDEN atomic_bool tdep_init_done = 0; - -HIDDEN const uint8_t dwarf_to_unw_regnum_map[] = - { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55 - }; - -HIDDEN void -tdep_init (void) -{ - intrmask_t saved_mask; - - sigfillset (&unwi_full_mask); - - lock_acquire (&tilegx_lock, saved_mask); - - if (atomic_load(&tdep_init_done)) - /* another thread else beat us to it... */ - goto out; - - mi_init (); - dwarf_init (); - -#ifndef UNW_REMOTE_ONLY - tilegx_local_addr_space_init (); -#endif - atomic_store(&tdep_init_done, 1); /* signal that we're initialized... */ - - out: - lock_release (&tilegx_lock, saved_mask); -} diff --git a/src/tilegx/Ginit.c b/src/tilegx/Ginit.c deleted file mode 100644 index a57cb1728..000000000 --- a/src/tilegx/Ginit.c +++ /dev/null @@ -1,171 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include -#include - -#include "unwind_i.h" - -#ifdef UNW_REMOTE_ONLY - -/* unw_local_addr_space is a NULL pointer in this case. */ -unw_addr_space_t unw_local_addr_space; - -#else /* !UNW_REMOTE_ONLY */ - -static struct unw_addr_space local_addr_space; - -unw_addr_space_t unw_local_addr_space = &local_addr_space; - -/* Return the address of the 64-bit slot in UC for REG (even for o32, - where registers are 32-bit, the slots are still 64-bit). */ - -static inline void * -uc_addr (ucontext_t *uc, int reg) -{ - if (reg >= UNW_TILEGX_R0 && reg < UNW_TILEGX_R0 + 56) - return &uc->uc_mcontext.gregs[reg - UNW_TILEGX_R0]; - else if (reg == UNW_TILEGX_PC) - return &uc->uc_mcontext.pc; - else - return NULL; -} - -# ifdef UNW_LOCAL_ONLY - -HIDDEN void * -tdep_uc_addr (ucontext_t *uc, int reg) -{ - char *addr = uc_addr (uc, reg); - return addr; -} - -# endif /* UNW_LOCAL_ONLY */ - -static void -put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) -{ - /* it's a no-op */ -} - -static int -get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) -{ -#ifndef UNW_LOCAL_ONLY -# pragma weak _U_dyn_info_list_addr - if (!_U_dyn_info_list_addr) - return -UNW_ENOINFO; -#endif - // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. - *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; -} - -static int -access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write, - void *arg) -{ - if ((long long)addr & (sizeof(unw_word_t) - 1)) - return 0; - - if (write) - { - Debug (16, "mem[%llx] <- %llx\n", (long long) addr, (long long) *val); - *(unw_word_t *) (intptr_t) addr = *val; - } - else - { - *val = *(unw_word_t *) (intptr_t) addr; - Debug (16, "mem[%llx] -> %llx\n", (long long) addr, (long long) *val); - } - return 0; -} - -static int -access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write, - void *arg) -{ - unw_word_t *addr; - ucontext_t *uc = arg; - - if (unw_is_fpreg (reg)) - goto badreg; - - Debug (16, "reg = %s\n", unw_regname (reg)); - if (!(addr = uc_addr (uc, reg))) - goto badreg; - - if (write) - { - *(unw_word_t *) (intptr_t) addr = (tilegx_reg_t) *val; - Debug (12, "%s <- %llx\n", unw_regname (reg), (long long) *val); - } - else - { - *val = (tilegx_reg_t) *(unw_word_t *) (intptr_t) addr; - Debug (12, "%s -> %llx\n", unw_regname (reg), (long long) *val); - } - return 0; - - badreg: - Debug (1, "bad register number %u\n", reg); - return -UNW_EBADREG; -} - -static int -get_static_proc_name (unw_addr_space_t as, unw_word_t ip, - char *buf, size_t buf_len, unw_word_t *offp, - void *arg) -{ - return elf_w (get_proc_name) (as, getpid (), ip, buf, buf_len, offp); -} - -__attribute__((weak)) void -tilegx_local_addr_space_init (void) -{ - memset (&local_addr_space, 0, sizeof (local_addr_space)); - local_addr_space.big_endian = target_is_big_endian(); - - local_addr_space.abi = UNW_TILEGX_ABI_N64; - local_addr_space.addr_size = sizeof (void *); -#ifndef UNW_REMOTE_ONLY -# if defined(HAVE_DL_ITERATE_PHDR) - local_addr_space.iterate_phdr_function = dl_iterate_phdr; -# endif -#endif - local_addr_space.caching_policy = UNWI_DEFAULT_CACHING_POLICY; - local_addr_space.acc.find_proc_info = dwarf_find_proc_info; - local_addr_space.acc.put_unwind_info = put_unwind_info; - local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr; - local_addr_space.acc.access_mem = access_mem; - local_addr_space.acc.access_reg = access_reg; - local_addr_space.acc.access_fpreg = NULL; - local_addr_space.acc.resume = tilegx_local_resume; - local_addr_space.acc.get_proc_name = get_static_proc_name; - unw_flush_cache (&local_addr_space, 0, 0); -} - -#endif /* !UNW_REMOTE_ONLY */ diff --git a/src/tilegx/Ginit_local.c b/src/tilegx/Ginit_local.c deleted file mode 100644 index 029558675..000000000 --- a/src/tilegx/Ginit_local.c +++ /dev/null @@ -1,80 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" -#include "init.h" - -#ifdef UNW_REMOTE_ONLY - -int -unw_init_local (unw_cursor_t *cursor, ucontext_t *uc) -{ - return -UNW_EINVAL; -} - -#else /* !UNW_REMOTE_ONLY */ - -static int -unw_init_local_common(unw_cursor_t *cursor, ucontext_t *uc, unsigned use_prev_instr) -{ - struct cursor *c = (struct cursor *) cursor; - - if (!atomic_load(&tdep_init_done)) - tdep_init (); - - memset(c, 0, sizeof(unw_cursor_t)); - - Debug (1, "(cursor=%p)\n", c); - - c->dwarf.as = unw_local_addr_space; - - c->dwarf.as_arg = uc; - return common_init (c, use_prev_instr); -} - -int -unw_init_local (unw_cursor_t *cursor, ucontext_t *uc) -{ - return unw_init_local_common(cursor, uc, 1); -} - -int -unw_init_local2 (unw_cursor_t *cursor, ucontext_t *uc, int flag) -{ - if (!flag) - { - return unw_init_local_common(cursor, uc, 1); - } - else if (flag == UNW_INIT_SIGNAL_FRAME) - { - return unw_init_local_common(cursor, uc, 0); - } - else - { - return -UNW_EINVAL; - } -} - -#endif /* !UNW_REMOTE_ONLY */ diff --git a/src/tilegx/Ginit_remote.c b/src/tilegx/Ginit_remote.c deleted file mode 100644 index d6a874c13..000000000 --- a/src/tilegx/Ginit_remote.c +++ /dev/null @@ -1,47 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "init.h" -#include "unwind_i.h" - -int -unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) -{ -#ifdef UNW_LOCAL_ONLY - return -UNW_EINVAL; -#else /* !UNW_LOCAL_ONLY */ - struct cursor *c = (struct cursor *) cursor; - - if (!atomic_load(&tdep_init_done)) - tdep_init (); - - Debug (1, "(cursor=%p)\n", c); - - c->dwarf.as = as; - c->dwarf.as_arg = as_arg; - - return common_init (c, 0); -#endif /* !UNW_LOCAL_ONLY */ -} diff --git a/src/tilegx/Gis_signal_frame.c b/src/tilegx/Gis_signal_frame.c deleted file mode 100644 index eea00e47f..000000000 --- a/src/tilegx/Gis_signal_frame.c +++ /dev/null @@ -1,118 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" -#include -#include "offsets.h" - -#ifdef __linux__ -#include -#include -#else -# error "Only support Linux!" -#endif - -#define MOVELI_R10_RT_SIGRETURN \ - ( 0x000007e051483000ULL | \ - ((unsigned long)__NR_rt_sigreturn << 43) | \ - ((unsigned long)TREG_SYSCALL_NR << 31) ) -#define SWINT1 0x286b180051485000ULL - -int -unw_is_signal_frame (unw_cursor_t *cursor) -{ - struct cursor *c = (struct cursor*) cursor; - unw_word_t w0, w1, ip; - unw_addr_space_t as; - unw_accessors_t *a; - void *arg; - int ret; - - as = c->dwarf.as; - a = unw_get_accessors_int (as); - arg = c->dwarf.as_arg; - - ip = c->dwarf.ip; - - if (!ip || !a->access_mem || (ip & (sizeof(unw_word_t) - 1))) - return 0; - - if ((ret = (*a->access_mem) (as, ip, &w0, 0, arg)) < 0) - return ret; - - if ((ret = (*a->access_mem) (as, ip + 8, &w1, 0, arg)) < 0) - return ret; - - /* Return 1 if the IP points to a RT sigreturn sequence. */ - if (w0 == MOVELI_R10_RT_SIGRETURN && - w1 == SWINT1) - { - return 1; - } - return 0; -} - - -HIDDEN int -tilegx_handle_signal_frame (unw_cursor_t *cursor) -{ - int i; - struct cursor *c = (struct cursor *) cursor; - unw_word_t sc_addr, sp, sp_addr = c->dwarf.cfa; - struct dwarf_loc sp_loc = DWARF_LOC (sp_addr, 0); - int ret; - - if ((ret = dwarf_get (&c->dwarf, sp_loc, &sp)) < 0) - return -UNW_EUNSPEC; - - /* Save the SP and PC to be able to return execution at this point - later in time (unw_resume). */ - c->sigcontext_sp = c->dwarf.cfa; - c->sigcontext_pc = c->dwarf.ip; - - c->sigcontext_addr = sp_addr + sizeof (siginfo_t) + - C_ABI_SAVE_AREA_SIZE; - sc_addr = c->sigcontext_addr + LINUX_UC_MCONTEXT_OFF; - - for (i = 0; i < DWARF_NUM_PRESERVED_REGS; ++i) - c->dwarf.loc[i] = DWARF_NULL_LOC; - - /* Update the dwarf cursor. - Set the location of the registers to the corresponding addresses of the - uc_mcontext / sigcontext structure contents. */ - -#define SC_REG_OFFSET(X) (8 * X) - - for (i = UNW_TILEGX_R0; i <= UNW_TILEGX_R55; i++) - { - c->dwarf.loc[i] = DWARF_LOC (sc_addr + SC_REG_OFFSET(i), 0); - } - - /* Set SP/CFA and PC/IP. */ - dwarf_get (&c->dwarf, c->dwarf.loc[UNW_TILEGX_R54], &c->dwarf.cfa); - dwarf_get (&c->dwarf, c->dwarf.loc[UNW_TILEGX_R55], &c->dwarf.ip); - - return 1; -} diff --git a/src/tilegx/Greg_states_iterate.c b/src/tilegx/Greg_states_iterate.c deleted file mode 100644 index a17dc1b56..000000000 --- a/src/tilegx/Greg_states_iterate.c +++ /dev/null @@ -1,37 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (c) 2002-2003 Hewlett-Packard Development Company, L.P. - Contributed by David Mosberger-Tang - - Modified for x86_64 by Max Asbock - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" - -int -unw_reg_states_iterate (unw_cursor_t *cursor, - unw_reg_states_callback cb, void *token) -{ - struct cursor *c = (struct cursor *) cursor; - - return dwarf_reg_states_iterate (&c->dwarf, cb, token); -} diff --git a/src/tilegx/Gregs.c b/src/tilegx/Gregs.c deleted file mode 100644 index 565c6f443..000000000 --- a/src/tilegx/Gregs.c +++ /dev/null @@ -1,76 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" - -HIDDEN int -tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp, - int write) -{ - dwarf_loc_t loc = DWARF_NULL_LOC; - - if (reg == UNW_TILEGX_R54 && !write) - { - reg = UNW_TILEGX_CFA; - } - - if (reg <= UNW_TILEGX_R55) - loc = c->dwarf.loc[reg - UNW_TILEGX_R0]; - else if (reg == UNW_TILEGX_CFA) - { - if (write) - return -UNW_EREADONLYREG; - *valp = c->dwarf.cfa; - return 0; - } - else - { - Debug (1, "bad register number %u\n", reg); - return -UNW_EBADREG; - } - - if (write) - { - if (ci->dwarf.use_prev_instr == 0) { - if (reg == UNW_TILEGX_PC) - c->dwarf.ip = *valp; /* update the IP cache */ - } - else { - if (reg == UNW_TILEGX_R55) - c->dwarf.ip = *valp; /* update the IP cache */ - } - return dwarf_put (&c->dwarf, loc, *valp); - } - else - return dwarf_get (&c->dwarf, loc, valp); -} - -HIDDEN int -tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, unw_fpreg_t *valp, - int write) -{ - Debug (1, "bad register number %u\n", reg); - return -UNW_EBADREG; -} diff --git a/src/tilegx/Gresume.c b/src/tilegx/Gresume.c deleted file mode 100644 index ece443a5b..000000000 --- a/src/tilegx/Gresume.c +++ /dev/null @@ -1,94 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - - -#include "unwind_i.h" -#include "offsets.h" -#include - -#ifndef UNW_REMOTE_ONLY - -HIDDEN inline int -tilegx_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) -{ - int i; - struct cursor *c = (struct cursor *) cursor; - ucontext_t *uc = c->dwarf.as_arg; - - Debug (1, "(cursor=%p\n", c); - - return setcontext(uc); -} - -#endif /* !UNW_REMOTE_ONLY */ - -static inline void -establish_machine_state (struct cursor *c) -{ - unw_addr_space_t as = c->dwarf.as; - void *arg = c->dwarf.as_arg; - unw_fpreg_t fpval; - unw_word_t val; - int reg; - - Debug (8, "copying out cursor state\n"); - - for (reg = 0; reg <= UNW_REG_LAST; ++reg) - { - Debug (16, "copying %s %d\n", unw_regname (reg), reg); - - if (unw_is_fpreg (reg)) - { - Debug (1, "no fp!"); - abort (); - } - else - { - if (tdep_access_reg (c, reg, &val, 0) >= 0) - as->acc.access_reg (as, reg, &val, 1, arg); - } - } -} - -int -unw_resume (unw_cursor_t *cursor) -{ - struct cursor *c = (struct cursor *) cursor; - - Debug (1, "(cursor=%p) ip=0x%lx\n", c, c->dwarf.ip); - - if (!c->dwarf.ip) - { - /* This can happen easily when the frame-chain gets truncated - due to bad or missing unwind-info. */ - Debug (1, "refusing to resume execution at address 0\n"); - return -UNW_EINVAL; - } - - establish_machine_state (c); - - return (*c->dwarf.as->acc.resume) (c->dwarf.as, (unw_cursor_t *) c, - c->dwarf.as_arg); -} diff --git a/src/tilegx/Gstep.c b/src/tilegx/Gstep.c deleted file mode 100644 index b4456897b..000000000 --- a/src/tilegx/Gstep.c +++ /dev/null @@ -1,53 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" -#include "offsets.h" - -int -unw_step (unw_cursor_t *cursor) -{ - struct cursor *c = (struct cursor *) cursor; - int ret; - - Debug (1, "(cursor=%p, ip=0x%016lx, sp=0x%016lx)\n", - c, c->dwarf.ip, c->dwarf.cfa); - - /* Special handling the signal frame. */ - if (unw_is_signal_frame (cursor) > 0) - return tilegx_handle_signal_frame (cursor); - - /* Try DWARF-based unwinding... */ - ret = dwarf_step (&c->dwarf); - - if (unlikely (ret == -UNW_ESTOPUNWIND)) - return ret; - - /* Dwarf unwinding didn't work, stop. */ - if (unlikely (ret < 0)) - return 0; - - return (c->dwarf.ip == 0) ? 0 : 1; -} diff --git a/src/tilegx/Lapply_reg_state.c b/src/tilegx/Lapply_reg_state.c deleted file mode 100644 index 7ebada480..000000000 --- a/src/tilegx/Lapply_reg_state.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Gapply_reg_state.c" -#endif diff --git a/src/tilegx/Lcreate_addr_space.c b/src/tilegx/Lcreate_addr_space.c deleted file mode 100644 index 0f2dc6be9..000000000 --- a/src/tilegx/Lcreate_addr_space.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Gcreate_addr_space.c" -#endif diff --git a/src/tilegx/Lget_proc_info.c b/src/tilegx/Lget_proc_info.c deleted file mode 100644 index 69028b019..000000000 --- a/src/tilegx/Lget_proc_info.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Gget_proc_info.c" -#endif diff --git a/src/tilegx/Lget_save_loc.c b/src/tilegx/Lget_save_loc.c deleted file mode 100644 index 9ea048a90..000000000 --- a/src/tilegx/Lget_save_loc.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Gget_save_loc.c" -#endif diff --git a/src/tilegx/Lglobal.c b/src/tilegx/Lglobal.c deleted file mode 100644 index 6d7b489e1..000000000 --- a/src/tilegx/Lglobal.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Gglobal.c" -#endif diff --git a/src/tilegx/Linit.c b/src/tilegx/Linit.c deleted file mode 100644 index e9abfdd46..000000000 --- a/src/tilegx/Linit.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Ginit.c" -#endif diff --git a/src/tilegx/Linit_local.c b/src/tilegx/Linit_local.c deleted file mode 100644 index 68a1687e8..000000000 --- a/src/tilegx/Linit_local.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Ginit_local.c" -#endif diff --git a/src/tilegx/Linit_remote.c b/src/tilegx/Linit_remote.c deleted file mode 100644 index 58cb04ab7..000000000 --- a/src/tilegx/Linit_remote.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Ginit_remote.c" -#endif diff --git a/src/tilegx/Lis_signal_frame.c b/src/tilegx/Lis_signal_frame.c deleted file mode 100644 index b9a7c4f51..000000000 --- a/src/tilegx/Lis_signal_frame.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Gis_signal_frame.c" -#endif diff --git a/src/tilegx/Lreg_states_iterate.c b/src/tilegx/Lreg_states_iterate.c deleted file mode 100644 index f1eb1e79d..000000000 --- a/src/tilegx/Lreg_states_iterate.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Greg_states_iterate.c" -#endif diff --git a/src/tilegx/Lregs.c b/src/tilegx/Lregs.c deleted file mode 100644 index 2c9c75cd7..000000000 --- a/src/tilegx/Lregs.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Gregs.c" -#endif diff --git a/src/tilegx/Lresume.c b/src/tilegx/Lresume.c deleted file mode 100644 index 41a8cf003..000000000 --- a/src/tilegx/Lresume.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Gresume.c" -#endif diff --git a/src/tilegx/Lstep.c b/src/tilegx/Lstep.c deleted file mode 100644 index c1ac3c754..000000000 --- a/src/tilegx/Lstep.c +++ /dev/null @@ -1,5 +0,0 @@ -#define UNW_LOCAL_ONLY -#include -#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) -#include "Gstep.c" -#endif diff --git a/src/tilegx/elfxx.c b/src/tilegx/elfxx.c deleted file mode 100644 index 07d3d12b9..000000000 --- a/src/tilegx/elfxx.c +++ /dev/null @@ -1,27 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "libunwind_i.h" - -#include "../src/elfxx.c" diff --git a/src/tilegx/gen-offsets.c b/src/tilegx/gen-offsets.c deleted file mode 100644 index 8704bb215..000000000 --- a/src/tilegx/gen-offsets.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include -#include - -#define UC(N,X) \ - printf ("#define LINUX_UC_" N "_OFF\t0x%X\n", offsetof (ucontext_t, X)) - -#define SC(N,X) \ - printf ("#define LINUX_SC_" N "_OFF\t0x%X\n", offsetof (struct sigcontext, X)) - -int -main (void) -{ - printf ( -"/* Linux-specific definitions: */\n\n" - -"/* Define various structure offsets to simplify cross-compilation. */\n\n" - -"/* Offsets for TILEGX Linux \"ucontext_t\": */\n\n"); - - UC ("FLAGS", uc_flags); - UC ("LINK", uc_link); - UC ("STACK", uc_stack); - UC ("MCONTEXT", uc_mcontext); - UC ("SIGMASK", uc_sigmask); - - UC ("MCONTEXT_GREGS", uc_mcontext.gregs); - - return 0; -} diff --git a/src/tilegx/getcontext.S b/src/tilegx/getcontext.S deleted file mode 100644 index fbc8654bc..000000000 --- a/src/tilegx/getcontext.S +++ /dev/null @@ -1,36 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "offsets.h" -#include - - .text - # define REG(X) LINUX_UC_MCONTEXT_GREGS + 8 * (X) - .global _Utilegx_getcontext - .type _Utilegx_getcontext, %function - # This is a stub version of getcontext() for TILEGX. -_Utilegx_getcontext: - - diff --git a/src/tilegx/init.h b/src/tilegx/init.h deleted file mode 100644 index 0e0f7fd1d..000000000 --- a/src/tilegx/init.h +++ /dev/null @@ -1,63 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" - -static inline int -common_init (struct cursor *c, unsigned use_prev_instr) -{ - int ret, i; - - for (i = 0; i < 56; i++) - c->dwarf.loc[i] = DWARF_REG_LOC (&c->dwarf, UNW_TILEGX_R0 + i); - for (i = 56; i < DWARF_NUM_PRESERVED_REGS; ++i) - c->dwarf.loc[i] = DWARF_NULL_LOC; - - if (use_prev_instr == 0) - ret = dwarf_get (&c->dwarf, DWARF_REG_LOC (&c->dwarf, UNW_TILEGX_PC), - &c->dwarf.ip); - else - ret = dwarf_get (&c->dwarf, DWARF_REG_LOC (&c->dwarf, UNW_TILEGX_R55), - &c->dwarf.ip); - - if (ret < 0) - return ret; - - ret = dwarf_get (&c->dwarf, DWARF_REG_LOC (&c->dwarf, UNW_TILEGX_R54), - &c->dwarf.cfa); - - if (ret < 0) - return ret; - - c->dwarf.args_size = 0; - c->dwarf.stash_frames = 0; - c->dwarf.use_prev_instr = use_prev_instr; - c->dwarf.pi_valid = 0; - c->dwarf.pi_is_dynamic = 0; - c->dwarf.hint = 0; - c->dwarf.prev_rs = 0; - - return 0; -} diff --git a/src/tilegx/is_fpreg.c b/src/tilegx/is_fpreg.c deleted file mode 100644 index d6d589690..000000000 --- a/src/tilegx/is_fpreg.c +++ /dev/null @@ -1,33 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "libunwind_i.h" - -/* TILEGX has no FP. */ - -int -unw_is_fpreg (int regnum) -{ - return 0; -} diff --git a/src/tilegx/offsets.h b/src/tilegx/offsets.h deleted file mode 100644 index 6d30f1edc..000000000 --- a/src/tilegx/offsets.h +++ /dev/null @@ -1,12 +0,0 @@ -/* Linux-specific definitions: */ - -/* Define various structure offsets to simplify cross-compilation. */ - -/* Offsets for TILEGX Linux "ucontext_t": */ - -#define LINUX_UC_FLAGS_OFF 0x0 -#define LINUX_UC_LINK_OFF 0x8 -#define LINUX_UC_STACK_OFF 0x10 -#define LINUX_UC_MCONTEXT_OFF 0x28 -#define LINUX_UC_SIGMASK_OFF 0x228 -#define LINUX_UC_MCONTEXT_GREGS 0x28 diff --git a/src/tilegx/regname.c b/src/tilegx/regname.c deleted file mode 100644 index 0ce47b9d6..000000000 --- a/src/tilegx/regname.c +++ /dev/null @@ -1,55 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - Copyright (C) 2014 Tilera Corp. - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "unwind_i.h" - -static const char *regname[] = - { - /* 0. */ - "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - /* 8. */ - "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", - /* 16. */ - "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", - /* 24. */ - "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", - /* 32. */ - "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", - /* 40. */ - "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", - /* 48. */ - "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55", - /* pc, cfa */ - "pc", "cfa" - }; - -const char * -unw_regname (unw_regnum_t reg) -{ - if (reg < (unw_regnum_t) ARRAY_SIZE (regname)) - return regname[reg]; - else - return "???"; -} diff --git a/src/tilegx/siglongjmp.S b/src/tilegx/siglongjmp.S deleted file mode 100644 index bccb1c778..000000000 --- a/src/tilegx/siglongjmp.S +++ /dev/null @@ -1,7 +0,0 @@ - /* Dummy implementation for now. */ - .globl _UI_siglongjmp_cont - .globl _UI_longjmp_cont - -_UI_siglongjmp_cont: -_UI_longjmp_cont: - jrp lr diff --git a/src/tilegx/unwind_i.h b/src/tilegx/unwind_i.h deleted file mode 100644 index 9d41c90b4..000000000 --- a/src/tilegx/unwind_i.h +++ /dev/null @@ -1,46 +0,0 @@ -/* libunwind - a platform-independent unwind library - Copyright (C) 2008 CodeSourcery - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef unwind_i_h -#define unwind_i_h - -#include -#include - -#include - -#include "libunwind_i.h" - -#define tilegx_local_resume UNW_OBJ(local_resume) -#define tilegx_local_addr_space_init UNW_OBJ(local_addr_space_init) - -extern int tilegx_local_resume (unw_addr_space_t as, - unw_cursor_t *cursor, - void *arg); -#define tilegx_handle_signal_frame UNW_OBJ(handle_signal_frame) -extern int tilegx_handle_signal_frame(unw_cursor_t *cursor); - -extern void tilegx_local_addr_space_init (void); - -#endif /* unwind_i_h */ diff --git a/tests/Gtest-resume-sig.c b/tests/Gtest-resume-sig.c index 13cdb39ae..cda8a5cd8 100644 --- a/tests/Gtest-resume-sig.c +++ b/tests/Gtest-resume-sig.c @@ -119,11 +119,6 @@ handler (int sig) if ((ret = unw_step (&c)) < 0) /* step to kill() */ panic ("unw_step(2) failed: ret=%d\n", ret); -#if defined(UNW_TARGET_TILEGX) - if ((ret = unw_step (&c)) < 0) /* step to signal trampoline */ - panic ("unw_step(2) failed: ret=%d\n", ret); -#endif - if ((ret = unw_get_reg (&c, UNW_REG_IP, &ip)) < 0) panic ("unw_get_reg(IP) failed: ret=%d\n", ret); if (verbose) diff --git a/tests/check-namespace.sh.in b/tests/check-namespace.sh.in index 47f7402a5..86b0157ab 100644 --- a/tests/check-namespace.sh.in +++ b/tests/check-namespace.sh.in @@ -183,14 +183,6 @@ check_local_unw_abi () { match _UL${plat}_dwarf_search_unwind_table match _UL${plat}_dwarf_find_unwind_table ;; - tilegx) - match _U${plat}_getcontext - match _U${plat}_is_fpreg - match _UL${plat}_dwarf_search_unwind_table - match _UL${plat}_dwarf_find_unwind_table - match _UL${plat}_local_addr_space_init - match ${plat}_lock - ;; s390x) match _U${plat}_getcontext match _U${plat}_is_fpreg @@ -311,15 +303,6 @@ check_generic_unw_abi () { match _U${plat}_dwarf_search_unwind_table match _U${plat}_dwarf_find_unwind_table ;; - tilegx) - match _U${plat}_dwarf_search_unwind_table - match _U${plat}_dwarf_find_unwind_table - match _U${plat}_get_elf_image - match _U${plat}_get_exe_image_path - match _U${plat}_is_fpreg - match _U${plat}_local_addr_space_init - match ${plat}_lock - ;; s390x) match _U${plat}_is_fpreg match _U${plat}_get_elf_image diff --git a/tests/flush-cache.S b/tests/flush-cache.S index 3ee47269e..6e3a82b97 100644 --- a/tests/flush-cache.S +++ b/tests/flush-cache.S @@ -77,22 +77,6 @@ flush_cache: .globl flush_cache flush_cache: bx lr -#elif defined(__tilegx__) - .text - .globl flush_cache -flush_cache: - - andi r0, r0, -64 -1: { - flush r0 ; - addi r0, r0, 64 - } - { - bgtz r1, 1b ; - addi r1, r1, -64 - } - jrp lr -#else # error Need flush_cache code for this architecture. #endif