]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390x: More fixes for z13 support
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Thu, 26 Jul 2018 14:35:24 +0000 (16:35 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Thu, 22 Nov 2018 12:45:56 +0000 (13:45 +0100)
This patch addresses the following:

* Fix the implementation of LOCGHI.  Previously Valgrind performed 32-bit
  sign extension instead of 64-bit sign extension on the immediate value.

* Advertise VXRS in HWCAP.  If no VXRS are advertised, but the program
  uses vector registers, this could cause problems with a glibc built with
  "-march=z13".

NEWS
VEX/priv/guest_s390_toIR.c
coregrind/m_initimg/initimg-linux.c

diff --git a/NEWS b/NEWS
index 2fa2c86a3cdaed73f49c60eaebd7e5c1e51a86cd..8b6d4b361bdb763e079a1de651cd70c6cd61398c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,7 @@ where XXXXXX is the bug number as listed below.
 400490  s390x: VRs allocated as if separate from FPRs
 400491  s390x: Operand of LOCH treated as unsigned integer
 397187  z13 vector register support for vgdb gdbserver
+401277  More bugs in z13 support
 
 Release 3.14.0 (9 October 2018)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index 9c4d79b87e119dcc4705e27721e42091291b421e..50a5a41774e6262e75bc14fe14f3b58879af8df7 100644 (file)
@@ -16325,7 +16325,7 @@ static const HChar *
 s390_irgen_LOCGHI(UChar r1, UChar m3, UShort i2, UChar unused)
 {
    next_insn_if(binop(Iop_CmpEQ32, s390_call_calculate_cond(m3), mkU32(0)));
-   put_gpr_dw0(r1, mkU64((UInt)(Int)(Short)i2));
+   put_gpr_dw0(r1, mkU64((ULong)(Long)(Short)i2));
 
    return "locghi";
 }
index 61cc458bcfd53d91a96c01e7320ab1c5472fcffd..8a7f0d024d038875a103aca5f52a713872039d32 100644 (file)
@@ -699,9 +699,9 @@ Addr setup_client_stack( void*  init_sp,
             }
 #           elif defined(VGP_s390x_linux)
             {
-               /* Advertise hardware features "below" TE only.  TE and VXRS
-                  (and anything above) are not supported by Valgrind. */
-               auxv->u.a_val &= VKI_HWCAP_S390_TE - 1;
+               /* Advertise hardware features "below" TE and VXRS.  TE itself
+                  and anything above VXRS is not supported by Valgrind. */
+               auxv->u.a_val &= (VKI_HWCAP_S390_TE - 1) | VKI_HWCAP_S390_VXRS;
             }
 #           elif defined(VGP_arm64_linux)
             {