]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Move definition of facility bits to libvex_s390x_common.h so we
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 9 Dec 2012 17:26:32 +0000 (17:26 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 9 Dec 2012 17:26:32 +0000 (17:26 +0000)
can use them in m_machine.c. Rename LSCOND facility to LSC.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2585

VEX/priv/guest_s390_helpers.c
VEX/priv/host_s390_defs.c
VEX/priv/host_s390_defs.h
VEX/priv/main_main.c
VEX/pub/libvex.h
VEX/pub/libvex_s390x_common.h

index 1b56e1826aedb5cfd6016ff6eefc170580218f26..891ee88c1ef8b0491730a9f05a1f892559d32b6a 100644 (file)
@@ -333,30 +333,6 @@ s390x_dirtyhelper_STFLE(VexGuestS390XState *guest_state, ULong *addr)
    for (i = 0; i < num_dw; ++i)
       addr[i] = hoststfle[i];
 
-   /* Enumerators for interesting facilities. The value of the enumerator
-      is the number of the facility bit as per POP. */
-   enum {
-      S390_FAC_MSA    = 17,  // message-security-assist
-      S390_FAC_LDISP  = 18,  // long displacement
-      S390_FAC_HFPMAS = 20,  // HFP multiply-and-add-subtract
-      S390_FAC_EIMM   = 21,  // extended immediate
-      S390_FAC_HFPUNX = 23,  // HFP unnormalized extension
-      S390_FAC_ETF2   = 24,  // ETF2-enhancement
-      S390_FAC_PENH   = 26,  // parsing-enhancement
-      S390_FAC_ETF3   = 30,  // ETF3-enhancement
-      S390_FAC_XCPUT  = 31,  // extract-CPU-time
-      S390_FAC_GIE    = 34,  // general insn extension
-      S390_FAC_EXEXT  = 35,  // execute extension
-      S390_FAC_DFP    = 42,  // decimal floating point
-      S390_FAC_PFPO   = 44,  // perform floating point operation insn
-      S390_FAC_HIGHW  = 45,  // high-word extension
-      S390_FAC_DFPZC  = 48,  // DFP zoned-conversion
-      S390_FAC_MISC   = 49,  // miscellaneous insn
-      S390_FAC_CTREXE = 50,  // constrained transactional execution
-      S390_FAC_TREXE  = 73,  // transactional execution
-      S390_FAC_MSA4   = 77   // message-security-assist 4
-   };
-
    /* Now adjust the VM facilities according to what the VM supports */
    s390_set_facility_bit(addr, S390_FAC_LDISP,  1);
    s390_set_facility_bit(addr, S390_FAC_EIMM,   1);
index dde258934db7b3ca6ddddc0daac9a91358757188..ef790955f6b77ffbe589ec5f01f8f5d05c97fa4b 100644 (file)
@@ -3939,7 +3939,7 @@ s390_emit_SDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2)
 static UChar *
 s390_emit_LOCGR(UChar *p, UChar m3, UChar r1, UChar r2)
 {
-   vassert(s390_host_has_lscond);
+   vassert(s390_host_has_lsc);
    if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) {
       s390_disasm(ENC4(MNM, GPR, GPR, UINT), "locgr", r1, r2, m3);
    }
@@ -7435,7 +7435,7 @@ s390_insn_cond_move_emit(UChar *buf, const s390_insn *insn)
 
    p = buf;
 
-   if (s390_host_has_lscond) {
+   if (s390_host_has_lsc) {
       /* LOCx is not the preferred way to implement an unconditional load. */
       if (cond != S390_CC_ALWAYS) goto use_branch_insn;
 
index c3aacde07efd6daa76e5055298a629b6dbf65888..2a24d5c5a372316bfb33a7c43ae01710fdae073c 100644 (file)
@@ -694,8 +694,8 @@ extern UInt s390_host_hwcaps;
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_STCKF))
 #define s390_host_has_fpext \
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_FPEXT))
-#define s390_host_has_lscond \
-                      (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSCOND))
+#define s390_host_has_lsc \
+                      (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSC))
 
 #endif /* ndef __VEX_HOST_S390_DEFS_H */
 
index f4086627a1eeb5f70958f8c93c4877009f87ca34..b295bea8899f653a61ba452f3a1257085ea04ea8 100644 (file)
@@ -1302,7 +1302,7 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps )
      p = p + vex_sprintf(p, "-%s", facilities[8]);
    if (hwcaps & VEX_HWCAPS_S390X_FPEXT)
      p = p + vex_sprintf(p, "-%s", facilities[9]);
-   if (hwcaps & VEX_HWCAPS_S390X_LSCOND)
+   if (hwcaps & VEX_HWCAPS_S390X_LSC)
      p = p + vex_sprintf(p, "-%s", facilities[10]);
 
    /* If there are no facilities, add "zarch" */
index 8e096cd67dcd78cace2c85ac9a7d62e2aa167d4f..672a98a7d6121309293cb5859631599d27308a4d 100644 (file)
@@ -133,7 +133,7 @@ typedef
 #define VEX_HWCAPS_S390X_ETF3  (1<<13)  /* ETF3-enhancement facility */
 #define VEX_HWCAPS_S390X_STCKF (1<<14)  /* STCKF facility */
 #define VEX_HWCAPS_S390X_FPEXT (1<<15)  /* Floating point extension facility */
-#define VEX_HWCAPS_S390X_LSCOND (1<<16) /* Conditional load/store facility */
+#define VEX_HWCAPS_S390X_LSC   (1<<16)  /* Conditional load/store facility */
 
 /* Special value representing all available s390x hwcaps */
 #define VEX_HWCAPS_S390X_ALL   (VEX_HWCAPS_S390X_LDISP | \
@@ -144,7 +144,7 @@ typedef
                                 VEX_HWCAPS_S390X_STFLE | \
                                 VEX_HWCAPS_S390X_STCKF | \
                                 VEX_HWCAPS_S390X_FPEXT | \
-                                VEX_HWCAPS_S390X_LSCOND| \
+                                VEX_HWCAPS_S390X_LSC   | \
                                 VEX_HWCAPS_S390X_ETF3  | \
                                 VEX_HWCAPS_S390X_ETF2)
 
index 332cca5ff6ef5236797e3430eacb4ff3e447f4cb..0a8f44297d149d51ad10b9092052ceb596afa79d 100644 (file)
 #define S390_INNERLOOP_FRAME_SIZE ((8+2+2)*8 + 160)
 
 
+/*--------------------------------------------------------------*/
+/*--- Facility bits                                          ---*/
+/*--------------------------------------------------------------*/
+
+/* The value of the macro is the number of the facility bit as per POP. */
+#define S390_FAC_MSA     17  // message-security-assist
+#define S390_FAC_LDISP   18  // long displacement
+#define S390_FAC_HFPMAS  20  // HFP multiply-and-add-subtract
+#define S390_FAC_EIMM    21  // extended immediate
+#define S390_FAC_HFPUNX  23  // HFP unnormalized extension
+#define S390_FAC_ETF2    24  // ETF2-enhancement
+#define S390_FAC_STCKF   25  // store clock fast insn
+#define S390_FAC_PENH    26  // parsing-enhancement
+#define S390_FAC_ETF3    30  // ETF3-enhancement
+#define S390_FAC_XCPUT   31  // extract-CPU-time
+#define S390_FAC_GIE     34  // general insn extension
+#define S390_FAC_EXEXT   35  // execute extension
+#define S390_FAC_FPEXT   37  // floating-point extension
+#define S390_FAC_FPSE    41  // floating-point support enhancement
+#define S390_FAC_DFP     42  // decimal floating point
+#define S390_FAC_PFPO    44  // perform floating point operation insn
+#define S390_FAC_HIGHW   45  // high-word extension
+#define S390_FAC_LSC     45  // load/store on condition
+#define S390_FAC_DFPZC   48  // DFP zoned-conversion
+#define S390_FAC_MISC    49  // miscellaneous insn
+#define S390_FAC_CTREXE  50  // constrained transactional execution
+#define S390_FAC_TREXE   73  // transactional execution
+#define S390_FAC_MSA4    77  // message-security-assist 4
+
+
 /*--------------------------------------------------------------*/
 /*--- Miscellaneous                                          ---*/
 /*--------------------------------------------------------------*/