5 Commits 05f8d18c19 ... 21cbe82ef2

Author SHA1 Message Date
  Matthew Wette 21cbe82ef2 comment-out debugging print 1 year ago
  Matthew Wette bf5a0c0872 updates for vg 21.0 1 year ago
  Matthew Wette 97629680a3 cputil: cleaned up demo programs 1 year ago
  Matthew Wette cd0ea8f0ed cuts: default 750a was broken, many out of order 1 year ago
  Matthew Wette 2ee83eb679 cu_main: cleaned up compile warnings 1 year ago
10 changed files with 194 additions and 126 deletions
  1. 16 0
      Makefile.in
  2. 8 8
      README.md
  3. 31 28
      cu_main.c
  4. 38 41
      cuts/default.cut
  5. 41 37
      cuts/ppc750a.cut
  6. 4 1
      mindist.in
  7. 4 4
      tests/Makefile.am
  8. 32 7
      tests/Makefile.in
  9. 20 0
      tests/changecnt
  10. 0 0
      tests/demo1.c

+ 16 - 0
Makefile.in

@@ -351,16 +351,31 @@ FLAG_W_IGNORED_QUALIFIERS = @FLAG_W_IGNORED_QUALIFIERS@
 FLAG_W_IMPLICIT_FALLTHROUGH = @FLAG_W_IMPLICIT_FALLTHROUGH@
 FLAG_W_LOGICAL_OP = @FLAG_W_LOGICAL_OP@
 FLAG_W_MISSING_PARAMETER_TYPE = @FLAG_W_MISSING_PARAMETER_TYPE@
+FLAG_W_NO_ALLOC_SIZE_LARGER_THAN = @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@
+FLAG_W_NO_BUILTIN_MEMCPY_CHK_SIZE = @FLAG_W_NO_BUILTIN_MEMCPY_CHK_SIZE@
 FLAG_W_NO_EXPANSION_TO_DEFINED = @FLAG_W_NO_EXPANSION_TO_DEFINED@
+FLAG_W_NO_FORMAT_OVERFLOW = @FLAG_W_NO_FORMAT_OVERFLOW@
+FLAG_W_NO_FORTIFY_SOURCE = @FLAG_W_NO_FORTIFY_SOURCE@
+FLAG_W_NO_FREE_NONHEAP_OBJECT = @FLAG_W_NO_FREE_NONHEAP_OBJECT@
+FLAG_W_NO_INCOMPATIBLE_POINTER_TYPES_DISCARDS_QUALIFIERS = @FLAG_W_NO_INCOMPATIBLE_POINTER_TYPES_DISCARDS_QUALIFIERS@
 FLAG_W_NO_INFINITE_RECURSION = @FLAG_W_NO_INFINITE_RECURSION@
+FLAG_W_NO_MAYBE_UNINITIALIZED = @FLAG_W_NO_MAYBE_UNINITIALIZED@
 FLAG_W_NO_MEMSET_TRANSPOSED_ARGS = @FLAG_W_NO_MEMSET_TRANSPOSED_ARGS@
 FLAG_W_NO_MISMATCHED_NEW_DELETE = @FLAG_W_NO_MISMATCHED_NEW_DELETE@
 FLAG_W_NO_NONNULL = @FLAG_W_NO_NONNULL@
+FLAG_W_NO_NON_POWER_OF_TWO_ALIGNMENT = @FLAG_W_NO_NON_POWER_OF_TWO_ALIGNMENT@
 FLAG_W_NO_OVERFLOW = @FLAG_W_NO_OVERFLOW@
 FLAG_W_NO_POINTER_SIGN = @FLAG_W_NO_POINTER_SIGN@
+FLAG_W_NO_SIGN_COMPARE = @FLAG_W_NO_SIGN_COMPARE@
 FLAG_W_NO_STATIC_LOCAL_IN_INLINE = @FLAG_W_NO_STATIC_LOCAL_IN_INLINE@
+FLAG_W_NO_STRINGOP_OVERFLOW = @FLAG_W_NO_STRINGOP_OVERFLOW@
+FLAG_W_NO_STRINGOP_OVERREAD = @FLAG_W_NO_STRINGOP_OVERREAD@
+FLAG_W_NO_STRINGOP_TRUNCATION = @FLAG_W_NO_STRINGOP_TRUNCATION@
+FLAG_W_NO_SUSPICIOUS_BZERO = @FLAG_W_NO_SUSPICIOUS_BZERO@
 FLAG_W_NO_UNINITIALIZED = @FLAG_W_NO_UNINITIALIZED@
+FLAG_W_NO_UNUSED_BUT_SET_VARIABLE = @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@
 FLAG_W_NO_UNUSED_FUNCTION = @FLAG_W_NO_UNUSED_FUNCTION@
+FLAG_W_NO_USE_AFTER_FREE = @FLAG_W_NO_USE_AFTER_FREE@
 FLAG_W_OLD_STYLE_DECLARATION = @FLAG_W_OLD_STYLE_DECLARATION@
 FLAG_W_WRITE_STRINGS = @FLAG_W_WRITE_STRINGS@
 GDB = @GDB@
@@ -411,6 +426,7 @@ PREFERRED_STACK_BOUNDARY_2 = @PREFERRED_STACK_BOUNDARY_2@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
+SHA256SUM = @SHA256SUM@
 SHELL = @SHELL@
 SOLARIS_UNDEF_LARGESOURCE = @SOLARIS_UNDEF_LARGESOURCE@
 STRIP = @STRIP@

+ 8 - 8
README.md

@@ -39,15 +39,15 @@ int main() {
 
 ## Installation
 
-This works with valgrind-3.20.0.  I assume it will work with 3.20.X.
+This works with valgrind-3.21.0.  I assume it will work with 3.21.X.
 To work with older versions of valgrind, try other git branches.
 
 To install:
 
-1. Download and unpack valgrind-3.20.X
+1. Download and unpack valgrind-3.21.X
 
 2. Clone or otherwise install this cputil distribution in a directory
-   called *cputil* under valgrind-3.20.X
+   called *cputil* under valgrind-3.21.X
 
 3. In the valgrind top-level directory execute:
    ```
@@ -69,18 +69,18 @@ To install:
    ```
 
 4b. Optionally, if you want a minimal distribution, use this sequence,
-    using /var/tmp/bindist as a place to install the distribution:
+    using /var/tmp/mindist as a place to install the distribution:
    ```
    $ ./configure --prefix=/usr/local
    $ make 
-   $ mkdir -p /var/tmp/bindist
-   $ make DESTDIR=/var/tmp/bindist/ install
-   $ sh cputil/mindist DESTDIR=/var/tmp/bindist
+   $ mkdir -p /var/tmp/mindist
+   $ make DESTDIR=/var/tmp/mindist/ install
+   $ sh cputil/mindist DESTDIR=/var/tmp/mindist
    ```
    The above will generate a distribution.  To install, become root if 
    necessary, then execute the following:
    ```
-   # cd /var/tmp/bindist
+   # cd /var/tmp/mindist
    # cd usr/local
    # tar cf - . | (cd /usr/local; tar xvf -)
    ```

+ 31 - 28
cu_main.c

@@ -1,6 +1,6 @@
 /* cu_main.c - execution profiler under valgrind
 
-   Copyright (C) 2013,2015-2017,2021 Matthew R. Wette
+   Copyright (C) 2013,2015-2017,2021,2023 Matthew Wette
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -33,7 +33,7 @@
 #include "pub_tool_threadstate.h"
 #include "cputildefs.h"
 
-static const HChar cu_version[] = "v210627a";
+static const HChar cu_version[] = "v231209a";
 
 /*------------------------------------------------------------*/
 /*--- Instrumentation                                      ---*/
@@ -375,30 +375,29 @@ static UShort cu_op_counts[] = {
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 2, 2, 2, 31, 1, 1, 1, 17, 2, 2, 3, 31, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 8, 64, 99, 99, 99, 99, 4, 4, 2, 1,
-   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 99, 1, 1, 99, 99, 99, 99, 99, 99, 99,
-   99, 99, 99, 31, 31, 31, 31, 1, 1, 99, 99, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
-   5, 2, 2, 2, 2, 2, 2, 5, 5, 99, 99, 99, 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 8, 64, 1, 1, 1, 1, 4, 4, 2, 1, 1,
+   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 31,
+   31, 31, 31, 1, 1, 50, 50, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2,
+   2, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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,
-   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 99, 99, 99, 99, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+   1, 1, 1, 1, 1, 99, 99, 99, 99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-   2, 31, 1, 1, 1, 17, 1, 1, 1, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 31, 1, 1, 1, 17, 1, 1, 1,
+   1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 0,
 };
 
 #define NUM_LD 16
@@ -445,6 +445,7 @@ static Int cu_expr_cnt(IRExpr *expr)
    IROp op;
    IRType ty;
 
+   op = Iop_INVALID;
    switch (expr->tag) {
       case Iex_Binder: return 0;
       case Iex_Get: return 0;
@@ -475,6 +476,7 @@ static Int cu_expr_cnt(IRExpr *expr)
       VG_(printf)("bogus count for op: ~%s\n", cu_op_names[op - Iop_INVALID]);
       return 0;
    } else {
+      //VG_(printf)("op: %s\n", cu_op_names[op - Iop_INVALID]);
       return cu_op_counts[op - Iop_INVALID];
    }
 }
@@ -623,6 +625,7 @@ IRSB* cu_instrument ( VgCallbackClosure* closure,
     * remove the small number of clock cycles to implement clientrequest.
     */
    lclkcnt = cu_divisor;	/* Count the clocks to branch here. */
+   lastst = Ist_Exit;
    for (/*use current i*/; i < sbIn->stmts_used; i++) {
       IRStmt* st = sbIn->stmts[i];
       if (!st || st->tag == Ist_NoOp) continue;
@@ -741,7 +744,7 @@ IRSB* cu_instrument ( VgCallbackClosure* closure,
             addStmtToIRSB( sbOut, st );
             break;
          default:
-	    VG_(printf)("cu_main: st->tag=%d\n", st->tag);
+	    VG_(printf)("cu_main: st->tag=%u\n", st->tag);
             tl_assert(0);
       }
       lastst = st->tag;
@@ -978,7 +981,7 @@ static Bool cu_load_op_table(const HChar *filename)
       if (0 <= cval && cval <= 1999) {	/* arbitrary max clock count */
          cu_ld_counts[ix] = cval;
       } else {
-	 VG_(umsg)("invalid clock count: %d, line %d\n", cval, ln);
+	 VG_(umsg)("invalid clock count: %u, line %d\n", cval, ln);
 	 VG_(umsg)("          expect in: [0,1999]\n");
 	 return False;
       }
@@ -1006,7 +1009,7 @@ static Bool cu_load_op_table(const HChar *filename)
       if (0 <= cval && cval <= 1999) {	/* arbitrary max clock count */
          cu_op_counts[ix] = cval;
       } else {
-	 VG_(umsg)("invalid clock count: %d, line %d\n", cval, ln);
+	 VG_(umsg)("invalid clock count: %u, line %d\n", cval, ln);
 	 VG_(umsg)("          expect in: [0,1999]\n");
 	 return False;
       }

+ 38 - 41
cuts/default.cut

@@ -1,7 +1,4 @@
-# default valgrind/cputil count table
-# for valgrind-3.18.1
-#
-# ppc750 rough estimate
+# ppc750 valgrind/cputil count table
 #
 1	divisor
 #
@@ -245,10 +242,10 @@
 4	Iop_SubF128
 8	Iop_MulF128
 64	Iop_DivF128
-99	Iop_MAddF128
-99	Iop_MSubF128
-99	Iop_NegMAddF128
-99	Iop_NegMSubF128
+1	Iop_MAddF128
+1	Iop_MSubF128
+1	Iop_NegMAddF128
+1	Iop_NegMSubF128
 4	Iop_NegF128
 4	Iop_AbsF128
 2	Iop_SqrtF128
@@ -264,27 +261,27 @@
 1	Iop_F128toI64S
 1	Iop_F128toI32U
 1	Iop_F128toI64U
-99	Iop_F128toI128S
+1	Iop_F128toI128S
 1	Iop_F128toF64
 1	Iop_F128toF32
-99	Iop_RndF128
-99	Iop_TruncF128toI32S
-99	Iop_TruncF128toI32U
-99	Iop_TruncF128toI64U
-99	Iop_TruncF128toI64S
-99	Iop_TruncF128toI128U
-99	Iop_TruncF128toI128S
-99	Iop_AtanF64
-99	Iop_Yl2xF64
-99	Iop_Yl2xp1F64
+1	Iop_RndF128
+1	Iop_TruncF128toI32S
+1	Iop_TruncF128toI32U
+1	Iop_TruncF128toI64U
+1	Iop_TruncF128toI64S
+1	Iop_TruncF128toI128U
+1	Iop_TruncF128toI128S
+1	Iop_AtanF64
+1	Iop_Yl2xF64
+1	Iop_Yl2xp1F64
 31	Iop_PRemF64
 31	Iop_PRemC3210F64
 31	Iop_PRem1F64
 31	Iop_PRem1C3210F64
 1	Iop_ScaleF64
 1	Iop_SinF64
-99	Iop_CosF64
-99	Iop_TanF64
+50	Iop_CosF64
+50	Iop_TanF64
 1	Iop_2xm1F64
 1	Iop_RoundF128toInt
 1	Iop_RoundF64toInt
@@ -304,10 +301,10 @@
 2	Iop_RoundF64toF32
 5	Iop_RecpExpF64
 5	Iop_RecpExpF32
-99	Iop_MaxNumF64
-99	Iop_MinNumF64
-99	Iop_MaxNumF32
-99	Iop_MinNumF32
+1	Iop_MaxNumF64
+1	Iop_MinNumF64
+1	Iop_MaxNumF32
+1	Iop_MinNumF32
 1	Iop_F16toF64
 1	Iop_F64toF16
 1	Iop_F16toF32
@@ -414,7 +411,7 @@
 2	Iop_Mul32Fx2
 1	Iop_MulHi16Ux4
 1	Iop_MulHi16Sx4
-99	Iop_PolynomialMul8x8
+1	Iop_PolynomialMul8x8
 1	Iop_QDMulHi16Sx4
 1	Iop_QDMulHi32Sx2
 1	Iop_QRDMulHi16Sx4
@@ -450,10 +447,10 @@
 0	Iop_Cls16x4
 0	Iop_Cls32x2
 1	Iop_Clz64x2
-99	Iop_Ctz8x16
-99	Iop_Ctz16x8
-99	Iop_Ctz32x4
-99	Iop_Ctz64x2
+1	Iop_Ctz8x16
+1	Iop_Ctz16x8
+1	Iop_Ctz32x4
+1	Iop_Ctz64x2
 1	Iop_Shl8x8
 1	Iop_Shl16x4
 1	Iop_Shl32x2
@@ -588,7 +585,7 @@
 2	Iop_D128toF32
 2	Iop_D128toF64
 2	Iop_D128toF128
-0	Iop_RoundD64toInt
+2	Iop_RoundD64toInt
 2	Iop_RoundD128toInt
 1	Iop_CmpD64
 1	Iop_CmpD128
@@ -611,18 +608,18 @@
 1	Iop_BCDtoDPB
 1	Iop_BCDAdd
 1	Iop_BCDSub
-99	Iop_I128StoBCD128
-99	Iop_BCD128toI128S
+1	Iop_I128StoBCD128
+1	Iop_BCD128toI128S
 1	Iop_ReinterpI64asD64
 1	Iop_ReinterpD64asI64
-1	Iop_Sqrt16Fx8
-1	Iop_Add16Fx8
-1	Iop_Sub16Fx8
-1	Iop_CmpLT16Fx8
-1	Iop_CmpLE16Fx8
-1	Iop_CmpEQ16Fx8
-1	Iop_Abs16Fx8
-1	Iop_Neg16Fx8
+9	Iop_Sqrt16Fx8
+9	Iop_Add16Fx8
+9	Iop_Sub16Fx8
+9	Iop_CmpLT16Fx8
+9	Iop_CmpLE16Fx8
+9	Iop_CmpEQ16Fx8
+9	Iop_Abs16Fx8
+9	Iop_Neg16Fx8
 1	Iop_Add32Fx4
 1	Iop_Sub32Fx4
 2	Iop_Mul32Fx4

+ 41 - 37
cuts/ppc750a.cut

@@ -1,7 +1,4 @@
-# default valgrind/cputil count table
-# for valgrind-3.17.0
-#
-# ppc750 rough estimate
+# ppc750 valgrind/cputil count table
 #
 1	divisor
 #
@@ -205,8 +202,11 @@
 3	Iop_SqrtF64
 3	Iop_SqrtF32
 3	Iop_SqrtF16
+1	Iop_SubF16
+1	Iop_AddF16
 1	Iop_CmpF64
 1	Iop_CmpF32
+1	Iop_CmpF16
 1	Iop_CmpF128
 1	Iop_F64toI16S
 1	Iop_F64toI32S
@@ -242,10 +242,10 @@
 4	Iop_SubF128
 8	Iop_MulF128
 64	Iop_DivF128
-99	Iop_MAddF128
-99	Iop_MSubF128
-99	Iop_NegMAddF128
-99	Iop_NegMSubF128
+1	Iop_MAddF128
+1	Iop_MSubF128
+1	Iop_NegMAddF128
+1	Iop_NegMSubF128
 4	Iop_NegF128
 4	Iop_AbsF128
 2	Iop_SqrtF128
@@ -261,27 +261,27 @@
 1	Iop_F128toI64S
 1	Iop_F128toI32U
 1	Iop_F128toI64U
-99	Iop_F128toI128S
+1	Iop_F128toI128S
 1	Iop_F128toF64
 1	Iop_F128toF32
-99	Iop_RndF128
-99	Iop_TruncF128toI32S
-99	Iop_TruncF128toI32U
-99	Iop_TruncF128toI64U
-99	Iop_TruncF128toI64S
-99	Iop_TruncF128toI128U
-99	Iop_TruncF128toI128S
-99	Iop_AtanF64
-99	Iop_Yl2xF64
-99	Iop_Yl2xp1F64
+1	Iop_RndF128
+1	Iop_TruncF128toI32S
+1	Iop_TruncF128toI32U
+1	Iop_TruncF128toI64U
+1	Iop_TruncF128toI64S
+1	Iop_TruncF128toI128U
+1	Iop_TruncF128toI128S
+1	Iop_AtanF64
+1	Iop_Yl2xF64
+1	Iop_Yl2xp1F64
 31	Iop_PRemF64
 31	Iop_PRemC3210F64
 31	Iop_PRem1F64
 31	Iop_PRem1C3210F64
 1	Iop_ScaleF64
 1	Iop_SinF64
-99	Iop_CosF64
-99	Iop_TanF64
+50	Iop_CosF64
+50	Iop_TanF64
 1	Iop_2xm1F64
 1	Iop_RoundF128toInt
 1	Iop_RoundF64toInt
@@ -301,10 +301,10 @@
 2	Iop_RoundF64toF32
 5	Iop_RecpExpF64
 5	Iop_RecpExpF32
-99	Iop_MaxNumF64
-99	Iop_MinNumF64
-99	Iop_MaxNumF32
-99	Iop_MinNumF32
+1	Iop_MaxNumF64
+1	Iop_MinNumF64
+1	Iop_MaxNumF32
+1	Iop_MinNumF32
 1	Iop_F16toF64
 1	Iop_F64toF16
 1	Iop_F16toF32
@@ -411,7 +411,7 @@
 2	Iop_Mul32Fx2
 1	Iop_MulHi16Ux4
 1	Iop_MulHi16Sx4
-99	Iop_PolynomialMul8x8
+1	Iop_PolynomialMul8x8
 1	Iop_QDMulHi16Sx4
 1	Iop_QDMulHi32Sx2
 1	Iop_QRDMulHi16Sx4
@@ -447,10 +447,10 @@
 0	Iop_Cls16x4
 0	Iop_Cls32x2
 1	Iop_Clz64x2
-99	Iop_Ctz8x16
-99	Iop_Ctz16x8
-99	Iop_Ctz32x4
-99	Iop_Ctz64x2
+1	Iop_Ctz8x16
+1	Iop_Ctz16x8
+1	Iop_Ctz32x4
+1	Iop_Ctz64x2
 1	Iop_Shl8x8
 1	Iop_Shl16x4
 1	Iop_Shl32x2
@@ -585,7 +585,7 @@
 2	Iop_D128toF32
 2	Iop_D128toF64
 2	Iop_D128toF128
-0	Iop_RoundD64toInt
+2	Iop_RoundD64toInt
 2	Iop_RoundD128toInt
 1	Iop_CmpD64
 1	Iop_CmpD128
@@ -608,11 +608,18 @@
 1	Iop_BCDtoDPB
 1	Iop_BCDAdd
 1	Iop_BCDSub
-99	Iop_I128StoBCD128
-99	Iop_BCD128toI128S
+1	Iop_I128StoBCD128
+1	Iop_BCD128toI128S
 1	Iop_ReinterpI64asD64
 1	Iop_ReinterpD64asI64
-1	Iop_Add16Fx8
+9	Iop_Sqrt16Fx8
+9	Iop_Add16Fx8
+9	Iop_Sub16Fx8
+9	Iop_CmpLT16Fx8
+9	Iop_CmpLE16Fx8
+9	Iop_CmpEQ16Fx8
+9	Iop_Abs16Fx8
+9	Iop_Neg16Fx8
 1	Iop_Add32Fx4
 1	Iop_Sub32Fx4
 2	Iop_Mul32Fx4
@@ -629,11 +636,8 @@
 1	Iop_CmpGE32Fx4
 1	Iop_PwMax32Fx4
 1	Iop_PwMin32Fx4
-1	Iop_Abs16Fx8
 1	Iop_Abs32Fx4
-1	Iop_Neg16Fx8
 1	Iop_Neg32Fx4
-2	Iop_Sqrt16Fx8
 2	Iop_Sqrt32Fx4
 1	Iop_RecipEst32Fx4
 1	Iop_RecipStep32Fx4

+ 4 - 1
mindist.in

@@ -18,7 +18,7 @@ includedir=@includedir@
 fail () {
   echo "usage: mindist DESTDIR=<dir>"
   echo "example:"
-  echo "       mindist DESTDIR=/var/tmp/bindist"
+  echo "       mindist DESTDIR=/var/tmp/mindist"
   exit 1
 }
 
@@ -88,6 +88,9 @@ rm -f $lib/libmpiwrap*.so
 rm -f $exe/dh*
 rm -f $exe/*.xml
 
+rm -f $exe/valgrind-monitor-def.py
+rm -f $exe/valgrind-monitor.py
+
 if [ ! -d $cu_exe ]; then mv $exe $cu_exe; fi
 
 # cleanup

+ 4 - 4
tests/Makefile.am

@@ -4,11 +4,11 @@ include $(top_srcdir)/Makefile.tool-tests.am
 SUBDIRS = .
 DIST_SUBDIRS = .
 
-check_PROGRAMS = demo1
-
-EXTRA_DIST = \
-	demo1a.vgtest demo1b.vgtest
+check_PROGRAMS = demo1 demo2
 
 AM_CFLAGS   += -I..
+# consider -mno-sse -mno-mmx
 
 demo1_LDADD = -lm
+demo2_LDADD = -lm
+

+ 32 - 7
tests/Makefile.in

@@ -123,7 +123,7 @@ host_triplet = @host@
 @COMPILER_IS_CLANG_TRUE@	-Wno-uninitialized -Wno-unused-value # \
 @COMPILER_IS_CLANG_TRUE@	clang 3.0.0
 @COMPILER_IS_CLANG_TRUE@am__append_11 = -Wno-unused-private-field    # drd/tests/tsan_unittest.cpp
-check_PROGRAMS = demo1$(EXEEXT)
+check_PROGRAMS = demo1$(EXEEXT) demo2$(EXEEXT)
 subdir = cputil/tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@@ -137,6 +137,9 @@ CONFIG_CLEAN_VPATH_FILES =
 demo1_SOURCES = demo1.c
 demo1_OBJECTS = demo1.$(OBJEXT)
 demo1_DEPENDENCIES =
+demo2_SOURCES = demo2.c
+demo2_OBJECTS = demo2.$(OBJEXT)
+demo2_DEPENDENCIES =
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -152,7 +155,7 @@ am__v_at_1 =
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/demo1.Po
+am__depfiles_remade = ./$(DEPDIR)/demo1.Po ./$(DEPDIR)/demo2.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -166,8 +169,8 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = demo1.c
-DIST_SOURCES = demo1.c
+SOURCES = demo1.c demo2.c
+DIST_SOURCES = demo1.c demo2.c
 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
 	ctags-recursive dvi-recursive html-recursive info-recursive \
 	install-data-recursive install-dvi-recursive \
@@ -301,16 +304,31 @@ FLAG_W_IGNORED_QUALIFIERS = @FLAG_W_IGNORED_QUALIFIERS@
 FLAG_W_IMPLICIT_FALLTHROUGH = @FLAG_W_IMPLICIT_FALLTHROUGH@
 FLAG_W_LOGICAL_OP = @FLAG_W_LOGICAL_OP@
 FLAG_W_MISSING_PARAMETER_TYPE = @FLAG_W_MISSING_PARAMETER_TYPE@
+FLAG_W_NO_ALLOC_SIZE_LARGER_THAN = @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@
+FLAG_W_NO_BUILTIN_MEMCPY_CHK_SIZE = @FLAG_W_NO_BUILTIN_MEMCPY_CHK_SIZE@
 FLAG_W_NO_EXPANSION_TO_DEFINED = @FLAG_W_NO_EXPANSION_TO_DEFINED@
+FLAG_W_NO_FORMAT_OVERFLOW = @FLAG_W_NO_FORMAT_OVERFLOW@
+FLAG_W_NO_FORTIFY_SOURCE = @FLAG_W_NO_FORTIFY_SOURCE@
+FLAG_W_NO_FREE_NONHEAP_OBJECT = @FLAG_W_NO_FREE_NONHEAP_OBJECT@
+FLAG_W_NO_INCOMPATIBLE_POINTER_TYPES_DISCARDS_QUALIFIERS = @FLAG_W_NO_INCOMPATIBLE_POINTER_TYPES_DISCARDS_QUALIFIERS@
 FLAG_W_NO_INFINITE_RECURSION = @FLAG_W_NO_INFINITE_RECURSION@
+FLAG_W_NO_MAYBE_UNINITIALIZED = @FLAG_W_NO_MAYBE_UNINITIALIZED@
 FLAG_W_NO_MEMSET_TRANSPOSED_ARGS = @FLAG_W_NO_MEMSET_TRANSPOSED_ARGS@
 FLAG_W_NO_MISMATCHED_NEW_DELETE = @FLAG_W_NO_MISMATCHED_NEW_DELETE@
 FLAG_W_NO_NONNULL = @FLAG_W_NO_NONNULL@
+FLAG_W_NO_NON_POWER_OF_TWO_ALIGNMENT = @FLAG_W_NO_NON_POWER_OF_TWO_ALIGNMENT@
 FLAG_W_NO_OVERFLOW = @FLAG_W_NO_OVERFLOW@
 FLAG_W_NO_POINTER_SIGN = @FLAG_W_NO_POINTER_SIGN@
+FLAG_W_NO_SIGN_COMPARE = @FLAG_W_NO_SIGN_COMPARE@
 FLAG_W_NO_STATIC_LOCAL_IN_INLINE = @FLAG_W_NO_STATIC_LOCAL_IN_INLINE@
+FLAG_W_NO_STRINGOP_OVERFLOW = @FLAG_W_NO_STRINGOP_OVERFLOW@
+FLAG_W_NO_STRINGOP_OVERREAD = @FLAG_W_NO_STRINGOP_OVERREAD@
+FLAG_W_NO_STRINGOP_TRUNCATION = @FLAG_W_NO_STRINGOP_TRUNCATION@
+FLAG_W_NO_SUSPICIOUS_BZERO = @FLAG_W_NO_SUSPICIOUS_BZERO@
 FLAG_W_NO_UNINITIALIZED = @FLAG_W_NO_UNINITIALIZED@
+FLAG_W_NO_UNUSED_BUT_SET_VARIABLE = @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@
 FLAG_W_NO_UNUSED_FUNCTION = @FLAG_W_NO_UNUSED_FUNCTION@
+FLAG_W_NO_USE_AFTER_FREE = @FLAG_W_NO_USE_AFTER_FREE@
 FLAG_W_OLD_STYLE_DECLARATION = @FLAG_W_OLD_STYLE_DECLARATION@
 FLAG_W_WRITE_STRINGS = @FLAG_W_WRITE_STRINGS@
 GDB = @GDB@
@@ -361,6 +379,7 @@ PREFERRED_STACK_BOUNDARY_2 = @PREFERRED_STACK_BOUNDARY_2@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
+SHA256SUM = @SHA256SUM@
 SHELL = @SHELL@
 SOLARIS_UNDEF_LARGESOURCE = @SOLARIS_UNDEF_LARGESOURCE@
 STRIP = @STRIP@
@@ -654,10 +673,9 @@ AM_CCASFLAGS = $(AM_CPPFLAGS)
 @VGCONF_OS_IS_DARWIN_TRUE@noinst_DSYMS = $(check_PROGRAMS)
 SUBDIRS = .
 DIST_SUBDIRS = .
-EXTRA_DIST = \
-	demo1a.vgtest demo1b.vgtest
-
+# consider -mno-sse -mno-mmx
 demo1_LDADD = -lm
+demo2_LDADD = -lm
 all: all-recursive
 
 .SUFFIXES:
@@ -700,6 +718,10 @@ demo1$(EXEEXT): $(demo1_OBJECTS) $(demo1_DEPENDENCIES) $(EXTRA_demo1_DEPENDENCIE
 	@rm -f demo1$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(demo1_OBJECTS) $(demo1_LDADD) $(LIBS)
 
+demo2$(EXEEXT): $(demo2_OBJECTS) $(demo2_DEPENDENCIES) $(EXTRA_demo2_DEPENDENCIES) 
+	@rm -f demo2$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(demo2_OBJECTS) $(demo2_LDADD) $(LIBS)
+
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
 
@@ -707,6 +729,7 @@ distclean-compile:
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo2.Po@am__quote@ # am--include-marker
 
 $(am__depfiles_remade):
 	@$(MKDIR_P) $(@D)
@@ -929,6 +952,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-local mostlyclean-am
 
 distclean: distclean-recursive
 		-rm -f ./$(DEPDIR)/demo1.Po
+	-rm -f ./$(DEPDIR)/demo2.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -975,6 +999,7 @@ installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
 		-rm -f ./$(DEPDIR)/demo1.Po
+	-rm -f ./$(DEPDIR)/demo2.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 

+ 20 - 0
tests/changecnt

@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if [ ! $# -eq 4 ]; then
+    echo 'usage:   changecnt op cnt old.cnt new.cnt'
+    echo 'example: changecnt Iop_DivF64 100 dump.cnt load.cnt'
+    exit 1
+fi
+
+op=$1
+vl=$2
+dt=$3
+lt=$4
+
+sed -e "s/[0-9]*	Iop_$op\$/$vl	Iop_$op/" <$dt >$lt
+
+if cmp $dt $lt; then
+    echo "nothing changed"
+fi
+
+# --- last line ---

+ 0 - 0
tests/demo1.c


Some files were not shown because too many files changed in this diff