From eff69407bdf8800404c733e4f130a40f67664c62b4d546b725b78c5f963d484a Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 7 Mar 2007 21:50:43 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemtap?expand=0&rev=8 --- systemtap-s390x-stp_get_asm-alignment.diff | 101 +++++++++++++++++++++ systemtap.changes | 5 + systemtap.spec | 6 +- 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 systemtap-s390x-stp_get_asm-alignment.diff diff --git a/systemtap-s390x-stp_get_asm-alignment.diff b/systemtap-s390x-stp_get_asm-alignment.diff new file mode 100644 index 0000000..9a85177 --- /dev/null +++ b/systemtap-s390x-stp_get_asm-alignment.diff @@ -0,0 +1,101 @@ +--- runtime/loc2c-runtime.h.orig 2007-02-27 11:45:26.000000000 -0800 ++++ runtime/loc2c-runtime.h 2007-02-27 11:50:17.000000000 -0800 +@@ -296,52 +296,24 @@ + + #elif defined (__s390__) || defined (__s390x__) + +-#if defined __s390__ +-#define __stp_get_asm(x, addr, err, size) \ +-({ \ +- asm volatile( \ +- "0: mvc 0(%2,%4),0(%3)\n" \ +- "1:\n" \ +- ".section .fixup,\"ax\"\n" \ +- "2: lhi %0,%5\n" \ +- " bras 1,3f\n" \ +- " .long 1b\n" \ +- "3: l 1,0(1)\n" \ +- " br 1\n" \ +- ".previous\n" \ ++#ifndef EX_TABLE ++/* ++ * Helper macro for exception table entries ++ */ ++#ifndef __s390x__ ++#define EX_TABLE(_fault,_target) \ + ".section __ex_table,\"a\"\n" \ +- " .align 4\n" \ +- " .long 0b,2b\n" \ +- ".previous" \ +- : "+&d" (err), "=m" (x) \ +- : "i" (size),"a"(addr), \ +- "a" (&(x)),"K" (-EFAULT) \ +- : "cc", "1" ); \ +-}) +- +-#define __stp_put_asm(x, addr, err, size) \ +-({ \ +- asm volatile( \ +- "0: mvc 0(%1,%2),0(%3)\n" \ +- "1:\n" \ +- ".section .fixup,\"ax\"\n" \ +- "2: lhi %0,%5\n" \ +- " bras 1,3f\n" \ +- " .long 1b\n" \ +- "3: l 1,0(1)\n" \ +- " br 1\n" \ +- ".previous\n" \ ++ " .align 4\n" \ ++ " .long " #_fault "," #_target "\n" \ ++ ".previous\n" ++#else ++#define EX_TABLE(_fault,_target) \ + ".section __ex_table,\"a\"\n" \ +- " .align 4\n" \ +- " .long 0b,2b\n" \ +- ".previous" \ +- : "+&d" (err) \ +- : "i" (size), "a" (addr), \ +- "a" (&(x)),"K" (-EFAULT) \ +- : "cc", "1"); \ +-}) +- +-#else /* s390x */ ++ " .align 8\n" \ ++ " .quad " #_fault "," #_target "\n" \ ++ ".previous\n" ++#endif ++#endif + + #define __stp_get_asm(x, addr, err, size) \ + ({ \ +@@ -352,10 +324,7 @@ + "2: lghi %0,%5\n" \ + " jg 1b\n" \ + ".previous\n" \ +- ".section __ex_table,\"a\"\n" \ +- " .align 8\n" \ +- " .quad 0b,2b\n" \ +- ".previous" \ ++ EX_TABLE(0b,2b) \ + : "+&d" (err), "=m" (x) \ + : "i" (size),"a"(addr), \ + "a" (&(x)),"K" (-EFAULT) \ +@@ -371,16 +340,12 @@ + "2: lghi %0,%4\n" \ + " jg 1b\n" \ + ".previous\n" \ +- ".section __ex_table,\"a\"\n" \ +- " .align 8\n" \ +- " .quad 0b,2b\n" \ +- ".previous" \ ++ EX_TABLE(0b,2b) \ + : "+&d" (err) \ + : "i" (size),"a"(addr), \ + "a"(&(x)),"K"(-EFAULT) \ + : "cc"); \ + }) +-#endif + + #define deref(size, addr) \ + ({ \ diff --git a/systemtap.changes b/systemtap.changes index 67bbcb6..64bf34b 100644 --- a/systemtap.changes +++ b/systemtap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 7 15:47:20 CET 2007 - tiwai@suse.de + +- fix misalignment of exception table entry on s390x (#249576) + ------------------------------------------------------------------- Mon Feb 26 12:42:41 CET 2007 - tiwai@suse.de diff --git a/systemtap.spec b/systemtap.spec index 35afb56..c264c57 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -16,7 +16,7 @@ BuildRequires: gcc-c++ %define elfutils_version 0.125 License: GNU General Public License (GPL) Version: 0.5.8 -Release: 33 +Release: 35 Summary: Instrumentation System Group: Development/Tools/Debuggers URL: http://sourceware.org/systemtap/ @@ -31,6 +31,7 @@ Patch3: systemtap-s390x-probe-at-function-entry.diff Patch4: systemtap-s390x-store_deref-fix.diff Patch5: systemtap-s390x-mmap-tapset.diff Patch6: systemtap-translate-fix.diff +Patch7: systemtap-s390x-stp_get_asm-alignment.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -55,6 +56,7 @@ Authors: %patch4 -p1 %patch5 -p2 %patch6 -p1 +%patch7 autoreconf -fi cd elfutils-%{elfutils_version} %patch1 -p1 @@ -83,6 +85,8 @@ rm -rf ${RPM_BUILD_ROOT} %dir %attr(0755,root,root) /var/cache/systemtap %changelog +* Wed Mar 07 2007 - tiwai@suse.de +- fix misalignment of exception table entry on s390x (#249576) * Mon Feb 26 2007 - tiwai@suse.de - fix crash with large H value in hist_linear() (#248430) * Fri Feb 23 2007 - tiwai@suse.de