Author: sewardj
Date: 2008-03-04 22:10:54 +0000 (Tue, 04 Mar 2008)
New Revision: 7567

Log:
Change the type SegmentSet to a 32-bit value; it doesn't need to be
64-bit.



Modified:
   branches/HGDEV/helgrind/hg_main.c


Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c   2008-03-04 21:45:07 UTC (rev 7566)
+++ branches/HGDEV/helgrind/hg_main.c   2008-03-04 22:10:54 UTC (rev 7567)
@@ -1030,15 +1030,15 @@
 #define SHVAL_Invalid   ((SVal)(0))
 #define SHVAL_Race      ((SVal)(1ULL << 62))
 
-typedef  ULong      SegmentSet;
-typedef  WordSetID  LockSet;
+typedef  UInt       SegmentSet;
+typedef  WordSetID  LockSet;  /* UInt */
 
 static inline Bool SS_valid (SegmentSet ss) {
-   return ss < (1ULL << SEGMENT_SET_BITS);
+   return ss < (1 << SEGMENT_SET_BITS);
 }
 
 static inline Bool SS_is_singleton (SegmentSet ss) {
-   return (ss & (1ULL << (SEGMENT_SET_BITS-1))) != 0;
+   return (ss & (1 << (SEGMENT_SET_BITS-1))) != 0;
 }
 
 static inline UWord SS_get_size (SegmentSet ss) {
@@ -1049,14 +1049,14 @@
 
 static inline SegmentSet SS_mk_singleton (SegmentID ss) {
    tl_assert(SEG_id_is_sane(ss));
-   ss |= (1ULL << (SEGMENT_SET_BITS-1));
+   ss |= (1 << (SEGMENT_SET_BITS-1));
    tl_assert(SS_is_singleton(ss));
    return ss;
 }
 
 static inline SegmentID SS_get_singleton (SegmentSet ss) {
    tl_assert(SS_is_singleton(ss));
-   ss &= ~(1ULL << (SEGMENT_SET_BITS-1));
+   ss &= ~(1 << (SEGMENT_SET_BITS-1));
    tl_assert(SEG_id_is_sane(ss));
    return ss;
 }
@@ -1071,7 +1071,7 @@
 }
 
 static inline Bool LS_valid (LockSet ls) {
-   return ls < (1ULL << LOCK_SET_BITS);
+   return ls < (1 << LOCK_SET_BITS);
 }
 
 static inline SVal mk_SHVAL_RW (Bool is_w, SegmentSet ss, LockSet ls) {
@@ -1108,15 +1108,15 @@
 }
 
 static inline Bool is_SHVAL_RW (SVal sv) {
-  return (sv >> 63) != 0;
+   return (sv >> 63) != 0;
 } 
 static inline Bool is_SHVAL_R (SVal sv) {
-  tl_assert(is_SHVAL_RW(sv));
-  return ((sv >> 62) & 1) == 0;
+   tl_assert(is_SHVAL_RW(sv));
+   return ((sv >> 62) & 1) == 0;
 }
 static inline Bool is_SHVAL_W (SVal sv) {
-  tl_assert(is_SHVAL_RW(sv));
-  return ((sv >> 62) & 1) == 1;
+   tl_assert(is_SHVAL_RW(sv));
+   return ((sv >> 62) & 1) == 1;
 }
 
 static inline Bool is_SHVAL_Shared (SVal sv) {


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to