From 565bae9c7036e11af7d45ef3b0b18e9c616ebfe6 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Tue, 16 Feb 2021 17:52:09 +0100 Subject: [PATCH] s390x: Mark arch13 features as supported Make the STFLE instruction report the miscellaneous-instruction-extensions facility 3 and the vector-enhancements facility 2 as supported. Indicate support for the latter in the HWCAP vector as well. --- VEX/priv/guest_s390_helpers.c | 9 +++------ coregrind/m_initimg/initimg-linux.c | 3 ++- include/vki/vki-s390x-linux.h | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c index 1e04f601a8..804b92a296 100644 --- a/VEX/priv/guest_s390_helpers.c +++ b/VEX/priv/guest_s390_helpers.c @@ -356,9 +356,7 @@ s390x_dirtyhelper_STFLE(VexGuestS390XState *guest_state, ULong *addr) | s390_stfle_range(51, 55) /* 56: unassigned */ /* 57: MSA5, not supported */ - | s390_stfle_range(58, 60) - /* 61: miscellaneous-instruction 3, not supported */ - | s390_stfle_range(62, 63)), + | s390_stfle_range(58, 63)), /* === 64 .. 127 === */ (s390_stfle_range(64, 72) @@ -384,11 +382,10 @@ s390x_dirtyhelper_STFLE(VexGuestS390XState *guest_state, ULong *addr) /* 143: unassigned */ | s390_stfle_range(144, 145) /* 146: MSA8, not supported */ - | s390_stfle_range(147, 147) - /* 148: vector-enhancements 2, not supported */ - | s390_stfle_range(149, 149) + | s390_stfle_range(147, 149) /* 150: unassigned */ /* 151: DEFLATE-conversion, not supported */ + /* 152: vector packed decimal enhancement, not supported */ /* 153: unassigned */ /* 154: unassigned */ /* 155: MSA9, not supported */ diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c index 73c580333e..7d02d55678 100644 --- a/coregrind/m_initimg/initimg-linux.c +++ b/coregrind/m_initimg/initimg-linux.c @@ -703,7 +703,8 @@ Addr setup_client_stack( void* init_sp, itself, is not supported by Valgrind. */ auxv->u.a_val &= ((VKI_HWCAP_S390_TE - 1) | VKI_HWCAP_S390_VXRS - | VKI_HWCAP_S390_VXRS_EXT); + | VKI_HWCAP_S390_VXRS_EXT + | VKI_HWCAP_S390_VXRS_EXT2); } # elif defined(VGP_arm64_linux) { diff --git a/include/vki/vki-s390x-linux.h b/include/vki/vki-s390x-linux.h index 4ab2d3334e..71b363029c 100644 --- a/include/vki/vki-s390x-linux.h +++ b/include/vki/vki-s390x-linux.h @@ -807,6 +807,7 @@ typedef vki_s390_regs vki_elf_gregset_t; #define VKI_HWCAP_S390_TE 1024 #define VKI_HWCAP_S390_VXRS 2048 #define VKI_HWCAP_S390_VXRS_EXT 8192 +#define VKI_HWCAP_S390_VXRS_EXT2 32768 //---------------------------------------------------------------------- -- 2.43.5