Make SGCheck fail with a meaningful message on unsupported platforms.
Fixes BZ #325856.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13834 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/NEWS b/NEWS
index a8d2739..b3fc82d 100644
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,7 @@
 
 308729  vex x86->IR: unhandled instruction bytes 0xf 0x5 (syscall) 
 325714  Empty vgcore but RLIMIT_CORE is big enough (too big) 
+325856  Make SGCheck fail gracefully on unsupported platforms
 326444  Cavium MIPS Octeon Specific Load Indexed Instructions
 326462  Refactor vgdb to isolate invoker stuff into separate module
 326983  Clear direction flag after tests on amd64.
diff --git a/docs/internals/3_9_BUGSTATUS.txt b/docs/internals/3_9_BUGSTATUS.txt
index 3a86a29..814ad05 100644
--- a/docs/internals/3_9_BUGSTATUS.txt
+++ b/docs/internals/3_9_BUGSTATUS.txt
@@ -14,7 +14,6 @@
 325628  Phase 5 support for IBM Power ISA 2.07
 325751  Missing the  two privileged Power PC Transactional Memory Instructions
 325816  Phase 6 support for IBM Power ISA 2.07
-325856  sgcheck generates internal Valgrind error on IBM Power
 325874  Crash KCachegrind while load big file
 326026  Iop names for count leading zeros/sign bits incorrectly imply a "signedness" in incoming lanes
 326436  False positive in libstdc++ std::list::push_back
diff --git a/exp-sgcheck/pc_main.c b/exp-sgcheck/pc_main.c
index 17ae728..41632fa 100644
--- a/exp-sgcheck/pc_main.c
+++ b/exp-sgcheck/pc_main.c
@@ -62,7 +62,19 @@
 #endif
 #if defined(VGA_s390x)
    /* fixs390: to be done. */
-   VG_(printf)("SGCheck doesn't work s390x yet, sorry.\n");
+   VG_(printf)("SGCheck doesn't work on s390x yet, sorry.\n");
+   VG_(exit)(1);
+#endif
+#if defined(VGA_ppc32) || defined(VGA_ppc64)
+   VG_(printf)("SGCheck doesn't work on PPC yet, sorry.\n");
+   VG_(exit)(1);
+#endif
+#if defined(VGA_arm) || defined(VGA_arm64)
+   VG_(printf)("SGCheck doesn't work on ARM yet, sorry.\n");
+   VG_(exit)(1);
+#endif
+#if defined(VGA_mips32) || defined(VGA_mips64)
+   VG_(printf)("SGCheck doesn't work on MIPS yet, sorry.\n");
    VG_(exit)(1);
 #endif