]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: Code cleanup due to availability of ECAG insn. (BZ 509562)
authorFlorian Krohm <flo2030@eich-krohm.de>
Wed, 19 Nov 2025 14:26:15 +0000 (14:26 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Wed, 19 Nov 2025 14:26:15 +0000 (14:26 +0000)
Remove EmFail_S390X_ecag
Remove none/tests/s390x/ecag.stdout.exp-z10ec because z10-EC predates Z196

Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562

README.s390
VEX/priv/guest_s390_toIR.c
VEX/priv/main_main.c
VEX/pub/libvex_emnote.h
cachegrind/cg_arch.c
coregrind/m_cache.c
none/tests/s390x/ecag.stdout.exp-z10ec [deleted file]
none/tests/s390x/ecag.vgtest

index 3ff9bc64a16ad9c0e8fbf2e250d80726da20cc27..d0661731c6e5491fadd3c3c9386910e1ed765293 100644 (file)
@@ -15,9 +15,6 @@ Limitations
   `docs/internals/s390-opcodes.csv', by grepping for "not implemented".
 - FP signalling is not accurate. E.g., the "compare and signal"
   instructions behave like their non-signalling counterparts.
-- On machine models predating z10, cachegrind will assume a z10 cache
-  architecture. Otherwise, cachegrind will query the hosts cache system
-  and use those parameters.
 - Some gcc versions use mvc to copy 4/8 byte values. This will affect
   certain debug messages. For example, memcheck will complain about
   4 one-byte reads/writes instead of just a single read/write.
index bc9e4825961bf9998d519cb59c606ad137ad3e44..7915b2575c9bf73137974e48a733061a32b7fe05 100644 (file)
@@ -16797,11 +16797,7 @@ s390_call_ecag(IRExpr *op2addr)
 static const HChar *
 s390_irgen_ECAG(UChar r1, UChar r3 __attribute__((unused)), IRTemp op2addr)
 {
-   if (! s390_host_has_gie) {
-      emulation_failure(EmFail_S390X_ecag);
-   } else {
-      put_gpr_dw0(r1, s390_call_ecag(mkexpr(op2addr)));
-   }
+   put_gpr_dw0(r1, s390_call_ecag(mkexpr(op2addr)));
 
    return "ecag";
 }
index 08e4587f1b830d521b42591a034c0c9de52c8e19..6098e3c95f4922df1c6ee56daaff0967267c5787 100644 (file)
@@ -1553,8 +1553,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew )
         return "Instruction stfle is not supported on this host";
      case EmFail_S390X_stckf:
         return "Instruction stckf is not supported on this host";
-     case EmFail_S390X_ecag:
-        return "Instruction ecag is not supported on this host";
      case EmFail_S390X_pfpo:
         return "Instruction pfpo is not supported on this host";
      case EmFail_S390X_DFP_insn:
index 331c1b603fd8fc08821cf6bdc12c8db7dec7bcd8..9557663faa640043be5486d5ed053ff751d03851 100644 (file)
@@ -105,9 +105,6 @@ typedef
       /* stckf insn is not supported on this host */
       EmFail_S390X_stckf,
 
-      /* ecag insn is not supported on this host */
-      EmFail_S390X_ecag,
-
       /* pfpo insn is not supported on this host */
       EmFail_S390X_pfpo,
 
index f877f95c7a064c2154b99a859709971fd98a16f5..ea95aa7f151dab767e3df18f1f5d1904a86c04b2 100644 (file)
@@ -435,34 +435,10 @@ configure_caches(cache_t *I1c, cache_t *D1c, cache_t *LLc,
    *LLc = (cache_t) { 262144, 8, 64 };
 
 #elif defined(VGA_s390x)
-   //
-   // Here is the cache data from older machine models:
-   //
-   //           I1            D1      I/D L2
-   // z900  256k/256/4    256k/256/4   16MB
-   // z800  256k/256/4    256k/256/4    8MB
-   // z990  256k/256/4    256k/256/4   32MB
-   // z890  256k/256/4    256k/256/4   32MB
-   // z9    256k/256/4    256k/256/4   40MB
-   //
-   // Sources:
-   // (1) IBM System z9 109 Technical Introduction
-   //     www.redbooks.ibm.com/redbooks/pdfs/sg246669.pdf
-   // (2) The microarchitecture of the IBM eServer z900 processor
-   //     IBM Journal of Research and Development
-   //     Volume 46, Number 4/5, pp 381-395, July/September 2002
-   // (3) The IBM eServer z990 microprocessor
-   //     IBM Journal of Research and Development
-   //     Volume 48, Number 3/4, pp 295-309, May/July 2004 
-   // (4) Charles Webb, IBM
-   //
-   // L2 data is unfortunately incomplete. Otherwise, we could support
-   // machines without the ECAG insn by looking at VEX_S390X_MODEL(hwcaps).
-
-   // Default cache configuration is z10-EC  (Source: ECAG insn)
-   *I1c = (cache_t) {    65536,  4, 256 };
-   *D1c = (cache_t) {   131072,  8, 256 };
-   *LLc = (cache_t) { 50331648, 24, 256 };
+
+   // Should never get here as the min. required machine model can
+   // query cache information via the ECAG insn.
+   tl_assert(0);
 
 #elif defined(VGA_mips32) || defined(VGA_nanomips)
 
index fd6f801c138400c6888c87c6df4dcf2ce0c36376..2777f8c6f6f87ae95a9f39a7965daaf6fd11d424 100644 (file)
@@ -614,11 +614,6 @@ get_cache_info(VexArchInfo *vai)
 
    ci->icaches_maintain_coherence = True;
 
-   if (! (vai->hwcaps & VEX_HWCAPS_S390X_GIE)) {
-      // ECAG is not available
-      return False;
-   }
-
    UInt level, cache_kind, info, i;
    ULong topology = ecag(0, 0, 0);   // get summary
 
diff --git a/none/tests/s390x/ecag.stdout.exp-z10ec b/none/tests/s390x/ecag.stdout.exp-z10ec
deleted file mode 100644 (file)
index 13e7855..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-L1 topology: separate data and instruction; private
-L1 cache line size data: 256
-L1 cache line size insn: 256
-L1 total cachesize data: 131072
-L1 total cachesize insn: 65536
-L1 set. assoc.     data: 8
-L1 set. assoc.     insn: 4
-L2 topology: unified data and instruction; private
-L2 cache line size data: 256
-L2 cache line size insn: 256
-L2 total cachesize data: 3145728
-L2 total cachesize insn: 3145728
-L2 set. assoc.     data: 12
-L2 set. assoc.     insn: 12
-L3 topology: unified data and instruction; shared
-L3 cache line size data: 256
-L3 cache line size insn: 256
-L3 total cachesize data: 50331648
-L3 total cachesize insn: 50331648
-L3 set. assoc.     data: 24
-L3 set. assoc.     insn: 24
index f4abb7766dc4dd99b107f9fba79f67e959f50d12..610e3f39eb703ebe185b13e3081276c6f2d88ec7 100644 (file)
@@ -1,2 +1 @@
-prereq: ../../../tests/s390x_features s390x-genins
 prog: ecag