]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: Tidy and a bit of constification
authorFlorian Krohm <flo2030@eich-krohm.de>
Thu, 27 Nov 2025 21:21:59 +0000 (21:21 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Thu, 27 Nov 2025 21:22:23 +0000 (21:22 +0000)
VEX/priv/host_s390_defs.c
VEX/priv/host_s390_defs.h
coregrind/m_machine.c

index 96c566823b7edd8859c778ca0b6b0e9f6f5d77db..063ede22af19ee442a573b68d77805aa0cb06192 100644 (file)
@@ -322,7 +322,8 @@ is_virtual_gpr(HReg reg)
 
 /* Helper function for all vector operations */
 static UChar
-s390_getM_from_size(const UChar size) {
+s390_getM_from_size(const UChar size)
+{
    switch(size) {
    case 1:
       return 0;
@@ -342,7 +343,8 @@ s390_getM_from_size(const UChar size) {
 
 /* Helper for generating RXB field in vector instructions */
 static UChar
-s390_update_rxb(const UChar rxb, const UChar index, UChar* vr) {
+s390_update_rxb(const UChar rxb, const UChar index, UChar* vr)
+{
    vassert((index >= 1) && (index <= 4));
    UChar result = rxb;
    if(vr != NULL) {
@@ -684,7 +686,8 @@ no_match:
    return NULL;
 }
 
-s390_insn* genMove_S390(HReg from, HReg to, Bool mode64)
+s390_insn *
+genMove_S390(HReg from, HReg to, Bool mode64)
 {
    switch (hregClass(from)) {
    case HRcInt64:
@@ -6822,7 +6825,7 @@ s390_insn_profinc(void)
 
 s390_insn *
 s390_insn_vec_amodeop(UChar size, s390_vec_amodeop_t tag, HReg dst, HReg op1,
-                    s390_amode *op2)
+                      s390_amode *op2)
 {
    s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn));
 
@@ -6838,8 +6841,9 @@ s390_insn_vec_amodeop(UChar size, s390_vec_amodeop_t tag, HReg dst, HReg op1,
    return insn;
 }
 
-s390_insn *s390_insn_vec_amodeintop(UChar size, s390_vec_amodeintop_t tag, HReg dst,
-                                    s390_amode* op2, HReg op3)
+s390_insn *
+s390_insn_vec_amodeintop(UChar size, s390_vec_amodeintop_t tag, HReg dst,
+                         s390_amode* op2, HReg op3)
 {
    s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn));
 
@@ -6855,8 +6859,9 @@ s390_insn *s390_insn_vec_amodeintop(UChar size, s390_vec_amodeintop_t tag, HReg
    return insn;
 }
 
-s390_insn *s390_insn_vec_binop(UChar size, s390_vec_binop_t tag, HReg dst,
-                               HReg op1, HReg op2)
+s390_insn *
+s390_insn_vec_binop(UChar size, s390_vec_binop_t tag, HReg dst,
+                    HReg op1, HReg op2)
 {
    s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn));
 
@@ -6872,8 +6877,9 @@ s390_insn *s390_insn_vec_binop(UChar size, s390_vec_binop_t tag, HReg dst,
    return insn;
 }
 
-s390_insn *s390_insn_vec_triop(UChar size, s390_vec_triop_t tag, HReg dst,
-                               HReg op1, HReg op2, HReg op3)
+s390_insn *
+s390_insn_vec_triop(UChar size, s390_vec_triop_t tag, HReg dst,
+                    HReg op1, HReg op2, HReg op3)
 {
    s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn));
 
@@ -6889,8 +6895,8 @@ s390_insn *s390_insn_vec_triop(UChar size, s390_vec_triop_t tag, HReg dst,
    return insn;
 }
 
-s390_insn *s390_insn_vec_replicate(UChar size, HReg dst, HReg op1,
-                                   UChar idx)
+s390_insn *
+s390_insn_vec_replicate(UChar size, HReg dst, HReg op1, UChar idx)
 {
    s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn));
 
index f089eac9a1ce52147d5f242c23432bd9709ed74e..48ea79f18d86a313b11d5e20322611ebecbe7adc 100644 (file)
@@ -890,8 +890,8 @@ Int   emit_S390Instr       ( Bool *, UChar *, Int, const s390_insn *, Bool,
 const RRegUniverse *getRRegUniverse_S390( void );
 void  genSpill_S390        ( HInstr **, HInstr **, HReg , Int , Bool );
 void  genReload_S390       ( HInstr **, HInstr **, HReg , Int , Bool );
-HInstrdirectReload_S390  ( HInstr *, HReg, Short );
-extern s390_insn* genMove_S390(HReg from, HReg to, Bool mode64);
+HInstr *directReload_S390  ( HInstr *, HReg, Short );
+s390_insn *genMove_S390    ( HReg from, HReg to, Bool mode64);
 HInstrArray *iselSB_S390   ( const IRSB *, VexArch, const VexArchInfo *,
                              const VexAbiInfo *, Int, Int, Bool, Bool, Addr);
 
index 01a50c9b2c0c89c26eba7d6de591628f65316b8d..860ce1f9ddbe14eeeb29a98fb19fa4a57bcd9e74 100644 (file)
@@ -602,7 +602,7 @@ static UInt VG_(get_machine_model)(void)
 {
    static struct model_map {
       const HChar name[5];
-      UInt  id;
+      const UInt  id;
    } model_map[] = {
       { "2064", VEX_S390X_MODEL_Z900 },
       { "2066", VEX_S390X_MODEL_Z800 },
@@ -1561,9 +1561,9 @@ Bool VG_(machine_get_hwcaps)( void )
      /* Detect presence of certain facilities using the STFLE insn. */
      struct fac_hwcaps_map {
         UInt installed;
-        UInt facility_bit;
-        UInt hwcaps_bit;
-        const HChar name[6];   // may need adjustment for new facility names
+        const UInt facility_bit;
+        const UInt hwcaps_bit;
+        const HChar name[5];   // may need adjustment for new facility names
      } fac_hwcaps[] = {
         { False, 129,  VEX_HWCAPS_S390X_VX,    "VX"    },
         { False,  57,  VEX_HWCAPS_S390X_MSA5,  "MSA5"  },