Quantcast

Valgrind: r16340 - in /trunk: ./ cachegrind/ coregrind/ coregrind/m_aspacemgr/ coregrind/m_coredump/ coregrind/m_debuginfo/ coregrind/m_dispatch/ coregrind/m_gdbserver/ coregrind/m_initimg/ coregrind/m_scheduler/ coregrind/m_sigframe/ coregrind/m_syswrap/ docs/internals/ drd/ exp-sgcheck/ exp-sgcheck/tests/ gdbserver_tests/ helgrind/tests/ include/ include/vki/ memcheck/ memcheck/tests/ memcheck/tests/vbit-test/ none/tests/ none/tests/tilegx/ perf/ tests/

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Valgrind: r16340 - in /trunk: ./ cachegrind/ coregrind/ coregrind/m_aspacemgr/ coregrind/m_coredump/ coregrind/m_debuginfo/ coregrind/m_dispatch/ coregrind/m_gdbserver/ coregrind/m_initimg/ coregrind/m_scheduler/ coregrind/m_sigframe/ coregrind/m_syswrap/ docs/internals/ drd/ exp-sgcheck/ exp-sgcheck/tests/ gdbserver_tests/ helgrind/tests/ include/ include/vki/ memcheck/ memcheck/tests/ memcheck/tests/vbit-test/ none/tests/ none/tests/tilegx/ perf/ tests/

svn-2
Author: iraisr
Date: Mon May  8 18:21:59 2017
New Revision: 16340

Log:
Remove TileGX/Linux port.
Fixes BZ#379504.

Removed:
    trunk/coregrind/m_dispatch/dispatch-tilegx-linux.S
    trunk/coregrind/m_gdbserver/valgrind-low-tilegx.c
    trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c
    trunk/coregrind/m_syswrap/syscall-tilegx-linux.S
    trunk/coregrind/m_syswrap/syswrap-tilegx-linux.c
    trunk/include/vki/vki-posixtypes-tilegx-linux.h
    trunk/include/vki/vki-scnums-tilegx-linux.h
    trunk/include/vki/vki-tilegx-linux.h
    trunk/memcheck/tests/origin5-bz2.stderr.exp-glibc212-tilegx
    trunk/memcheck/tests/origin6-fp.stderr.exp-glibc212-tilegx
    trunk/none/tests/tilegx/
Modified:
    trunk/Makefile.all.am
    trunk/Makefile.tool.am
    trunk/Makefile.vex.am
    trunk/NEWS
    trunk/cachegrind/cg_arch.c
    trunk/cachegrind/cg_branchpred.c
    trunk/configure.ac
    trunk/coregrind/Makefile.am
    trunk/coregrind/launcher-linux.c
    trunk/coregrind/m_aspacemgr/aspacemgr-common.c
    trunk/coregrind/m_cache.c
    trunk/coregrind/m_coredump/coredump-elf.c
    trunk/coregrind/m_debuginfo/d3basics.c
    trunk/coregrind/m_debuginfo/debuginfo.c
    trunk/coregrind/m_debuginfo/priv_storage.h
    trunk/coregrind/m_debuginfo/readdwarf.c
    trunk/coregrind/m_debuginfo/readelf.c
    trunk/coregrind/m_debuginfo/storage.c
    trunk/coregrind/m_debuglog.c
    trunk/coregrind/m_gdbserver/target.c
    trunk/coregrind/m_gdbserver/valgrind_low.h
    trunk/coregrind/m_initimg/initimg-linux.c
    trunk/coregrind/m_libcassert.c
    trunk/coregrind/m_libcfile.c
    trunk/coregrind/m_libcproc.c
    trunk/coregrind/m_machine.c
    trunk/coregrind/m_main.c
    trunk/coregrind/m_options.c
    trunk/coregrind/m_redir.c
    trunk/coregrind/m_scheduler/scheduler.c
    trunk/coregrind/m_signals.c
    trunk/coregrind/m_stacktrace.c
    trunk/coregrind/m_syscall.c
    trunk/coregrind/m_syswrap/priv_syswrap-linux.h
    trunk/coregrind/m_syswrap/priv_types_n_macros.h
    trunk/coregrind/m_syswrap/syswrap-linux.c
    trunk/coregrind/m_syswrap/syswrap-main.c
    trunk/coregrind/m_trampoline.S
    trunk/coregrind/m_translate.c
    trunk/coregrind/pub_core_aspacemgr.h
    trunk/coregrind/pub_core_basics.h
    trunk/coregrind/pub_core_debuginfo.h
    trunk/coregrind/pub_core_machine.h
    trunk/coregrind/pub_core_mallocfree.h
    trunk/coregrind/pub_core_syscall.h
    trunk/coregrind/pub_core_trampoline.h
    trunk/coregrind/pub_core_transtab_asm.h
    trunk/coregrind/vgdb-invoker-ptrace.c
    trunk/docs/internals/3_12_BUGSTATUS.txt
    trunk/docs/internals/register-uses.txt
    trunk/drd/drd_bitmap.h
    trunk/drd/drd_clientreq.c
    trunk/drd/drd_load_store.c
    trunk/exp-sgcheck/pc_main.c
    trunk/exp-sgcheck/tests/is_arch_supported
    trunk/gdbserver_tests/mcblocklistsearch.vgtest
    trunk/gdbserver_tests/nlcontrolc.vgtest
    trunk/gdbserver_tests/nlgone_return.vgtest
    trunk/helgrind/tests/annotate_hbefore.c
    trunk/helgrind/tests/tc07_hbl1.c
    trunk/helgrind/tests/tc08_hbl2.c
    trunk/helgrind/tests/tc11_XCHG.c
    trunk/include/pub_tool_basics.h
    trunk/include/pub_tool_guest.h
    trunk/include/pub_tool_machine.h
    trunk/include/pub_tool_vkiscnums_asm.h
    trunk/include/valgrind.h
    trunk/include/vki/vki-linux.h
    trunk/memcheck/mc_machine.c
    trunk/memcheck/tests/Makefile.am
    trunk/memcheck/tests/atomic_incs.c
    trunk/memcheck/tests/leak-segv-jmp.c
    trunk/memcheck/tests/leak-segv-jmp.stderr.exp
    trunk/memcheck/tests/vbit-test/irops.c
    trunk/memcheck/tests/vbit-test/vtest.h
    trunk/none/tests/Makefile.am
    trunk/none/tests/allexec_prepare_prereq
    trunk/none/tests/bug234814.vgtest
    trunk/none/tests/libvex_test.c
    trunk/perf/bigcode.c
    trunk/tests/arch_test.c

Modified: trunk/Makefile.all.am
==============================================================================
--- trunk/Makefile.all.am (original)
+++ trunk/Makefile.all.am Mon May  8 18:21:59 2017
@@ -239,9 +239,6 @@
  $(AM_CFLAGS_PSO_BASE)
 AM_CCASFLAGS_MIPS64_LINUX  = @FLAG_M64@ -g @FLAG_MIPS64@
 
-AM_CFLAGS_TILEGX_LINUX     = @FLAG_M64@ $(AM_CFLAGS_BASE)
-AM_CFLAGS_PSO_TILEGX_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) $(AM_CFLAGS_PSO_BASE)
-
 AM_FLAG_M3264_X86_SOLARIS   = @FLAG_M32@
 AM_CFLAGS_X86_SOLARIS       = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY_2@ \
  $(AM_CFLAGS_BASE) -fomit-frame-pointer \
@@ -299,7 +296,6 @@
 PRELOAD_LDFLAGS_S390X_LINUX    = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
 PRELOAD_LDFLAGS_MIPS32_LINUX   = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
 PRELOAD_LDFLAGS_MIPS64_LINUX   = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
-PRELOAD_LDFLAGS_TILEGX_LINUX   = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
 PRELOAD_LDFLAGS_X86_SOLARIS    = $(PRELOAD_LDFLAGS_COMMON_SOLARIS) @FLAG_M32@
 PRELOAD_LDFLAGS_AMD64_SOLARIS  = $(PRELOAD_LDFLAGS_COMMON_SOLARIS) @FLAG_M64@
 

Modified: trunk/Makefile.tool.am
==============================================================================
--- trunk/Makefile.tool.am (original)
+++ trunk/Makefile.tool.am Mon May  8 18:21:59 2017
@@ -79,9 +79,6 @@
  -static -nodefaultlibs -nostartfiles -u __start @FLAG_NO_BUILD_ID@ \
  @FLAG_M64@
 
-TOOL_LDFLAGS_TILEGX_LINUX = \
- $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
-
 TOOL_LDFLAGS_X86_SOLARIS = \
  $(TOOL_LDFLAGS_COMMON_SOLARIS) @FLAG_M32@
 
@@ -144,9 +141,6 @@
 LIBREPLACEMALLOC_MIPS64_LINUX = \
  $(top_builddir)/coregrind/libreplacemalloc_toolpreload-mips64-linux.a
 
-LIBREPLACEMALLOC_TILEGX_LINUX = \
- $(top_builddir)/coregrind/libreplacemalloc_toolpreload-tilegx-linux.a
-
 LIBREPLACEMALLOC_X86_SOLARIS = \
  $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-solaris.a
 
@@ -209,11 +203,6 @@
  $(LIBREPLACEMALLOC_MIPS64_LINUX) \
  -Wl,--no-whole-archive
 
-LIBREPLACEMALLOC_LDFLAGS_TILEGX_LINUX = \
- -Wl,--whole-archive \
- $(LIBREPLACEMALLOC_TILEGX_LINUX) \
- -Wl,--no-whole-archive
-
 LIBREPLACEMALLOC_LDFLAGS_X86_SOLARIS = \
  -Wl,--whole-archive \
  $(LIBREPLACEMALLOC_X86_SOLARIS) \

Modified: trunk/Makefile.vex.am
==============================================================================
--- trunk/Makefile.vex.am (original)
+++ trunk/Makefile.vex.am Mon May  8 18:21:59 2017
@@ -26,7 +26,6 @@
  pub/libvex_guest_s390x.h \
  pub/libvex_guest_mips32.h \
  pub/libvex_guest_mips64.h \
- pub/libvex_guest_tilegx.h \
  pub/libvex_s390x_common.h \
  pub/libvex_ir.h \
  pub/libvex_trc_values.h
@@ -45,7 +44,6 @@
  priv/guest_arm64_defs.h \
  priv/guest_s390_defs.h \
  priv/guest_mips_defs.h \
- priv/guest_tilegx_defs.h \
  priv/host_generic_regs.h \
  priv/host_generic_simd64.h \
  priv/host_generic_simd128.h \
@@ -57,11 +55,9 @@
  priv/host_arm_defs.h \
  priv/host_arm64_defs.h \
  priv/host_s390_defs.h \
- priv/host_tilegx_defs.h \
  priv/s390_disasm.h \
  priv/s390_defs.h \
- priv/host_mips_defs.h \
- priv/tilegx_disasm.h
+ priv/host_mips_defs.h
 
 BUILT_SOURCES = pub/libvex_guest_offsets.h
 CLEANFILES    = pub/libvex_guest_offsets.h
@@ -86,8 +82,7 @@
     pub/libvex_guest_arm64.h \
     pub/libvex_guest_s390x.h \
     pub/libvex_guest_mips32.h \
-    pub/libvex_guest_mips64.h \
-    pub/libvex_guest_tilegx.h
+    pub/libvex_guest_mips64.h
  rm -f auxprogs/genoffsets.s
  $(mkdir_p) auxprogs pub
  $(CC) $(CFLAGS_FOR_GENOFFSETS) \
@@ -142,8 +137,6 @@
  priv/guest_s390_toIR.c \
  priv/guest_mips_helpers.c \
  priv/guest_mips_toIR.c \
- priv/guest_tilegx_helpers.c \
- priv/guest_tilegx_toIR.c \
  priv/host_generic_regs.c \
  priv/host_generic_simd64.c \
  priv/host_generic_simd128.c \
@@ -164,10 +157,7 @@
  priv/host_s390_isel.c \
  priv/s390_disasm.c \
  priv/host_mips_defs.c \
- priv/host_mips_isel.c \
- priv/host_tilegx_defs.c \
- priv/host_tilegx_isel.c \
- priv/tilegx_disasm.c
+ priv/host_mips_isel.c
 
 LIBVEXMULTIARCH_SOURCES = priv/multiarch_main_main.c
 

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon May  8 18:21:59 2017
@@ -10,7 +10,7 @@
 MIPS32/Linux, MIPS64/Linux, ARM/Android, ARM64/Android,
 MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, X86/MacOSX
 10.10 and AMD64/MacOSX 10.10.  There is also preliminary support for
-X86/MacOSX 10.11/12, AMD64/MacOSX 10.11/12 and TILEGX/Linux.
+X86/MacOSX 10.11/12, and AMD64/MacOSX 10.11/12.
 
 * The 'xtree concept' was added in 3.13:
    An xtree is a tree of stacktraces with data associated to the stacktraces.
@@ -36,6 +36,8 @@
     is handled like CLONE_VFORK (so removing CLONE_VM flag).
     Applications that depends on CLONE_VM exact semantic will (still) not work.
 
+  - TileGX/Linux port was removed because the platform is essientially dead.
+
 * ==================== TOOL CHANGES ====================
 
 * Memcheck:
@@ -169,6 +171,7 @@
         (task_register_dyld_shared_cache_image_info)
 379390  unhandled syscall: mach:70 (host_create_mach_voucher_trap)
 379473  MIPS: add support for rdhwr cycle counter register
+379504  remove TileGX/Linux port
 
 Release 3.12.0 (20 October 2016)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Modified: trunk/cachegrind/cg_arch.c
==============================================================================
--- trunk/cachegrind/cg_arch.c (original)
+++ trunk/cachegrind/cg_arch.c Mon May  8 18:21:59 2017
@@ -477,13 +477,6 @@
    *D1c = (cache_t) {  65536, 2, 64 };
    *LLc = (cache_t) { 262144, 8, 64 };
 
-#elif defined(VGA_tilegx)
-
-   // Set caches to default for Tilegx.
-   *I1c = (cache_t) { 0x8000,  2, 64 };
-   *D1c = (cache_t) { 0x8000,  2, 64 };
-   *LLc = (cache_t) { 0x40000, 8, 64 };
-
 #else
 
 #error "Unknown arch"

Modified: trunk/cachegrind/cg_branchpred.c
==============================================================================
--- trunk/cachegrind/cg_branchpred.c (original)
+++ trunk/cachegrind/cg_branchpred.c Mon May  8 18:21:59 2017
@@ -51,8 +51,6 @@
 #  define N_IADDR_LO_ZERO_BITS 0
 #elif defined(VGA_s390x) || defined(VGA_arm)
 #  define N_IADDR_LO_ZERO_BITS 1
-#elif defined(VGA_tilegx)
-#  define N_IADDR_LO_ZERO_BITS 3
 #else
 #  error "Unsupported architecture"
 #endif

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon May  8 18:21:59 2017
@@ -269,11 +269,6 @@
         ARCH_MAX="mips64"
         ;;
 
-     tilegx)
-        AC_MSG_RESULT([ok (${host_cpu})])
-        ARCH_MAX="tilegx"
-        ;;
-
      *)
  AC_MSG_RESULT([no (${host_cpu})])
  AC_MSG_ERROR([Unsupported host architecture. Sorry])
@@ -722,17 +717,6 @@
         valt_load_address_sec_inner="0xUNSET"
         AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
         ;;
-     tilegx-linux)
-        VGCONF_ARCH_PRI="tilegx"
-        VGCONF_ARCH_SEC=""
-        VGCONF_PLATFORM_PRI_CAPS="TILEGX_LINUX"
-        VGCONF_PLATFORM_SEC_CAPS=""
-        valt_load_address_pri_norml="0x38000000"
-        valt_load_address_pri_inner="0x28000000"
-        valt_load_address_sec_norml="0xUNSET"
-        valt_load_address_sec_inner="0xUNSET"
-        AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
-        ;;
      x86-solaris)
         VGCONF_ARCH_PRI="x86"
         VGCONF_ARCH_SEC=""
@@ -819,8 +803,6 @@
                test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX )
 AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_MIPS64,
                test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX )
-AM_CONDITIONAL(VGCONF_ARCHS_INCLUDE_TILEGX,
-               test x$VGCONF_PLATFORM_PRI_CAPS = xTILEGX_LINUX )
 
 # Set up VGCONF_PLATFORMS_INCLUDE_<platform>.  Either one or two of these
 # become defined.
@@ -848,8 +830,6 @@
                test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX)
 AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_MIPS64_LINUX,
                test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX)
-AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_TILEGX_LINUX,
-               test x$VGCONF_PLATFORM_PRI_CAPS = xTILEGX_LINUX)
 AM_CONDITIONAL(VGCONF_PLATFORMS_INCLUDE_X86_DARWIN,  
                test x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN \
                  -o x$VGCONF_PLATFORM_SEC_CAPS = xX86_DARWIN)
@@ -875,8 +855,7 @@
                  -o x$VGCONF_PLATFORM_PRI_CAPS = xARM64_LINUX \
                  -o x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX \
                  -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \
-                 -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX \
-                 -o x$VGCONF_PLATFORM_PRI_CAPS = xTILEGX_LINUX)
+                 -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX)
 AM_CONDITIONAL(VGCONF_OS_IS_DARWIN,
                test x$VGCONF_PLATFORM_PRI_CAPS = xX86_DARWIN \
                  -o x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_DARWIN)
@@ -4401,7 +4380,6 @@
    none/tests/s390x/Makefile
    none/tests/mips32/Makefile
    none/tests/mips64/Makefile
-   none/tests/tilegx/Makefile
    none/tests/linux/Makefile
    none/tests/darwin/Makefile
    none/tests/solaris/Makefile

Modified: trunk/coregrind/Makefile.am
==============================================================================
--- trunk/coregrind/Makefile.am (original)
+++ trunk/coregrind/Makefile.am Mon May  8 18:21:59 2017
@@ -374,7 +374,6 @@
  m_dispatch/dispatch-s390x-linux.S \
  m_dispatch/dispatch-mips32-linux.S \
  m_dispatch/dispatch-mips64-linux.S \
- m_dispatch/dispatch-tilegx-linux.S \
  m_dispatch/dispatch-x86-darwin.S \
  m_dispatch/dispatch-amd64-darwin.S \
  m_dispatch/dispatch-x86-solaris.S \
@@ -396,7 +395,6 @@
  m_gdbserver/valgrind-low-s390x.c \
  m_gdbserver/valgrind-low-mips32.c \
  m_gdbserver/valgrind-low-mips64.c \
- m_gdbserver/valgrind-low-tilegx.c \
  m_gdbserver/version.c \
  m_initimg/initimg-linux.c \
  m_initimg/initimg-darwin.c \
@@ -421,7 +419,6 @@
  m_sigframe/sigframe-s390x-linux.c \
  m_sigframe/sigframe-mips32-linux.c \
  m_sigframe/sigframe-mips64-linux.c \
- m_sigframe/sigframe-tilegx-linux.c \
  m_sigframe/sigframe-x86-darwin.c \
  m_sigframe/sigframe-amd64-darwin.c \
  m_sigframe/sigframe-solaris.c \
@@ -435,7 +432,6 @@
  m_syswrap/syscall-s390x-linux.S \
  m_syswrap/syscall-mips32-linux.S \
  m_syswrap/syscall-mips64-linux.S \
- m_syswrap/syscall-tilegx-linux.S \
  m_syswrap/syscall-x86-darwin.S \
  m_syswrap/syscall-amd64-darwin.S \
  m_syswrap/syscall-x86-solaris.S \
@@ -455,7 +451,6 @@
  m_syswrap/syswrap-s390x-linux.c \
  m_syswrap/syswrap-mips32-linux.c \
  m_syswrap/syswrap-mips64-linux.c \
- m_syswrap/syswrap-tilegx-linux.c \
  m_syswrap/syswrap-x86-darwin.c \
  m_syswrap/syswrap-amd64-darwin.c \
  m_syswrap/syswrap-xen.c \

Modified: trunk/coregrind/launcher-linux.c
==============================================================================
--- trunk/coregrind/launcher-linux.c (original)
+++ trunk/coregrind/launcher-linux.c Mon May  8 18:21:59 2017
@@ -65,10 +65,6 @@
 #define EM_PPC64 21  // ditto
 #endif
 
-#ifndef EM_TILEGX
-#define EM_TILEGX 191
-#endif
-
 /* Report fatal errors */
 __attribute__((noreturn))
 static void barf ( const char *format, ... )
@@ -263,10 +259,6 @@
                 (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
                  ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
                platform = "mips64-linux";
-            } else if (ehdr->e_machine == EM_TILEGX &&
-                (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
-                 ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
-               platform = "tilegx-linux";
             } else if (ehdr->e_machine == EM_AARCH64 &&
                 (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
                  ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
@@ -372,7 +364,6 @@
        (0==strcmp(VG_PLATFORM,"arm-linux"))    ||
        (0==strcmp(VG_PLATFORM,"arm64-linux"))  ||
        (0==strcmp(VG_PLATFORM,"s390x-linux"))  ||
-       (0==strcmp(VG_PLATFORM,"tilegx-linux")) ||
        (0==strcmp(VG_PLATFORM,"mips32-linux")) ||
        (0==strcmp(VG_PLATFORM,"mips64-linux")))
       default_platform = VG_PLATFORM;

Modified: trunk/coregrind/m_aspacemgr/aspacemgr-common.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-common.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-common.c Mon May  8 18:21:59 2017
@@ -158,8 +158,7 @@
 #  elif defined(VGP_amd64_linux) \
         || defined(VGP_ppc64be_linux)  || defined(VGP_ppc64le_linux) \
         || defined(VGP_s390x_linux) || defined(VGP_mips32_linux) \
-        || defined(VGP_mips64_linux) || defined(VGP_arm64_linux) \
-        || defined(VGP_tilegx_linux)
+        || defined(VGP_mips64_linux) || defined(VGP_arm64_linux)
    res = VG_(do_syscall6)(__NR_mmap, (UWord)start, length,
                          prot, flags, fd, offset);
 #  elif defined(VGP_x86_darwin)
@@ -258,9 +257,6 @@
    /* ARM64 wants to use __NR_openat rather than __NR_open. */
    SysRes res = VG_(do_syscall4)(__NR_openat,
                                  VKI_AT_FDCWD, (UWord)pathname, flags, mode);
-#  elif defined(VGP_tilegx_linux)
-   SysRes res = VG_(do_syscall4)(__NR_openat, VKI_AT_FDCWD, (UWord)pathname,
-                                 flags, mode);
 #  elif defined(VGO_linux) || defined(VGO_darwin)
    SysRes res = VG_(do_syscall3)(__NR_open, (UWord)pathname, flags, mode);
 #  elif defined(VGO_solaris)
@@ -289,9 +285,6 @@
 #  if defined(VGP_arm64_linux)
    res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD,
                                            (UWord)path, (UWord)buf, bufsiz);
-#  elif defined(VGP_tilegx_linux)
-   res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD, (UWord)path,
-                          (UWord)buf, bufsiz);
 #  elif defined(VGO_linux) || defined(VGO_darwin)
    res = VG_(do_syscall3)(__NR_readlink, (UWord)path, (UWord)buf, bufsiz);
 #  elif defined(VGO_solaris)

Modified: trunk/coregrind/m_cache.c
==============================================================================
--- trunk/coregrind/m_cache.c (original)
+++ trunk/coregrind/m_cache.c Mon May  8 18:21:59 2017
@@ -540,8 +540,7 @@
 
 #elif defined(VGA_arm) || defined(VGA_ppc32)    || \
    defined(VGA_ppc64be) || defined(VGA_ppc64le) || \
-   defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_arm64) || \
-   defined(VGA_tilegx)
+   defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_arm64)
 static Bool
 get_cache_info(VexArchInfo *vai)
 {

Modified: trunk/coregrind/m_coredump/coredump-elf.c
==============================================================================
--- trunk/coregrind/m_coredump/coredump-elf.c (original)
+++ trunk/coregrind/m_coredump/coredump-elf.c Mon May  8 18:21:59 2017
@@ -416,17 +416,6 @@
    regs[VKI_MIPS64_EF_HI]         = arch->vex.guest_HI;
    regs[VKI_MIPS64_EF_CP0_STATUS] = arch->vex.guest_CP0_status;
    regs[VKI_MIPS64_EF_CP0_EPC]    = arch->vex.guest_PC;
-#elif defined(VGP_tilegx_linux)
-#  define DO(n)  regs->regs[n] = arch->vex.guest_r##n
-   DO(0);  DO(1);  DO(2);  DO(3);  DO(4);  DO(5);  DO(6);  DO(7);
-   DO(8);  DO(9);  DO(10); DO(11); DO(12); DO(13); DO(14); DO(15);
-   DO(16); DO(17); DO(18); DO(19); DO(20); DO(21); DO(22); DO(23);
-   DO(24); DO(25); DO(26); DO(27); DO(28); DO(29); DO(30); DO(31);
-   DO(32); DO(33); DO(34); DO(35); DO(36); DO(37); DO(38); DO(39);
-   DO(40); DO(41); DO(42); DO(43); DO(44); DO(45); DO(46); DO(47);
-   DO(48); DO(49); DO(50); DO(51); DO(52); DO(53); DO(54); DO(55);
-   regs->pc = arch->vex.guest_pc;
-   regs->orig_r0 =  arch->vex.guest_r0;
 #else
 #  error Unknown ELF platform
 #endif
@@ -499,7 +488,7 @@
    DO(24); DO(25); DO(26); DO(27); DO(28); DO(29); DO(30); DO(31);
 #  undef DO
 
-#elif defined(VGP_arm_linux) || defined(VGP_tilegx_linux)
+#elif defined(VGP_arm_linux)
    // umm ...
 
 #elif defined(VGP_arm64_linux)

Modified: trunk/coregrind/m_debuginfo/d3basics.c
==============================================================================
--- trunk/coregrind/m_debuginfo/d3basics.c (original)
+++ trunk/coregrind/m_debuginfo/d3basics.c Mon May  8 18:21:59 2017
@@ -426,9 +426,6 @@
    if (regno == 30) { *a = regs->fp; return True; }
 #  elif defined(VGP_arm64_linux)
    if (regno == 31) { *a = regs->sp; return True; }
-#  elif defined(VGP_tilegx_linux)
-   if (regno == 52) { *a = regs->fp; return True; }
-   if (regno == 54) { *a = regs->sp; return True; }
 #  else
 #    error "Unknown platform"
 #  endif

Modified: trunk/coregrind/m_debuginfo/debuginfo.c
==============================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c (original)
+++ trunk/coregrind/m_debuginfo/debuginfo.c Mon May  8 18:21:59 2017
@@ -953,9 +953,6 @@
 #  elif defined(VGP_s390x_linux)
    is_rx_map = seg->hasR && seg->hasX && !seg->hasW;
    is_rw_map = seg->hasR && seg->hasW;
-#  elif defined(VGA_tilegx)
-   is_rx_map = seg->hasR && seg->hasX; // && !seg->hasW;
-   is_rw_map = seg->hasR && seg->hasW; // && !seg->hasX;
 #  else
 #    error "Unknown platform"
 #  endif
@@ -2543,11 +2540,6 @@
                || defined(VGA_ppc64le)
 #           elif defined(VGP_arm64_linux)
             case Creg_ARM64_X30: return eec->uregs->x30;
-#           elif defined(VGA_tilegx)
-            case Creg_TILEGX_IP: return eec->uregs->pc;
-            case Creg_TILEGX_SP: return eec->uregs->sp;
-            case Creg_TILEGX_BP: return eec->uregs->fp;
-            case Creg_TILEGX_LR: return eec->uregs->lr;
 #           else
 #             error "Unsupported arch"
 #           endif
@@ -2800,16 +2792,6 @@
       case CFIC_ARM64_X29REL:
          cfa = cfsi_m->cfa_off + uregs->x29;
          break;
-#     elif defined(VGA_tilegx)
-      case CFIC_IA_SPREL:
-         cfa = cfsi_m->cfa_off + uregs->sp;
-         break;
-      case CFIR_SAME:
-         cfa = uregs->fp;
-         break;
-      case CFIC_IA_BPREL:
-         cfa = cfsi_m->cfa_off + uregs->fp;
-         break;
 #     else
 #       error "Unsupported arch"
 #     endif
@@ -2864,7 +2846,7 @@
      return compute_cfa(&uregs,
                         min_accessible,  max_accessible, ce->di, ce->cfsi_m);
    }
-#elif defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_tilegx)
+#elif defined(VGA_mips32) || defined(VGA_mips64)
    { D3UnwindRegs uregs;
      uregs.pc = ip;
      uregs.sp = sp;
@@ -2944,8 +2926,6 @@
 #  elif defined(VGA_ppc32) || defined(VGA_ppc64be) || defined(VGA_ppc64le)
 #  elif defined(VGP_arm64_linux)
    ipHere = uregsHere->pc;
-#  elif defined(VGA_tilegx)
-   ipHere = uregsHere->pc;
 #  else
 #    error "Unknown arch"
 #  endif
@@ -3031,10 +3011,6 @@
    COMPUTE(uregsPrev.sp,  uregsHere->sp,  cfsi_m->sp_how,  cfsi_m->sp_off);
    COMPUTE(uregsPrev.x30, uregsHere->x30, cfsi_m->x30_how, cfsi_m->x30_off);
    COMPUTE(uregsPrev.x29, uregsHere->x29, cfsi_m->x29_how, cfsi_m->x29_off);
-#  elif defined(VGA_tilegx)
-   COMPUTE(uregsPrev.pc, uregsHere->pc, cfsi_m->ra_how, cfsi_m->ra_off);
-   COMPUTE(uregsPrev.sp, uregsHere->sp, cfsi_m->sp_how, cfsi_m->sp_off);
-   COMPUTE(uregsPrev.fp, uregsHere->fp, cfsi_m->fp_how, cfsi_m->fp_off);
 #  else
 #    error "Unknown arch"
 #  endif

Modified: trunk/coregrind/m_debuginfo/priv_storage.h
==============================================================================
--- trunk/coregrind/m_debuginfo/priv_storage.h (original)
+++ trunk/coregrind/m_debuginfo/priv_storage.h Mon May  8 18:21:59 2017
@@ -337,19 +337,6 @@
       Int   fp_off;
    }
    DiCfSI_m;
-#elif defined(VGA_tilegx)
-typedef
-   struct {
-      UChar cfa_how; /* a CFIC_IA value */
-      UChar ra_how;  /* a CFIR_ value */
-      UChar sp_how;  /* a CFIR_ value */
-      UChar fp_how;  /* a CFIR_ value */
-      Int   cfa_off;
-      Int   ra_off;
-      Int   sp_off;
-      Int   fp_off;
-   }
-   DiCfSI_m;
 #else
 #  error "Unknown arch"
 #endif
@@ -403,11 +390,7 @@
       Creg_S390_SP,
       Creg_S390_FP,
       Creg_S390_LR,
-      Creg_MIPS_RA,
-      Creg_TILEGX_IP,
-      Creg_TILEGX_SP,
-      Creg_TILEGX_BP,
-      Creg_TILEGX_LR
+      Creg_MIPS_RA
    }
    CfiReg;
 

Modified: trunk/coregrind/m_debuginfo/readdwarf.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readdwarf.c (original)
+++ trunk/coregrind/m_debuginfo/readdwarf.c Mon May  8 18:21:59 2017
@@ -1732,10 +1732,6 @@
 #  define FP_REG         30
 #  define SP_REG         29
 #  define RA_REG_DEFAULT 31
-#elif defined(VGP_tilegx_linux)
-#  define FP_REG         52
-#  define SP_REG         54
-#  define RA_REG_DEFAULT 55
 #else
 #  error "Unknown platform"
 #endif
@@ -1748,7 +1744,7 @@
      || defined(VGP_ppc64le_linux) || defined(VGP_mips32_linux) \
      || defined(VGP_mips64_linux)
 # define N_CFI_REGS 72
-#elif defined(VGP_arm_linux) || defined(VGP_tilegx_linux)
+#elif defined(VGP_arm_linux)
 # define N_CFI_REGS 320
 #elif defined(VGP_arm64_linux)
 # define N_CFI_REGS 128
@@ -2058,8 +2054,7 @@
    if (ctxs->cfa_is_regoff && ctxs->cfa_reg == SP_REG) {
       si_m->cfa_off = ctxs->cfa_off;
 #     if defined(VGA_x86) || defined(VGA_amd64) || defined(VGA_s390x) \
-         || defined(VGA_mips32) || defined(VGA_mips64) \
-         || defined(VGA_tilegx)
+         || defined(VGA_mips32) || defined(VGA_mips64)
       si_m->cfa_how = CFIC_IA_SPREL;
 #     elif defined(VGA_arm)
       si_m->cfa_how = CFIC_ARM_R13REL;
@@ -2073,8 +2068,7 @@
    if (ctxs->cfa_is_regoff && ctxs->cfa_reg == FP_REG) {
       si_m->cfa_off = ctxs->cfa_off;
 #     if defined(VGA_x86) || defined(VGA_amd64) || defined(VGA_s390x) \
-         || defined(VGA_mips32) || defined(VGA_mips64) \
-         || defined(VGA_tilegx)
+         || defined(VGA_mips32) || defined(VGA_mips64)
       si_m->cfa_how = CFIC_IA_BPREL;
 #     elif defined(VGA_arm)
       si_m->cfa_how = CFIC_ARM_R12REL;
@@ -2363,48 +2357,6 @@
    *len  = (UInt)(ctx->loc - loc_start);
 
    return True;
-#  elif defined(VGA_tilegx)
-
-   /* --- entire tail of this fn specialised for tilegx --- */
-
-   SUMMARISE_HOW(si_m->ra_how, si_m->ra_off,
-                               ctxs->reg[ctx->ra_reg] );
-   SUMMARISE_HOW(si_m->fp_how, si_m->fp_off,
-                               ctxs->reg[FP_REG] );
-   SUMMARISE_HOW(si_m->sp_how, si_m->sp_off,
-                               ctxs->reg[SP_REG] );
-   si_m->sp_how = CFIR_CFAREL;
-   si_m->sp_off = 0;
-
-   if (si_m->fp_how == CFIR_UNKNOWN)
-       si_m->fp_how = CFIR_SAME;
-   if (si_m->cfa_how == CFIR_UNKNOWN) {
-      si_m->cfa_how = CFIC_IA_SPREL;
-      si_m->cfa_off = 160;
-   }
-   if (si_m->ra_how == CFIR_UNKNOWN) {
-      if (!debuginfo->cfsi_exprs)
-         debuginfo->cfsi_exprs = VG_(newXA)( ML_(dinfo_zalloc),
-                                             "di.ccCt.2a",
-                                             ML_(dinfo_free),
-                                             sizeof(CfiExpr) );
-      si_m->ra_how = CFIR_EXPR;
-      si_m->ra_off = ML_(CfiExpr_CfiReg)( debuginfo->cfsi_exprs,
-                                          Creg_TILEGX_LR);
-   }
-
-   if (si_m->ra_how == CFIR_SAME)
-      { why = 3; goto failed; }
-
-   if (loc_start >= ctx->loc)
-      { why = 4; goto failed; }
-   if (ctx->loc - loc_start > 10000000 /* let's say */)
-      { why = 5; goto failed; }
-
-   *base = loc_start + ctx->initloc;
-   *len  = (UInt)(ctx->loc - loc_start);
-
-   return True;
 #  elif defined(VGA_ppc32) || defined(VGA_ppc64be) || defined(VGA_ppc64le)
    /* These don't use CFI based unwinding (is that really true?) */
 
@@ -2501,13 +2453,6 @@
          I_die_here;
 #        elif defined(VGA_ppc32) || defined(VGA_ppc64be) \
             || defined(VGA_ppc64le)
-#        elif defined(VGA_tilegx)
-         if (dwreg == SP_REG)
-            return ML_(CfiExpr_CfiReg)( dstxa, Creg_TILEGX_SP );
-         if (dwreg == FP_REG)
-            return ML_(CfiExpr_CfiReg)( dstxa, Creg_TILEGX_BP );
-         if (dwreg == srcuc->ra_reg)
-            return ML_(CfiExpr_CfiReg)( dstxa, Creg_TILEGX_IP );
 #        else
 #           error "Unknown arch"
 #        endif

Modified: trunk/coregrind/m_debuginfo/readelf.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readelf.c (original)
+++ trunk/coregrind/m_debuginfo/readelf.c Mon May  8 18:21:59 2017
@@ -2278,7 +2278,7 @@
 #     if defined(VGP_x86_linux) || defined(VGP_amd64_linux) \
          || defined(VGP_arm_linux) || defined (VGP_s390x_linux) \
          || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \
-         || defined(VGP_arm64_linux) || defined(VGP_tilegx_linux) \
+         || defined(VGP_arm64_linux) \
          || defined(VGP_x86_solaris) || defined(VGP_amd64_solaris)
       /* Accept .plt where mapped as rx (code) */
       if (0 == VG_(strcmp)(name, ".plt")) {

Modified: trunk/coregrind/m_debuginfo/storage.c
==============================================================================
--- trunk/coregrind/m_debuginfo/storage.c (original)
+++ trunk/coregrind/m_debuginfo/storage.c Mon May  8 18:21:59 2017
@@ -216,11 +216,6 @@
    SHOW_HOW(si_m->x30_how, si_m->x30_off);
    VG_(printf)(" X29=");
    SHOW_HOW(si_m->x29_how, si_m->x29_off);
-#  elif defined(VGA_tilegx)
-   VG_(printf)(" SP=");
-   SHOW_HOW(si_m->sp_how, si_m->sp_off);
-   VG_(printf)(" FP=");
-   SHOW_HOW(si_m->fp_how, si_m->fp_off);
 #  else
 #    error "Unknown arch"
 #  endif
@@ -950,10 +945,6 @@
       case Creg_S390_SP:   VG_(printf)("SP"); break;
       case Creg_S390_FP:   VG_(printf)("FP"); break;
       case Creg_S390_LR:   VG_(printf)("LR"); break;
-      case Creg_TILEGX_IP: VG_(printf)("PC");  break;
-      case Creg_TILEGX_SP: VG_(printf)("SP");  break;
-      case Creg_TILEGX_BP: VG_(printf)("BP");  break;
-      case Creg_TILEGX_LR: VG_(printf)("R55"); break;
       default: vg_assert(0);
    }
 }

Modified: trunk/coregrind/m_debuglog.c
==============================================================================
--- trunk/coregrind/m_debuglog.c (original)
+++ trunk/coregrind/m_debuglog.c Mon May  8 18:21:59 2017
@@ -512,53 +512,6 @@
    return (UInt)(__res);
 }
 
-#elif defined(VGP_tilegx_linux)
-
-static UInt local_sys_write_stderr ( const HChar* buf, Int n )
-{
-   volatile Long block[2];
-   block[0] = (Long)buf;
-   block[1] = n;
-   Long __res = 0;
-   __asm__ volatile (
-      "movei  r0,  2    \n\t"    /* stderr */
-      "move   r1,  %1   \n\t"    /* buf */
-      "move   r2,  %2   \n\t"    /* n */
-      "move   r3,  zero \n\t"
-      "moveli r10, %3   \n\t"    /* set r10 = __NR_write */
-      "swint1           \n\t"    /* write() */
-      "nop              \n\t"
-      "move   %0, r0    \n\t"    /* save return into block[0] */
-      : "=r"(__res)
-      : "r" (block[0]), "r"(block[1]), "n" (__NR_write)
-      : "r0", "r1", "r2", "r3", "r4", "r5");
-   if (__res < 0)
-      __res = -1;
-   return (UInt)__res;
-}
-
-static UInt local_sys_getpid ( void )
-{
-   UInt __res, __err;
-   __res = 0;
-   __err = 0;
-   __asm__ volatile (
-      "moveli r10, %2\n\t"    /* set r10 = __NR_getpid */
-      "swint1\n\t"            /* getpid() */
-      "nop\n\t"
-      "move  %0, r0\n"
-      "move  %1, r1\n"
-      : "=r" (__res), "=r"(__err)
-      : "n" (__NR_getpid)
-      : "r0", "r1", "r2", "r3", "r4",
-        "r5", "r6", "r7", "r8", "r9",
-        "r10", "r11", "r12", "r13", "r14",
-        "r15", "r16", "r17", "r18", "r19",
-        "r20", "r21", "r22", "r23", "r24",
-        "r25", "r26", "r27", "r28", "r29");
-  return __res;
-}
-
 #elif defined(VGP_x86_solaris)
 static UInt local_sys_write_stderr ( const HChar* buf, Int n )
 {

Removed: trunk/coregrind/m_dispatch/dispatch-tilegx-linux.S
==============================================================================
--- trunk/coregrind/m_dispatch/dispatch-tilegx-linux.S (original)
+++ trunk/coregrind/m_dispatch/dispatch-tilegx-linux.S (removed)
@@ -1,309 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- begin                                dispatch-tilegx-linux.S ---*/
-/*--------------------------------------------------------------------*/
-
-/*
-  This file is part of Valgrind, a dynamic binary instrumentation
-  framework.
-
-  Copyright (C) 2010-2017  Tilera Corp.
-
-  This program 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 2 of the
-  License, or (at your option) any later version.
-
-  This program 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.
-
-  You should have received a copy of the GNU General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-  02111-1307, USA.
-
-  The GNU General Public License is contained in the file COPYING.
-*/
-
-/* Contributed by Zhi-Gang Liu <zliu at tilera dot com> */
-
-#include "pub_core_basics_asm.h"
-
-#if defined(VGP_tilegx_linux)
-#include "pub_core_dispatch_asm.h"
-#include "pub_core_transtab_asm.h"
-#include "libvex_guest_offsets.h"       /* for OFFSET_tilegx_PC */
-
-        /*------------------------------------------------------------*/
-        /*---                                                      ---*/
-        /*--- The dispatch loop.  VG_(run_innerloop) is used to    ---*/
-        /*--- run all translations except no-redir ones.           ---*/
-        /*---                                                      ---*/
-        /*------------------------------------------------------------*/
-
-        /*----------------------------------------------------*/
-        /*--- Preamble (set everything up)                 ---*/
-        /*----------------------------------------------------*/
-
-        /* signature:
-        void VG_(disp_run_translations)(UWord* two_words,
-        void*  guest_state,
-        Addr   host_addr );
-        UWord VG_(run_innerloop) ( void* guest_state, UWord do_profiling );
-        */
-
-        .text
-        .globl  VG_(disp_run_translations)
-        VG_(disp_run_translations):
-
-        /* r0 holds two_words
-           r1 holds guest_state
-           r2 holds host_addr */
-
-        /* New stack frame */
-        addli sp, sp, -256
-        addi  r29, sp, 8
-        /*
-        high memory of stack
-        216  lr
-        208  r53
-        200  r52
-        192  r51
-        ...
-        48   r33
-        40   r32
-        32   r31
-        24   r30
-        16   r1 <---
-        8    r0
-        0       <-sp
-        */
-        st_add r29, r0, 8
-        st_add r29, r1, 8
-
-        /* ... and r30 - r53 */
-        st_add  r29, r30, 8
-        st_add  r29, r31, 8
-        st_add  r29, r32, 8
-        st_add  r29, r33, 8
-        st_add  r29, r34, 8
-        st_add  r29, r35, 8
-        st_add  r29, r36, 8
-        st_add  r29, r37, 8
-        st_add  r29, r38, 8
-        st_add  r29, r39, 8
-        st_add  r29, r40, 8
-        st_add  r29, r41, 8
-        st_add  r29, r42, 8
-        st_add  r29, r43, 8
-        st_add  r29, r44, 8
-        st_add  r29, r45, 8
-        st_add  r29, r46, 8
-        st_add  r29, r47, 8
-        st_add  r29, r48, 8
-        st_add  r29, r49, 8
-        st_add  r29, r50, 8
-        st_add  r29, r51, 8
-        st_add  r29, r52, 8
-        st_add  r29, r53, 8
-        st      r29, lr
-
-        /* Load the address of guest state into guest state register r50. */
-        move r50, r1
-
-        //j postamble
-
-        /* jump to the code cache. */
-        jr  r2
-        /*NOTREACHED*/
-
-
-       /*----------------------------------------------------*/
-       /*--- Postamble and exit.                          ---*/
-       /*----------------------------------------------------*/
-
-postamble:
-        /* At this point, r12 and r13 contain two
-        words to be returned to the caller.  r12
-        holds a TRC value, and r13 optionally may
-        hold another word (for CHAIN_ME exits, the
-        address of the place to patch.) */
-
-        /* run_innerloop_exit_REALLY:
-        r50 holds VG_TRC_* value to return
-        Return to parent stack
-        addli  sp, sp, 256 */
-
-        addi r29, sp, 8
-
-        /* Restore r0 from stack; holding address of twp words */
-        ld_add  r0, r29, 16
-        /* store r12 in two_words[0] */
-        st_add  r0, r12, 8
-        /* store r13 in two_words[1] */
-        st  r0, r13
-
-        /* Restore callee-saved registers... */
-        ld_add  r30, r29, 8
-        ld_add  r31, r29, 8
-        ld_add  r32, r29, 8
-        ld_add  r33, r29, 8
-        ld_add  r34, r29, 8
-        ld_add  r35, r29, 8
-        ld_add  r36, r29, 8
-        ld_add  r37, r29, 8
-        ld_add  r38, r29, 8
-        ld_add  r39, r29, 8
-        ld_add  r40, r29, 8
-        ld_add  r41, r29, 8
-        ld_add  r42, r29, 8
-        ld_add  r43, r29, 8
-        ld_add  r44, r29, 8
-        ld_add  r45, r29, 8
-        ld_add  r46, r29, 8
-        ld_add  r47, r29, 8
-        ld_add  r48, r29, 8
-        ld_add  r49, r29, 8
-        ld_add  r50, r29, 8
-        ld_add  r51, r29, 8
-        ld_add  r52, r29, 8
-        ld_add  r53, r29, 8
-        ld      lr, r29
-        addli   sp, sp, 256   /* stack_size */
-        jr      lr
-        nop
-
-
-       /*----------------------------------------------------*/
-       /*---           Continuation points                ---*/
-       /*----------------------------------------------------*/
-
-       /* ------ Chain me to slow entry point ------ */
-       .global VG_(disp_cp_chain_me_to_slowEP)
-       VG_(disp_cp_chain_me_to_slowEP):
-        /* We got called.  The return address indicates
-        where the patching needs to happen.  Collect
-        the return address and, exit back to C land,
-        handing the caller the pair (Chain_me_S, RA) */
-        # if (VG_TRC_CHAIN_ME_TO_SLOW_EP > 128)
-        # error ("VG_TRC_CHAIN_ME_TO_SLOW_EP is > 128");
-        # endif
-        moveli r12, VG_TRC_CHAIN_ME_TO_SLOW_EP
-        move   r13, lr
-        /* 32 = mkLoadImm_EXACTLY4
-        8 = jalr r9
-        8 = nop */
-        addi   r13, r13, -40
-        j      postamble
-
-        /* ------ Chain me to slow entry point ------ */
-        .global VG_(disp_cp_chain_me_to_fastEP)
-        VG_(disp_cp_chain_me_to_fastEP):
-        /* We got called.  The return address indicates
-        where the patching needs to happen.  Collect
-        the return address and, exit back to C land,
-        handing the caller the pair (Chain_me_S, RA) */
-        # if (VG_TRC_CHAIN_ME_TO_FAST_EP > 128)
-        # error ("VG_TRC_CHAIN_ME_TO_FAST_EP is > 128");
-        # endif
-        moveli r12, VG_TRC_CHAIN_ME_TO_FAST_EP
-        move   r13, lr
-        /* 32 = mkLoadImm_EXACTLY4
-        8 = jalr r9
-        8 = nop */
-        addi   r13, r13, -40
-        j      postamble
-
-        /* ------ Indirect but boring jump ------ */
-        .global VG_(disp_cp_xindir)
-        VG_(disp_cp_xindir):
-        /* Where are we going? */
-        addli    r11, r50, OFFSET_tilegx_pc
-        ld       r11, r11
-
-        moveli      r7, hw2_last(VG_(stats__n_xindirs_32))
-        shl16insli  r7, r7, hw1(VG_(stats__n_xindirs_32))
-        shl16insli  r7, r7, hw0(VG_(stats__n_xindirs_32))
-        ld4u   r6, r7
-        addi   r6, r6, 1
-        st4    r7, r6
-
-        /* try a fast lookup in the translation cache */
-        /* r14 = VG_TT_FAST_HASH(addr) * sizeof(ULong*)
-        = (t8 >> 3 & VG_TT_FAST_MASK)  << 3 */
-
-        move    r14, r11
-        /* Assume VG_TT_FAST_MASK < 4G */
-        moveli  r12, hw1(VG_TT_FAST_MASK)
-        shl16insli r12, r12, hw0(VG_TT_FAST_MASK)
-        shrui   r14, r14, 3
-        and     r14, r14, r12
-        shli    r14, r14, 4
-        /* Note, each tt_fast hash entry has two pointers i.e. 16 Bytes. */
-
-        /* r13 = (addr of VG_(tt_fast)) + r14 */
-        moveli  r13, hw2_last(VG_(tt_fast))
-        shl16insli   r13, r13, hw1(VG_(tt_fast))
-        shl16insli   r13, r13, hw0(VG_(tt_fast))
-
-        add     r13, r13, r14
-
-        /* r12 = VG_(tt_fast)[hash] :: ULong* */
-        ld_add  r12, r13, 8
-
-        {
-        ld      r25, r13
-        sub     r7, r12, r11
-        }
-
-        bnez     r7, fast_lookup_failed
-
-        /* Run the translation */
-        jr      r25
-
-        .quad   0x0
-
-fast_lookup_failed:
-        /* %PC is up to date */
-        /* back out decrement of the dispatch counter */
-        /* hold dispatch_ctr in t0 (r8) */
-
-        moveli      r7, hw2_last(VG_(stats__n_xindir_misses_32))
-        shl16insli  r7, r7, hw1(VG_(stats__n_xindir_misses_32))
-        shl16insli  r7, r7, hw0(VG_(stats__n_xindir_misses_32))
-        ld4u  r6, r7
-        addi  r6, r6, 1
-        st4   r7, r6
-        moveli  r12, VG_TRC_INNER_FASTMISS
-        movei   r13, 0
-        j       postamble
-
-        /* ------ Assisted jump ------ */
-        .global VG_(disp_cp_xassisted)
-        VG_(disp_cp_xassisted):
-        /* guest-state-pointer contains the TRC. Put the value into the
-        return register */
-        move    r12, r50
-        movei   r13, 0
-        j       postamble
-
-        /* ------ Event check failed ------ */
-        .global VG_(disp_cp_evcheck_fail)
-        VG_(disp_cp_evcheck_fail):
-        moveli  r12, VG_TRC_INNER_COUNTERZERO
-        movei   r13, 0
-        j       postamble
-
-        .size VG_(disp_run_translations), .-VG_(disp_run_translations)
-
-#endif /* defined(VGP_tilegx_linux) */
-
-/* Let the linker know we don't need an executable stack */
-MARK_STACK_NO_EXEC
-
-/*--------------------------------------------------------------------*/
-/*--- end                                                          ---*/
-/*--------------------------------------------------------------------*/
-

Modified: trunk/coregrind/m_gdbserver/target.c
==============================================================================
--- trunk/coregrind/m_gdbserver/target.c (original)
+++ trunk/coregrind/m_gdbserver/target.c Mon May  8 18:21:59 2017
@@ -881,8 +881,6 @@
    mips32_init_architecture(&the_low_target);
 #elif defined(VGA_mips64)
    mips64_init_architecture(&the_low_target);
-#elif defined(VGA_tilegx)
-   tilegx_init_architecture(&the_low_target);
 #else
    #error "architecture missing in target.c valgrind_initialize_target"
 #endif

Removed: trunk/coregrind/m_gdbserver/valgrind-low-tilegx.c
==============================================================================
--- trunk/coregrind/m_gdbserver/valgrind-low-tilegx.c (original)
+++ trunk/coregrind/m_gdbserver/valgrind-low-tilegx.c (removed)
@@ -1,262 +0,0 @@
-/* Low level interface to valgrind, for the remote server for GDB integrated
-   in valgrind.
-   Copyright (C) 2012
-   Free Software Foundation, Inc.
-
-   This file is part of VALGRIND.
-   It has been inspired from a file from gdbserver in gdb 6.6.
-
-   This program 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 2 of the License, or
-   (at your option) any later version.
-
-   This program 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.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA. */
-
-#include "server.h"
-#include "target.h"
-#include "regdef.h"
-#include "regcache.h"
-
-#include "pub_core_aspacemgr.h"
-#include "pub_core_threadstate.h"
-#include "pub_core_transtab.h"
-#include "pub_core_gdbserver.h"
-
-#include "valgrind_low.h"
-
-#include "libvex_guest_tilegx.h"
-#define  REG_ONE(_n)  { "r"#_n, 64 * (_n), 64 }
-#define  REG_ONE_NAME(_n, _name) { _name, 64 * (_n), 64 }
-
-static struct reg regs[] = {
-  REG_ONE(0),
-  REG_ONE(1),
-  REG_ONE(2),
-  REG_ONE(3),
-  REG_ONE(4),
-  REG_ONE(5),
-  REG_ONE(6),
-  REG_ONE(7),
-  REG_ONE(8),
-  REG_ONE(9),
-
-  REG_ONE(10),
-  REG_ONE(11),
-  REG_ONE(12),
-  REG_ONE(13),
-  REG_ONE(14),
-  REG_ONE(15),
-  REG_ONE(16),
-  REG_ONE(17),
-  REG_ONE(18),
-  REG_ONE(19),
-
-  REG_ONE(20),
-  REG_ONE(21),
-  REG_ONE(22),
-  REG_ONE(23),
-  REG_ONE(24),
-  REG_ONE(25),
-  REG_ONE(26),
-  REG_ONE(27),
-  REG_ONE(28),
-  REG_ONE(29),
-
-  REG_ONE(30),
-  REG_ONE(31),
-  REG_ONE(32),
-  REG_ONE(33),
-  REG_ONE(34),
-  REG_ONE(35),
-  REG_ONE(36),
-  REG_ONE(37),
-  REG_ONE(38),
-  REG_ONE(39),
-
-  REG_ONE(40),
-  REG_ONE(41),
-  REG_ONE(42),
-  REG_ONE(43),
-  REG_ONE(44),
-  REG_ONE(45),
-  REG_ONE(46),
-  REG_ONE(47),
-  REG_ONE(48),
-  REG_ONE(49),
-
-  REG_ONE(50),
-  REG_ONE(51),
-  REG_ONE(52),
-  REG_ONE(53),
-
-  REG_ONE_NAME(54, "sp"),
-  REG_ONE_NAME(55, "lr"),
-  REG_ONE(56),
-  REG_ONE(57),
-  REG_ONE(58),
-  REG_ONE(59),
-
-  REG_ONE(60),
-  REG_ONE(61),
-  REG_ONE(62),
-  REG_ONE_NAME(63, "zero"),
-  REG_ONE_NAME(64, "pc"),
-};
-
-#define num_regs (sizeof (regs) / sizeof (regs[0]))
-
-static const char *expedite_regs[] = { "sp", "pc", 0 };
-
-static
-CORE_ADDR get_pc (void)
-{
-  unsigned long pc;
-
-  collect_register_by_name ("pc", &pc);
-
-  dlog(1, "stop pc is %p\n", (void *) pc);
-  return pc;
-}
-
-static
-void set_pc ( CORE_ADDR newpc )
-{
-  Bool mod;
-  supply_register_by_name ("pc", &newpc, &mod);
-  if (mod)
-    dlog(1, "set pc to %p\n", C2v (newpc));
-  else
-    dlog(1, "set pc not changed %p\n", C2v (newpc));
-}
-
-/* store registers in the guest state (gdbserver_to_valgrind)
-   or fetch register from the guest state (valgrind_to_gdbserver). */
-static
-void transfer_register ( ThreadId tid, int abs_regno, void * buf,
-                         transfer_direction dir, int size, Bool *mod )
-{
-  ThreadState* tst = VG_(get_ThreadState)(tid);
-  int set = abs_regno / num_regs;
-  int regno = abs_regno % num_regs;
-  *mod = False;
-
-  VexGuestTILEGXState* tilegx = (VexGuestTILEGXState*) get_arch (set, tst);
-
-  switch (regno) {
-  case 0: VG_(transfer) (&tilegx->guest_r0, buf, dir, size, mod); break;
-  case 1: VG_(transfer) (&tilegx->guest_r1, buf, dir, size, mod); break;
-  case 2: VG_(transfer) (&tilegx->guest_r2, buf, dir, size, mod); break;
-  case 3: VG_(transfer) (&tilegx->guest_r3, buf, dir, size, mod); break;
-  case 4: VG_(transfer) (&tilegx->guest_r4, buf, dir, size, mod); break;
-  case 5: VG_(transfer) (&tilegx->guest_r5, buf, dir, size, mod); break;
-  case 6: VG_(transfer) (&tilegx->guest_r6, buf, dir, size, mod); break;
-  case 7: VG_(transfer) (&tilegx->guest_r7, buf, dir, size, mod); break;
-  case 8: VG_(transfer) (&tilegx->guest_r8, buf, dir, size, mod); break;
-  case 9: VG_(transfer) (&tilegx->guest_r9, buf, dir, size, mod); break;
-  case 10: VG_(transfer) (&tilegx->guest_r10, buf, dir, size, mod); break;
-  case 11: VG_(transfer) (&tilegx->guest_r11, buf, dir, size, mod); break;
-  case 12: VG_(transfer) (&tilegx->guest_r12, buf, dir, size, mod); break;
-  case 13: VG_(transfer) (&tilegx->guest_r13, buf, dir, size, mod); break;
-  case 14: VG_(transfer) (&tilegx->guest_r14, buf, dir, size, mod); break;
-  case 15: VG_(transfer) (&tilegx->guest_r15, buf, dir, size, mod); break;
-  case 16: VG_(transfer) (&tilegx->guest_r16, buf, dir, size, mod); break;
-  case 17: VG_(transfer) (&tilegx->guest_r17, buf, dir, size, mod); break;
-  case 18: VG_(transfer) (&tilegx->guest_r18, buf, dir, size, mod); break;
-  case 19: VG_(transfer) (&tilegx->guest_r19, buf, dir, size, mod); break;
-  case 20: VG_(transfer) (&tilegx->guest_r20, buf, dir, size, mod); break;
-  case 21: VG_(transfer) (&tilegx->guest_r21, buf, dir, size, mod); break;
-  case 22: VG_(transfer) (&tilegx->guest_r22, buf, dir, size, mod); break;
-  case 23: VG_(transfer) (&tilegx->guest_r23, buf, dir, size, mod); break;
-  case 24: VG_(transfer) (&tilegx->guest_r24, buf, dir, size, mod); break;
-  case 25: VG_(transfer) (&tilegx->guest_r25, buf, dir, size, mod); break;
-  case 26: VG_(transfer) (&tilegx->guest_r26, buf, dir, size, mod); break;
-  case 27: VG_(transfer) (&tilegx->guest_r27, buf, dir, size, mod); break;
-  case 28: VG_(transfer) (&tilegx->guest_r28, buf, dir, size, mod); break;
-  case 29: VG_(transfer) (&tilegx->guest_r29, buf, dir, size, mod); break;
-  case 30: VG_(transfer) (&tilegx->guest_r30, buf, dir, size, mod); break;
-  case 31: VG_(transfer) (&tilegx->guest_r31, buf, dir, size, mod); break;
-  case 32: VG_(transfer) (&tilegx->guest_r32, buf, dir, size, mod); break;
-  case 33: VG_(transfer) (&tilegx->guest_r33, buf, dir, size, mod); break;
-  case 34: VG_(transfer) (&tilegx->guest_r34, buf, dir, size, mod); break;
-  case 35: VG_(transfer) (&tilegx->guest_r35, buf, dir, size, mod); break;
-  case 36: VG_(transfer) (&tilegx->guest_r36, buf, dir, size, mod); break;
-  case 37: VG_(transfer) (&tilegx->guest_r37, buf, dir, size, mod); break;
-  case 38: VG_(transfer) (&tilegx->guest_r38, buf, dir, size, mod); break;
-  case 39: VG_(transfer) (&tilegx->guest_r39, buf, dir, size, mod); break;
-  case 40: VG_(transfer) (&tilegx->guest_r40, buf, dir, size, mod); break;
-  case 41: VG_(transfer) (&tilegx->guest_r41, buf, dir, size, mod); break;
-  case 42: VG_(transfer) (&tilegx->guest_r42, buf, dir, size, mod); break;
-  case 43: VG_(transfer) (&tilegx->guest_r43, buf, dir, size, mod); break;
-  case 44: VG_(transfer) (&tilegx->guest_r44, buf, dir, size, mod); break;
-  case 45: VG_(transfer) (&tilegx->guest_r45, buf, dir, size, mod); break;
-  case 46: VG_(transfer) (&tilegx->guest_r46, buf, dir, size, mod); break;
-  case 47: VG_(transfer) (&tilegx->guest_r47, buf, dir, size, mod); break;
-  case 48: VG_(transfer) (&tilegx->guest_r48, buf, dir, size, mod); break;
-  case 49: VG_(transfer) (&tilegx->guest_r49, buf, dir, size, mod); break;
-  case 50: VG_(transfer) (&tilegx->guest_r50, buf, dir, size, mod); break;
-  case 51: VG_(transfer) (&tilegx->guest_r51, buf, dir, size, mod); break;
-  case 52: VG_(transfer) (&tilegx->guest_r52, buf, dir, size, mod); break;
-  case 53: VG_(transfer) (&tilegx->guest_r53, buf, dir, size, mod); break;
-  case 54: VG_(transfer) (&tilegx->guest_r54, buf, dir, size, mod); break;
-  case 55: VG_(transfer) (&tilegx->guest_r55, buf, dir, size, mod); break;
-  case 56: VG_(transfer) (&tilegx->guest_r56, buf, dir, size, mod); break;
-  case 57: VG_(transfer) (&tilegx->guest_r57, buf, dir, size, mod); break;
-  case 58: VG_(transfer) (&tilegx->guest_r58, buf, dir, size, mod); break;
-  case 59: VG_(transfer) (&tilegx->guest_r59, buf, dir, size, mod); break;
-  case 60: VG_(transfer) (&tilegx->guest_r60, buf, dir, size, mod); break;
-  case 61: VG_(transfer) (&tilegx->guest_r61, buf, dir, size, mod); break;
-  case 62: VG_(transfer) (&tilegx->guest_r62, buf, dir, size, mod); break;
-  case 63: VG_(transfer) (&tilegx->guest_r63, buf, dir, size, mod); break;
-  case 64: VG_(transfer) (&tilegx->guest_pc,  buf, dir, size, mod); break;
-
-  default: VG_(printf)("regno: %d\n", regno); vg_assert(0);
-  }
-}
-
-static
-const char* target_xml ( Bool shadow_mode )
-{
-  return NULL;
-#if 0
-  if (shadow_mode)
-    return "tilegx-linux-valgrind.xml";
-  else
-    return "tilegx-linux.xml";
-#endif
-}
-
-static CORE_ADDR** target_get_dtv (ThreadState *tst)
-{
-  VexGuestTILEGXState* tilegx = (VexGuestTILEGXState*)&tst->arch.vex;
-  // tilegx dtv location similar to mips
-  return (CORE_ADDR**)((CORE_ADDR)tilegx->guest_r53
-                        - 0x7000 - sizeof(CORE_ADDR));
-}
-
-static struct valgrind_target_ops low_target = {
-  num_regs,
-  regs,
-  54, //sp = r54, which is register offset 54 in regs
-  transfer_register,
-  get_pc,
-  set_pc,
-  "tilegx",
-  target_xml,
-  target_get_dtv
-};
-
-void tilegx_init_architecture ( struct valgrind_target_ops *target )
-{
-  *target = low_target;
-  set_register_cache (regs, num_regs);
-  gdbserver_expedite_regs = expedite_regs;
-}

Modified: trunk/coregrind/m_gdbserver/valgrind_low.h
==============================================================================
--- trunk/coregrind/m_gdbserver/valgrind_low.h (original)
+++ trunk/coregrind/m_gdbserver/valgrind_low.h Mon May  8 18:21:59 2017
@@ -107,6 +107,5 @@
 extern void s390x_init_architecture (struct valgrind_target_ops *target);
 extern void mips32_init_architecture (struct valgrind_target_ops *target);
 extern void mips64_init_architecture (struct valgrind_target_ops *target);
-extern void tilegx_init_architecture (struct valgrind_target_ops *target);
 
 #endif

Modified: trunk/coregrind/m_initimg/initimg-linux.c
==============================================================================
--- trunk/coregrind/m_initimg/initimg-linux.c (original)
+++ trunk/coregrind/m_initimg/initimg-linux.c Mon May  8 18:21:59 2017
@@ -1199,20 +1199,6 @@
    arch->vex.guest_PC = iifii.initial_client_IP;
    arch->vex.guest_r31 = iifii.initial_client_SP;
 
-#  elif defined(VGP_tilegx_linux)
-   vg_assert(0 == sizeof(VexGuestTILEGXState) % LibVEX_GUEST_STATE_ALIGN);
-
-   /* Zero out the initial state. */
-   LibVEX_GuestTILEGX_initialise(&arch->vex);
-
-   /* Zero out the shadow areas. */
-   VG_(memset)(&arch->vex_shadow1, 0, sizeof(VexGuestTILEGXState));
-   VG_(memset)(&arch->vex_shadow2, 0, sizeof(VexGuestTILEGXState));
-
-   /* Put essential stuff into the new state. */
-   arch->vex.guest_r54 = iifii.initial_client_SP;
-   arch->vex.guest_pc  = iifii.initial_client_IP;
-
 #  else
 #    error Unknown platform
 #  endif

Modified: trunk/coregrind/m_libcassert.c
==============================================================================
--- trunk/coregrind/m_libcassert.c (original)
+++ trunk/coregrind/m_libcassert.c Mon May  8 18:21:59 2017
@@ -226,29 +226,6 @@
         (srP)->misc.MIPS64.r31 = (ULong)ra;               \
         (srP)->misc.MIPS64.r28 = (ULong)gp;               \
       }
-#elif defined(VGP_tilegx_linux)
-#  define GET_STARTREGS(srP)                              \
-      { ULong pc, sp, fp, ra;                              \
-        __asm__ __volatile__(                             \
-          "move r8, lr \n"                                \
-          "jal 0f \n"                                     \
-          "0:\n"                                          \
-          "move %0, lr \n"                                \
-          "move lr, r8 \n"      /* put old lr back*/      \
-          "move %1, sp \n"                                \
-          "move %2, r52 \n"                               \
-          "move %3, lr \n"                                \
-          : "=r" (pc),                                    \
-            "=r" (sp),                                    \
-            "=r" (fp),                                    \
-            "=r" (ra)                                     \
-          : /* reads none */                              \
-          : "%r8" /* trashed */ );                        \
-        (srP)->r_pc = (ULong)pc - 8;                      \
-        (srP)->r_sp = (ULong)sp;                          \
-        (srP)->misc.TILEGX.r52 = (ULong)fp;               \
-        (srP)->misc.TILEGX.r55 = (ULong)ra;               \
-      }
 #else
 #  error Unknown platform
 #endif

Modified: trunk/coregrind/m_libcfile.c
==============================================================================
--- trunk/coregrind/m_libcfile.c (original)
+++ trunk/coregrind/m_libcfile.c Mon May  8 18:21:59 2017
@@ -138,7 +138,7 @@
 
 SysRes VG_(mknod) ( const HChar* pathname, Int mode, UWord dev )
 {
-#  if defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#  if defined(VGP_arm64_linux)
    /* ARM64 wants to use __NR_mknodat rather than __NR_mknod. */
    SysRes res = VG_(do_syscall4)(__NR_mknodat,
                                  VKI_AT_FDCWD, (UWord)pathname, mode, dev);
@@ -156,7 +156,7 @@
 
 SysRes VG_(open) ( const HChar* pathname, Int flags, Int mode )
 {
-#  if defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#  if defined(VGP_arm64_linux)
    /* ARM64 wants to use __NR_openat rather than __NR_open. */
    SysRes res = VG_(do_syscall4)(__NR_openat,
                                  VKI_AT_FDCWD, (UWord)pathname, flags, mode);
@@ -250,7 +250,7 @@
    } else {
       return -1;
    }
-#  elif defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#  elif defined(VGP_arm64_linux)
    SysRes res = VG_(do_syscall2)(__NR_pipe2, (UWord)fd, 0);
    return sr_isError(res) ? -1 : 0;
 #  elif defined(VGO_linux)
@@ -360,7 +360,7 @@
 #  endif /* defined(__NR_stat64) */
    /* This is the fallback ("vanilla version"). */
    { struct vki_stat buf;
-#    if defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#    if defined(VGP_arm64_linux)
      res = VG_(do_syscall3)(__NR3264_fstatat, VKI_AT_FDCWD,
                                               (UWord)file_name, (UWord)&buf);
 #    else
@@ -515,8 +515,7 @@
 
 Int VG_(rename) ( const HChar* old_name, const HChar* new_name )
 {
-#  if defined(VGO_solaris) \
-      || defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#  if defined(VGO_solaris) || defined(VGP_arm64_linux)
    SysRes res = VG_(do_syscall4)(__NR_renameat, VKI_AT_FDCWD, (UWord)old_name,
                                  VKI_AT_FDCWD, (UWord)new_name);
 #  elif defined(VGO_linux) || defined(VGO_darwin)
@@ -529,7 +528,7 @@
 
 Int VG_(unlink) ( const HChar* file_name )
 {
-#  if defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#  if defined(VGP_arm64_linux)
    SysRes res = VG_(do_syscall2)(__NR_unlinkat, VKI_AT_FDCWD,
                                                 (UWord)file_name);
 #  elif defined(VGO_linux) || defined(VGO_darwin)
@@ -604,7 +603,7 @@
 SysRes VG_(poll) (struct vki_pollfd *fds, Int nfds, Int timeout)
 {
    SysRes res;
-#  if defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#  if defined(VGP_arm64_linux)
    /* ARM64 wants to use __NR_ppoll rather than __NR_poll. */
    struct vki_timespec timeout_ts;
    if (timeout >= 0) {
@@ -647,7 +646,7 @@
 {
    SysRes res;
    /* res = readlink( path, buf, bufsiz ); */
-#  if defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#  if defined(VGP_arm64_linux)
    res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD,
                                            (UWord)path, (UWord)buf, bufsiz);
 #  elif defined(VGO_linux) || defined(VGO_darwin)
@@ -726,7 +725,7 @@
    UWord w = (irusr ? VKI_R_OK : 0)
              | (iwusr ? VKI_W_OK : 0)
              | (ixusr ? VKI_X_OK : 0);
-#  if defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#  if defined(VGP_arm64_linux)
    SysRes res = VG_(do_syscall3)(__NR_faccessat, VKI_AT_FDCWD, (UWord)path, w);
 #  elif defined(VGO_linux) || defined(VGO_darwin)
    SysRes res = VG_(do_syscall2)(__NR_access, (UWord)path, w);
@@ -870,8 +869,7 @@
    return res;
 #  elif defined(VGP_amd64_linux) || defined(VGP_s390x_linux) \
       || defined(VGP_ppc64be_linux)  || defined(VGP_ppc64le_linux) \
-      || defined(VGP_mips64_linux) \
-  || defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+      || defined(VGP_mips64_linux) || defined(VGP_arm64_linux)
    res = VG_(do_syscall4)(__NR_pread64, fd, (UWord)buf, count, offset);
    return res;
 #  elif defined(VGP_amd64_darwin)
@@ -1126,7 +1124,7 @@
 
 #  elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
         || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \
-        || defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+        || defined(VGP_arm64_linux)
    SysRes res;
    res = VG_(do_syscall3)(__NR_socket, domain, type, protocol );
    return sr_isError(res) ? -1 : sr_Res(res);
@@ -1181,7 +1179,7 @@
 
 #  elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
         || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \
-        || defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+        || defined(VGP_arm64_linux)
    SysRes res;
    res = VG_(do_syscall3)(__NR_connect, sockfd, (UWord)serv_addr, addrlen);
    return sr_isError(res) ? -1 : sr_Res(res);
@@ -1228,7 +1226,7 @@
 
 #  elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
         || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \
-        || defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+        || defined(VGP_arm64_linux)
    SysRes res;
    res = VG_(do_syscall6)(__NR_sendto, sd, (UWord)msg,
                                        count, VKI_MSG_NOSIGNAL, 0,0);
@@ -1264,8 +1262,7 @@
    return sr_isError(res) ? -1 : sr_Res(res);
 
 #  elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
-        || defined(VGP_mips64_linux) || defined(VGP_arm64_linux) \
-        || defined(VGP_tilegx_linux)
+        || defined(VGP_mips64_linux) || defined(VGP_arm64_linux)
    SysRes res;
    res = VG_(do_syscall3)( __NR_getsockname,
                            (UWord)sd, (UWord)name, (UWord)namelen );
@@ -1303,8 +1300,7 @@
    return sr_isError(res) ? -1 : sr_Res(res);
 
 #  elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
-        || defined(VGP_mips64_linux) || defined(VGP_arm64_linux) \
-        || defined(VGP_tilegx_linux)
+        || defined(VGP_mips64_linux) || defined(VGP_arm64_linux)
    SysRes res;
    res = VG_(do_syscall3)( __NR_getpeername,
                            (UWord)sd, (UWord)name, (UWord)namelen );
@@ -1345,7 +1341,7 @@
 
 #  elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
         || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \
-        || defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+        || defined(VGP_arm64_linux)
    SysRes res;
    res = VG_(do_syscall5)( __NR_getsockopt,
                            (UWord)sd, (UWord)level, (UWord)optname,
@@ -1389,7 +1385,7 @@
 
 #  elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
         || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \
-        || defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+        || defined(VGP_arm64_linux)
    SysRes res;
    res = VG_(do_syscall5)( __NR_setsockopt,
                            (UWord)sd, (UWord)level, (UWord)optname,

Modified: trunk/coregrind/m_libcproc.c
==============================================================================
--- trunk/coregrind/m_libcproc.c (original)
+++ trunk/coregrind/m_libcproc.c Mon May  8 18:21:59 2017
@@ -662,7 +662,7 @@
        * the /proc/self link is pointing...
        */
 
-#     if defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#     if defined(VGP_arm64_linux)
       res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD,
                              (UWord)"/proc/self",
                              (UWord)pid, sizeof(pid));
@@ -787,7 +787,7 @@
    if (size < 0) return -1;
 
 #  if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \
-      || defined(VGP_mips64_linux) || defined(VGP_tilegx_linux)
+      || defined(VGP_mips64_linux)
    Int    i;
    SysRes sres;
    UShort list16[size];
@@ -845,7 +845,7 @@
 
 Int VG_(fork) ( void )
 {
-#  if defined(VGP_arm64_linux) || defined(VGP_tilegx_linux)
+#  if defined(VGP_arm64_linux)
    SysRes res;
    res = VG_(do_syscall5)(__NR_clone, VKI_SIGCHLD,
                           (UWord)NULL, (UWord)NULL, (UWord)NULL, (UWord)NULL);
@@ -1186,25 +1186,6 @@
                                  (UWord) nbytes, (UWord) 3);
    vg_assert( !sr_isError(sres) );
 
-#  elif defined(VGA_tilegx)
-   const HChar *start, *end;
-
-   /* L1 ICache is 32KB. cacheline size is 64 bytes. */
-   if (nbytes > 0x8000) nbytes = 0x8000;
-
-   start = (const HChar *)((unsigned long)ptr & -64ULL);
-   end = (const HChar*)ptr + nbytes - 1;
-
-   __insn_mf();
-
-   do {
-     const HChar* p;
-     for (p = start; p <= end; p += 64)
-       __insn_icoh(p);
-   } while (0);
-
-   __insn_drain();
-
 #  endif
 }
 

Modified: trunk/coregrind/m_machine.c
==============================================================================
--- trunk/coregrind/m_machine.c (original)
+++ trunk/coregrind/m_machine.c Mon May  8 18:21:59 2017
@@ -126,13 +126,6 @@
       = VG_(threads)[tid].arch.vex.guest_r31;
    regs->misc.MIPS64.r28
       = VG_(threads)[tid].arch.vex.guest_r28;
-#  elif defined(VGA_tilegx)
-   regs->r_pc = VG_(threads)[tid].arch.vex.guest_pc;
-   regs->r_sp = VG_(threads)[tid].arch.vex.guest_r54;
-   regs->misc.TILEGX.r52
-      = VG_(threads)[tid].arch.vex.guest_r52;
-   regs->misc.TILEGX.r55
-      = VG_(threads)[tid].arch.vex.guest_r55;
 #  else
 #    error "Unknown arch"
 #  endif
@@ -350,63 +343,6 @@
    (*f)(tid, "x28", vex->guest_X28);
    (*f)(tid, "x29", vex->guest_X29);
    (*f)(tid, "x30", vex->guest_X30);
-#elif defined(VGA_tilegx)
-   (*f)(tid, "r0",  vex->guest_r0 );
-   (*f)(tid, "r1",  vex->guest_r1 );
-   (*f)(tid, "r2",  vex->guest_r2 );
-   (*f)(tid, "r3",  vex->guest_r3 );
-   (*f)(tid, "r4",  vex->guest_r4 );
-   (*f)(tid, "r5",  vex->guest_r5 );
-   (*f)(tid, "r6",  vex->guest_r6 );
-   (*f)(tid, "r7",  vex->guest_r7 );
-   (*f)(tid, "r8",  vex->guest_r8 );
-   (*f)(tid, "r9",  vex->guest_r9 );
-   (*f)(tid, "r10", vex->guest_r10);
-   (*f)(tid, "r11", vex->guest_r11);
-   (*f)(tid, "r12", vex->guest_r12);
-   (*f)(tid, "r13", vex->guest_r13);
-   (*f)(tid, "r14", vex->guest_r14);
-   (*f)(tid, "r15", vex->guest_r15);
-   (*f)(tid, "r16", vex->guest_r16);
-   (*f)(tid, "r17", vex->guest_r17);
-   (*f)(tid, "r18", vex->guest_r18);
-   (*f)(tid, "r19", vex->guest_r19);
-   (*f)(tid, "r20", vex->guest_r20);
-   (*f)(tid, "r21", vex->guest_r21);
-   (*f)(tid, "r22", vex->guest_r22);
-   (*f)(tid, "r23", vex->guest_r23);
-   (*f)(tid, "r24", vex->guest_r24);
-   (*f)(tid, "r25", vex->guest_r25);
-   (*f)(tid, "r26", vex->guest_r26);
-   (*f)(tid, "r27", vex->guest_r27);
-   (*f)(tid, "r28", vex->guest_r28);
-   (*f)(tid, "r29", vex->guest_r29);
-   (*f)(tid, "r30", vex->guest_r30);
-   (*f)(tid, "r31", vex->guest_r31);
-   (*f)(tid, "r32", vex->guest_r32);
-   (*f)(tid, "r33", vex->guest_r33);
-   (*f)(tid, "r34", vex->guest_r34);
-   (*f)(tid, "r35", vex->guest_r35);
-   (*f)(tid, "r36", vex->guest_r36);
-   (*f)(tid, "r37", vex->guest_r37);
-   (*f)(tid, "r38", vex->guest_r38);
-   (*f)(tid, "r39", vex->guest_r39);
-   (*f)(tid, "r40", vex->guest_r40);
-   (*f)(tid, "r41", vex->guest_r41);
-   (*f)(tid, "r42", vex->guest_r42);
-   (*f)(tid, "r43", vex->guest_r43);
-   (*f)(tid, "r44", vex->guest_r44);
-   (*f)(tid, "r45", vex->guest_r45);
-   (*f)(tid, "r46", vex->guest_r46);
-   (*f)(tid, "r47", vex->guest_r47);
-   (*f)(tid, "r48", vex->guest_r48);
-   (*f)(tid, "r49", vex->guest_r49);
-   (*f)(tid, "r50", vex->guest_r50);
-   (*f)(tid, "r51", vex->guest_r51);
-   (*f)(tid, "r52", vex->guest_r52);
-   (*f)(tid, "r53", vex->guest_r53);
-   (*f)(tid, "r54", vex->guest_r54);
-   (*f)(tid, "r55", vex->guest_r55);
 #else
 #  error Unknown arch
 #endif
@@ -1802,17 +1738,6 @@
      return True;
    }
 
-#elif defined(VGA_tilegx)
-   {
-     va = VexArchTILEGX;
-     vai.hwcaps = VEX_HWCAPS_TILEGX_BASE;
-     vai.endness = VexEndnessLE;
-
-     VG_(machine_get_cache_info)(&vai);
-
-     return True;
-   }
-
 #else
 #  error "Unknown arch"
 #endif
@@ -1946,9 +1871,6 @@
 #  elif defined(VGA_mips64)
    return 8;
 
-#  elif defined(VGA_tilegx)
-   return 8;
-
 #  else
 #    error "Unknown arch"
 #  endif
@@ -1964,8 +1886,7 @@
       || defined(VGP_ppc32_linux) || defined(VGP_ppc64le_linux) \
       || defined(VGP_s390x_linux) || defined(VGP_mips32_linux) \
       || defined(VGP_mips64_linux) || defined(VGP_arm64_linux) \
-      || defined(VGP_tilegx_linux) || defined(VGP_x86_solaris) \
-      || defined(VGP_amd64_solaris)
+      || defined(VGP_x86_solaris) || defined(VGP_amd64_solaris)
    return f;
 #  elif defined(VGP_ppc64be_linux)
    /* ppc64-linux uses the AIX scheme, in which f is a pointer to a

Modified: trunk/coregrind/m_main.c
==============================================================================
--- trunk/coregrind/m_main.c (original)
+++ trunk/coregrind/m_main.c Mon May  8 18:21:59 2017
@@ -2342,11 +2342,6 @@
    VG_TRACK(post_reg_write, Vg_CoreClientReq, tid,
             offsetof(VexGuestS390XState, guest_r2),
             sizeof(VG_(threads)[tid].arch.vex.guest_r2));
-#  elif defined(VGA_tilegx)
-   VG_(threads)[tid].arch.vex.guest_r0 = to_run;
-   VG_TRACK(post_reg_write, Vg_CoreClientReq, tid,
-            offsetof(VexGuestTILEGXState, guest_r0),
-            sizeof(VG_(threads)[tid].arch.vex.guest_r0));
 #else
    I_die_here : architecture missing in m_main.c
 #endif
@@ -2803,45 +2798,6 @@
     "\tnop\n"
 ".previous\n"
 );
-#elif defined(VGP_tilegx_linux)
-asm("\n"
-    ".text\n"
-    "\t.align 8\n"
-    "\t.globl _start\n"
-    "\t.type _start,@function\n"
-    "_start:\n"
-
-    "\tjal 1f\n"
-    "1:\n"
-
-    /* --FIXME, bundle them :) */
-    /* r19 <- Addr(interim_stack) */
-    "\tmoveli r19, hw2_last(vgPlain_interim_stack)\n"
-    "\tshl16insli r19, r19, hw1(vgPlain_interim_stack)\n"
-    "\tshl16insli r19, r19, hw0(vgPlain_interim_stack)\n"
-
-    "\tmoveli r20, hw1("VG_STRINGIFY(VG_STACK_GUARD_SZB)")\n"
-    "\tshl16insli r20, r20, hw0("VG_STRINGIFY(VG_STACK_GUARD_SZB)")\n"
-    "\tmoveli r21, hw1("VG_STRINGIFY(VG_DEFAULT_STACK_ACTIVE_SZB)")\n"
-    "\tshl16insli r21, r21, hw0("VG_STRINGIFY(VG_DEFAULT_STACK_ACTIVE_SZB)")\n"
-    "\tadd     r19, r19, r20\n"
-    "\tadd     r19, r19, r21\n"
-
-    "\tmovei    r12, 0x0F\n"
-    "\tnor      r12, zero, r12\n"
-
-    "\tand      r19, r19, r12\n"
-
-    /* now r19 = &vgPlain_interim_stack + VG_STACK_GUARD_SZB +
-       VG_STACK_ACTIVE_SZB rounded down to the nearest 16-byte
-       boundary.  And $54 is the original SP.  Set the SP to r0 and
-       call _start_in_C, passing it the initial SP. */
-
-    "\tmove    r0,  r54\n"    // r0  <- $sp (_start_in_C first arg)
-    "\tmove    r54, r19\n"    // $sp <- r19 (new sp)
-
-    "\tjal  _start_in_C_linux\n"
-);
 #else
 #  error "Unknown linux platform"
 #endif

Modified: trunk/coregrind/m_options.c
==============================================================================
--- trunk/coregrind/m_options.c (original)
+++ trunk/coregrind/m_options.c Mon May  8 18:21:59 2017
@@ -148,8 +148,7 @@
 VgSmc VG_(clo_smc_check) = Vg_SmcAllNonFile;
 #elif defined(VGA_ppc32) || defined(VGA_ppc64be) || defined(VGA_ppc64le) \
       || defined(VGA_arm) || defined(VGA_arm64) \
-      || defined(VGA_mips32) || defined(VGA_mips64) \
-      || defined(VGA_tilegx)
+      || defined(VGA_mips32) || defined(VGA_mips64)
 VgSmc VG_(clo_smc_check) = Vg_SmcStack;
 #else
 #  error "Unknown arch"

Modified: trunk/coregrind/m_redir.c
==============================================================================
--- trunk/coregrind/m_redir.c (original)
+++ trunk/coregrind/m_redir.c Mon May  8 18:21:59 2017
@@ -1602,15 +1602,6 @@
       );
    }
 
-#  elif defined(VGP_tilegx_linux)
-   if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
-
-      add_hardwired_spec(
-         "ld.so.1", "strlen",
-         (Addr)&VG_(tilegx_linux_REDIR_FOR_strlen), NULL
-      );
-   }
-
 #  elif defined(VGP_x86_solaris)
    /* If we're using memcheck, use these intercepts right from
       the start, otherwise ld.so makes a lot of noise. */

Modified: trunk/coregrind/m_scheduler/scheduler.c
==============================================================================
--- trunk/coregrind/m_scheduler/scheduler.c (original)
+++ trunk/coregrind/m_scheduler/scheduler.c Mon May  8 18:21:59 2017
@@ -1708,9 +1708,6 @@
 #elif defined(VGA_mips32) || defined(VGA_mips64)
 #  define VG_CLREQ_ARGS       guest_r12
 #  define VG_CLREQ_RET        guest_r11
-#elif defined(VGA_tilegx)
-#  define VG_CLREQ_ARGS       guest_r12
-#  define VG_CLREQ_RET        guest_r11
 #else
 #  error Unknown arch
 #endif

Removed: trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c (removed)
@@ -1,349 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Create/destroy signal delivery frames.                       ---*/
-/*---                                  sigframe-tilegx-linux.c     ---*/
-/*--------------------------------------------------------------------*/
-
-/*
-  This file is part of Valgrind, a dynamic binary instrumentation
-  framework.
-
-  Copyright (C) 2010-2017 Tilera Corp.
-
-  This program 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 2 of the
-  License, or (at your option) any later version.
-
-  This program 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.
-
-  You should have received a copy of the GNU General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-  02111-1307, USA.
-
-  The GNU General Public License is contained in the file COPYING.
-*/
-
-/* Contributed by Zhi-Gang Liu <zliu at tilera dot com> */
-
-#if defined(VGP_tilegx_linux)
-
-#include "pub_core_basics.h"
-#include "pub_core_vki.h"
-#include "pub_core_vkiscnums.h"
-#include "pub_core_threadstate.h"
-#include "pub_core_aspacemgr.h"
-#include "pub_core_libcbase.h"
-#include "pub_core_libcassert.h"
-#include "pub_core_libcprint.h"
-#include "pub_core_machine.h"
-#include "pub_core_options.h"
-#include "pub_core_sigframe.h"
-#include "pub_core_signals.h"
-#include "pub_core_tooliface.h"
-#include "pub_core_trampoline.h"
-#include "priv_sigframe.h"
-
-struct vg_sig_private
-{
-  UInt magicPI;
-  UInt sigNo_private;
-  VexGuestTILEGXState vex_shadow1;
-  VexGuestTILEGXState vex_shadow2;
-};
-
-#ifndef C_ABI_SAVE_AREA_SIZE
-#define C_ABI_SAVE_AREA_SIZE  16
-#endif
-struct rt_sigframe {
-  unsigned char save_area[C_ABI_SAVE_AREA_SIZE]; /* caller save area */
-  vki_siginfo_t rs_info;
-  struct vki_ucontext rs_uc;
-  struct vg_sig_private priv;
-};
-
-
-static
-void setup_sigcontext2 ( ThreadState* tst, struct vki_sigcontext **sc1,
-                         const vki_siginfo_t *si )
-{
-
-  struct vki_sigcontext *sc = *sc1;
-
-  VG_TRACK( pre_mem_write, Vg_CoreSignal, tst->tid, "signal frame mcontext",
-            (Addr)sc, sizeof(unsigned long long)*34 );
-  sc->gregs[0] = tst->arch.vex.guest_r0;
-  sc->gregs[1] = tst->arch.vex.guest_r1;
-  sc->gregs[2] = tst->arch.vex.guest_r2;
-  sc->gregs[3] = tst->arch.vex.guest_r3;
-  sc->gregs[4] = tst->arch.vex.guest_r4;
-  sc->gregs[5] = tst->arch.vex.guest_r5;
-  sc->gregs[6] = tst->arch.vex.guest_r6;
-  sc->gregs[7] = tst->arch.vex.guest_r7;
-  sc->gregs[8] = tst->arch.vex.guest_r8;
-  sc->gregs[9] = tst->arch.vex.guest_r9;
-  sc->gregs[10] = tst->arch.vex.guest_r10;
-  sc->gregs[11] = tst->arch.vex.guest_r11;
-  sc->gregs[12] = tst->arch.vex.guest_r12;
-  sc->gregs[13] = tst->arch.vex.guest_r13;
-  sc->gregs[14] = tst->arch.vex.guest_r14;
-  sc->gregs[15] = tst->arch.vex.guest_r15;
-  sc->gregs[16] = tst->arch.vex.guest_r16;
-  sc->gregs[17] = tst->arch.vex.guest_r17;
-  sc->gregs[18] = tst->arch.vex.guest_r18;
-  sc->gregs[19] = tst->arch.vex.guest_r19;
-  sc->gregs[20] = tst->arch.vex.guest_r20;
-  sc->gregs[21] = tst->arch.vex.guest_r21;
-  sc->gregs[22] = tst->arch.vex.guest_r22;
-  sc->gregs[23] = tst->arch.vex.guest_r23;
-  sc->gregs[24] = tst->arch.vex.guest_r24;
-  sc->gregs[25] = tst->arch.vex.guest_r25;
-  sc->gregs[26] = tst->arch.vex.guest_r26;
-  sc->gregs[27] = tst->arch.vex.guest_r27;
-  sc->gregs[28] = tst->arch.vex.guest_r28;
-  sc->gregs[29] = tst->arch.vex.guest_r29;
-  sc->gregs[30] = tst->arch.vex.guest_r30;
-  sc->gregs[31] = tst->arch.vex.guest_r31;
-  sc->gregs[32] = tst->arch.vex.guest_r32;
-  sc->gregs[33] = tst->arch.vex.guest_r33;
-  sc->gregs[34] = tst->arch.vex.guest_r34;
-  sc->gregs[35] = tst->arch.vex.guest_r35;
-  sc->gregs[36] = tst->arch.vex.guest_r36;
-  sc->gregs[37] = tst->arch.vex.guest_r37;
-  sc->gregs[38] = tst->arch.vex.guest_r38;
-  sc->gregs[39] = tst->arch.vex.guest_r39;
-  sc->gregs[40] = tst->arch.vex.guest_r40;
-  sc->gregs[41] = tst->arch.vex.guest_r41;
-  sc->gregs[42] = tst->arch.vex.guest_r42;
-  sc->gregs[43] = tst->arch.vex.guest_r43;
-  sc->gregs[44] = tst->arch.vex.guest_r44;
-  sc->gregs[45] = tst->arch.vex.guest_r45;
-  sc->gregs[46] = tst->arch.vex.guest_r46;
-  sc->gregs[47] = tst->arch.vex.guest_r47;
-  sc->gregs[48] = tst->arch.vex.guest_r48;
-  sc->gregs[49] = tst->arch.vex.guest_r49;
-  sc->gregs[50] = tst->arch.vex.guest_r50;
-  sc->gregs[51] = tst->arch.vex.guest_r51;
-  sc->gregs[52] = tst->arch.vex.guest_r52;
-  sc->tp        = tst->arch.vex.guest_r53;
-  sc->sp        = tst->arch.vex.guest_r54;
-  sc->lr        = tst->arch.vex.guest_r55;
-  sc->pc        = tst->arch.vex.guest_pc;
-}
-
-/* EXPORTED */
-void VG_(sigframe_create)( ThreadId tid,
-                           Bool on_altstack,
-                           Addr sp_top_of_frame,
-                           const vki_siginfo_t *siginfo,
-                           const struct vki_ucontext *siguc,
-                           void *handler,
-                           UInt flags,
-                           const vki_sigset_t *mask,
-                           void *restorer )
-{
-  Addr sp;
-  ThreadState* tst;
-  Addr faultaddr;
-  Int sigNo = siginfo->si_signo;
-  struct vg_sig_private *priv;
-
-  /* Stack must be 8-byte aligned */
-  sp_top_of_frame &= ~0x7ULL;
-
-  sp = sp_top_of_frame - sizeof(struct rt_sigframe);
-
-  tst = VG_(get_ThreadState)(tid);
-  if (! ML_(sf_maybe_extend_stack)(tst, sp, sizeof(struct rt_sigframe), flags))
-    return;
-
-  vg_assert(VG_IS_8_ALIGNED(sp));
-
-  /* SIGILL defines addr to be the faulting address */
-
-  faultaddr = (Addr)siginfo->_sifields._sigfault._addr;
-  if (sigNo == VKI_SIGILL && siginfo->si_code > 0)
-    faultaddr = tst->arch.vex.guest_pc;
-
-
-  struct rt_sigframe *frame = (struct rt_sigframe *) sp;
-  struct vki_ucontext *ucp = &frame->rs_uc;
-  if (VG_(clo_trace_signals))
-    VG_(printf)("rt_sigframe\n");
-  /* Create siginfo.  */
-  VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal frame siginfo",
-            (Addr)&frame->rs_info, sizeof(frame->rs_info) );
-
-  VG_(memcpy)(&frame->rs_info, siginfo, sizeof(*siginfo));
-
-  VG_TRACK( post_mem_write, Vg_CoreSignal, tid,
-            (Addr)&frame->rs_info, sizeof(frame->rs_info) );
-
-  /* Create the ucontext.  */
-  VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal frame ucontext",
-            (Addr)ucp, offsetof(struct vki_ucontext, uc_mcontext) );
-
-  ucp->uc_flags = 0;
-  ucp->uc_link = 0;
-  ucp->uc_stack = tst->altstack;
-
-  VG_TRACK( post_mem_write, Vg_CoreSignal, tid, (Addr)ucp,
-            offsetof(struct vki_ucontext, uc_mcontext) );
-
-  struct vki_sigcontext *scp = &(frame->rs_uc.uc_mcontext);
-  setup_sigcontext2(tst, &(scp), siginfo);
-
-  ucp->uc_sigmask = tst->sig_mask;
-
-  priv = &frame->priv;
-
-  /*
-   * Arguments to signal handler:
-   *
-   *   r0 = signal number
-   *   r1 = 0 (should be cause)
-   *   r2 = pointer to ucontext
-   *
-   * r54 points to the struct rt_sigframe.
-   */
-
-  tst->arch.vex.guest_r0 = siginfo->si_signo;
-  tst->arch.vex.guest_r1 = (Addr) &frame->rs_info;
-  tst->arch.vex.guest_r2 = (Addr) &frame->rs_uc;
-  tst->arch.vex.guest_r54 = (Addr) frame;
-
-  if (flags & VKI_SA_RESTORER)
-  {
-    tst->arch.vex.guest_r55 = (Addr) restorer;
-  }
-  else
-  {
-    tst->arch.vex.guest_r55 = (Addr)&VG_(tilegx_linux_SUBST_FOR_rt_sigreturn);
-  }
-
-  priv->magicPI       = 0x31415927;
-  priv->sigNo_private = sigNo;
-  priv->vex_shadow1   = tst->arch.vex_shadow1;
-  priv->vex_shadow2   = tst->arch.vex_shadow2;
-  /* Set the thread so it will next run the handler. */
-  /* tst->m_sp  = sp;  also notify the tool we've updated SP */
-  VG_TRACK( post_reg_write, Vg_CoreSignal, tid, VG_O_STACK_PTR, sizeof(Addr));
-  if (VG_(clo_trace_signals))
-    VG_(printf)("handler = %p\n", handler);
-  tst->arch.vex.guest_pc = (Addr) handler;
-  /* This thread needs to be marked runnable, but we leave that the
-     caller to do. */
-}
-
-/* EXPORTED */
-void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
-{
-  ThreadState *tst;
-  struct vg_sig_private *priv1;
-  Addr sp;
-  UInt frame_size;
-  struct vki_sigcontext *mc;
-  Int sigNo;
-  Bool has_siginfo = isRT;
-
-  vg_assert(VG_(is_valid_tid)(tid));
-  tst = VG_(get_ThreadState)(tid);
-  sp   = tst->arch.vex.guest_r54 + 8;
-  if (has_siginfo)
-  {
-    struct rt_sigframe *frame = (struct rt_sigframe *)sp;
-    struct vki_ucontext *ucp = &frame->rs_uc;
-
-    if (0)
-      VG_(printf)("destroy signal frame; sp = %lx, "
-                  " %pc = %lx, status=%d\n",
-                  (Addr)frame, tst->arch.vex.guest_pc, (Int)tst->status);
-
-    frame_size = sizeof(*frame);
-    mc = &ucp->uc_mcontext;
-    priv1 = &frame->priv;
-    vg_assert(priv1->magicPI == 0x31415927);
-    sigNo = priv1->sigNo_private;
-  }
-  else
-  {
-    vg_assert(0);
-  }
-
-  //restore regs
-  tst->arch.vex.guest_r0  = mc->gregs[0];
-  tst->arch.vex.guest_r1  = mc->gregs[1];
-  tst->arch.vex.guest_r2  = mc->gregs[2];
-  tst->arch.vex.guest_r3  = mc->gregs[3];
-  tst->arch.vex.guest_r4  = mc->gregs[4];
-  tst->arch.vex.guest_r5  = mc->gregs[5];
-  tst->arch.vex.guest_r6  = mc->gregs[6];
-  tst->arch.vex.guest_r7  = mc->gregs[7];
-  tst->arch.vex.guest_r8  = mc->gregs[8];
-  tst->arch.vex.guest_r9  = mc->gregs[9];
-  tst->arch.vex.guest_r10 = mc->gregs[10];
-  tst->arch.vex.guest_r11 = mc->gregs[11];
-  tst->arch.vex.guest_r12 = mc->gregs[12];
-  tst->arch.vex.guest_r13 = mc->gregs[13];
-  tst->arch.vex.guest_r14 = mc->gregs[14];
-  tst->arch.vex.guest_r15 = mc->gregs[15];
-  tst->arch.vex.guest_r16 = mc->gregs[16];
-  tst->arch.vex.guest_r17 = mc->gregs[17];
-  tst->arch.vex.guest_r18 = mc->gregs[18];
-  tst->arch.vex.guest_r19 = mc->gregs[19];
-  tst->arch.vex.guest_r20 = mc->gregs[20];
-  tst->arch.vex.guest_r21 = mc->gregs[21];
-  tst->arch.vex.guest_r22 = mc->gregs[22];
-  tst->arch.vex.guest_r23 = mc->gregs[23];
-  tst->arch.vex.guest_r24 = mc->gregs[24];
-  tst->arch.vex.guest_r25 = mc->gregs[25];
-  tst->arch.vex.guest_r26 = mc->gregs[26];
-  tst->arch.vex.guest_r27 = mc->gregs[27];
-  tst->arch.vex.guest_r28 = mc->gregs[28];
-  tst->arch.vex.guest_r29 = mc->gregs[29];
-  tst->arch.vex.guest_r30 = mc->gregs[30];
-  tst->arch.vex.guest_r31 = mc->gregs[31];
-  tst->arch.vex.guest_r32 = mc->gregs[32];
-  tst->arch.vex.guest_r33 = mc->gregs[33];
-  tst->arch.vex.guest_r34 = mc->gregs[34];
-  tst->arch.vex.guest_r35 = mc->gregs[35];
-  tst->arch.vex.guest_r36 = mc->gregs[36];
-  tst->arch.vex.guest_r37 = mc->gregs[37];
-  tst->arch.vex.guest_r38 = mc->gregs[38];
-  tst->arch.vex.guest_r39 = mc->gregs[39];
-  tst->arch.vex.guest_r40 = mc->gregs[40];
-  tst->arch.vex.guest_r41 = mc->gregs[41];
-  tst->arch.vex.guest_r42 = mc->gregs[42];
-  tst->arch.vex.guest_r43 = mc->gregs[43];
-  tst->arch.vex.guest_r44 = mc->gregs[44];
-  tst->arch.vex.guest_r45 = mc->gregs[45];
-  tst->arch.vex.guest_r46 = mc->gregs[46];
-  tst->arch.vex.guest_r47 = mc->gregs[47];
-  tst->arch.vex.guest_r48 = mc->gregs[48];
-  tst->arch.vex.guest_r49 = mc->gregs[49];
-  tst->arch.vex.guest_r50 = mc->gregs[50];
-  tst->arch.vex.guest_r51 = mc->gregs[51];
-  tst->arch.vex.guest_r52 = mc->gregs[52];
-  tst->arch.vex.guest_r53 = mc->tp;
-  tst->arch.vex.guest_r54 = mc->sp;
-  tst->arch.vex.guest_r55 = mc->lr;
-  tst->arch.vex.guest_pc  = mc->pc;
-
-  VG_TRACK(die_mem_stack_signal, sp, frame_size);
-  if (VG_(clo_trace_signals))
-    VG_(message)( Vg_DebugMsg,
-                  "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%#x\n",
-                  tid, isRT, tst->arch.vex.guest_pc);
-  /* tell the tools */
-  VG_TRACK( post_deliver_signal, tid, sigNo );
-}
-
-#endif // defined(VGP_tilegx_linux)
-
-/*--------------------------------------------------------------------*/
-/*--- end                                  sigframe-tilegx-linux.c ---*/
-/*--------------------------------------------------------------------*/

Modified: trunk/coregrind/m_signals.c
==============================================================================
--- trunk/coregrind/m_signals.c (original)
+++ trunk/coregrind/m_signals.c Mon May  8 18:21:59 2017
@@ -566,21 +566,6 @@
         (srP)->misc.MIPS64.r28 = (uc)->uc_mcontext.sc_regs[28]; \
       }
 
-#elif defined(VGP_tilegx_linux)
-#  define VG_UCONTEXT_INSTR_PTR(uc)       ((uc)->uc_mcontext.pc)
-#  define VG_UCONTEXT_STACK_PTR(uc)       ((uc)->uc_mcontext.sp)
-#  define VG_UCONTEXT_FRAME_PTR(uc)       ((uc)->uc_mcontext.gregs[52])
-#  define VG_UCONTEXT_SYSCALL_NUM(uc)     ((uc)->uc_mcontext.gregs[10])
-#  define VG_UCONTEXT_SYSCALL_SYSRES(uc)                            \
-      /* Convert the value in uc_mcontext.rax into a SysRes. */     \
-      VG_(mk_SysRes_tilegx_linux)((uc)->uc_mcontext.gregs[0])
-#  define VG_UCONTEXT_TO_UnwindStartRegs(srP, uc)              \
-      { (srP)->r_pc = (uc)->uc_mcontext.pc;                    \
-        (srP)->r_sp = (uc)->uc_mcontext.sp;                    \
-        (srP)->misc.TILEGX.r52 = (uc)->uc_mcontext.gregs[52];  \
-        (srP)->misc.TILEGX.r55 = (uc)->uc_mcontext.lr;         \
-      }
-
 #elif defined(VGP_x86_solaris)
 #  define VG_UCONTEXT_INSTR_PTR(uc)       ((Addr)(uc)->uc_mcontext.gregs[VKI_EIP])
 #  define VG_UCONTEXT_STACK_PTR(uc)       ((Addr)(uc)->uc_mcontext.gregs[VKI_UESP])
@@ -994,14 +979,6 @@
    "   syscall\n" \
    ".previous\n"
 
-#elif defined(VGP_tilegx_linux)
-#  define _MY_SIGRETURN(name) \
-   ".text\n" \
-   "my_sigreturn:\n" \
-   " moveli r10 ," #name "\n" \
-   " swint1\n" \
-   ".previous\n"
-
 #elif defined(VGP_x86_solaris) || defined(VGP_amd64_solaris)
 /* Not used on Solaris. */
 #  define _MY_SIGRETURN(name) \

Modified: trunk/coregrind/m_stacktrace.c
==============================================================================
--- trunk/coregrind/m_stacktrace.c (original)
+++ trunk/coregrind/m_stacktrace.c Mon May  8 18:21:59 2017
@@ -1468,214 +1468,6 @@
 
 #endif
 
-/* ------------------------ tilegx ------------------------- */
-#if defined(VGP_tilegx_linux)
-UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known,
-                               /*OUT*/Addr* ips, UInt max_n_ips,
-                               /*OUT*/Addr* sps, /*OUT*/Addr* fps,
-                               const UnwindStartRegs* startRegs,
-                               Addr fp_max_orig )
-{
-   Bool  debug = False;
-   Int   i;
-   Addr  fp_max;
-   UInt  n_found = 0;
-   const Int cmrf = VG_(clo_merge_recursive_frames);
-
-   vg_assert(sizeof(Addr) == sizeof(UWord));
-   vg_assert(sizeof(Addr) == sizeof(void*));
-
-   D3UnwindRegs uregs;
-   uregs.pc = startRegs->r_pc;
-   uregs.sp = startRegs->r_sp;
-   Addr fp_min = uregs.sp - VG_STACK_REDZONE_SZB;
-
-   uregs.fp = startRegs->misc.TILEGX.r52;
-   uregs.lr = startRegs->misc.TILEGX.r55;
-
-   fp_max = VG_PGROUNDUP(fp_max_orig);
-   if (fp_max >= sizeof(Addr))
-      fp_max -= sizeof(Addr);
-
-   if (debug)
-      VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
-                  "fp_max=0x%lx pc=0x%lx sp=0x%lx fp=0x%lx\n",
-                  max_n_ips, fp_min, fp_max_orig, fp_max,
-                  uregs.pc, uregs.sp, uregs.fp);
-
-   if (sps) sps[0] = uregs.sp;
-   if (fps) fps[0] = uregs.fp;
-   ips[0] = uregs.pc;
-   i = 1;
-
-   /* Loop unwinding the stack. */
-   while (True) {
-      if (debug) {
-         VG_(printf)("i: %d, pc: 0x%lx, sp: 0x%lx, lr: 0x%lx\n",
-                     i, uregs.pc, uregs.sp, uregs.lr);
-     }
-     if (i >= max_n_ips)
-        break;
-
-     D3UnwindRegs uregs_copy = uregs;
-     if (VG_(use_CF_info)( &uregs, fp_min, fp_max )) {
-        if (debug)
-           VG_(printf)("USING CFI: pc: 0x%lx, sp: 0x%lx, fp: 0x%lx, lr: 0x%lx\n",
-                       uregs.pc, uregs.sp, uregs.fp, uregs.lr);
-        if (0 != uregs.pc && 1 != uregs.pc &&
-            (uregs.pc < fp_min || uregs.pc > fp_max)) {
-           if (sps) sps[i] = uregs.sp;
-           if (fps) fps[i] = uregs.fp;
-           if (uregs.pc != uregs_copy.pc && uregs.sp != uregs_copy.sp)
-              ips[i++] = uregs.pc - 8;
-           uregs.pc = uregs.pc - 8;
-           RECURSIVE_MERGE(cmrf,ips,i);
-           continue;
-        } else
-           uregs = uregs_copy;
-     }
-
-     Long frame_offset = 0;
-     PtrdiffT offset;
-     if (VG_(get_inst_offset_in_function)(uregs.pc, &offset)) {
-        Addr start_pc = uregs.pc;
-        Addr limit_pc = uregs.pc - offset;
-        Addr cur_pc;
-        /* Try to find any stack adjustment from current instruction
-           bundles downward. */
-        for (cur_pc = start_pc; cur_pc > limit_pc; cur_pc -= 8) {
-           ULong inst;
-           Long off = 0;
-           ULong* cur_inst;
-           /* Fetch the instruction.   */
-           cur_inst = (ULong *)cur_pc;
-           inst = *cur_inst;
-           if(debug)
-              VG_(printf)("cur_pc: 0x%lx, inst: 0x%lx\n", cur_pc, inst);
-
-           if ((inst & 0xC000000000000000ULL) == 0) {
-              /* Bundle is X type. */
-             if ((inst & 0xC000000070000fffULL) ==
-                 (0x0000000010000db6ULL)) {
-                /* addli at X0 */
-                off = (short)(0xFFFF & (inst >> 12));
-             } else if ((inst & 0xF80007ff80000000ULL) ==
-                        (0x000006db00000000ULL)) {
-                /* addli at X1 addli*/
-                off = (short)(0xFFFF & (inst >> 43));
-             } else if ((inst & 0xC00000007FF00FFFULL) ==
-                        (0x0000000040100db6ULL)) {
-                /* addi at X0 */

[... 5363 lines stripped ...]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Loading...