Changeset 177753 in webkit
- Timestamp:
- Dec 26, 2014, 5:17:01 PM (10 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r177746 r177753 1 2014-12-26 Dan Bernstein <mitz@apple.com> 2 3 Build fix. 4 5 Removed use of __builtin_s{add,sub}_overflow introduced in r177729 that was causing a compiler used at Apple to crash because of <rdar://problem/19347133>. 6 7 * wtf/SaturatedArithmetic.h: 8 (signedAddOverflows): 9 (signedSubtractOverflows): 10 1 11 2014-12-26 Dan Bernstein <mitz@apple.com> 2 12 -
trunk/Source/WTF/wtf/SaturatedArithmetic.h
r177736 r177753 40 40 inline bool signedAddOverflows(int32_t a, int32_t b, int32_t& result) 41 41 { 42 #if COMPILER_HAS_CLANG_BUILTIN(__builtin_sadd_overflow)43 return __builtin_sadd_overflow(a, b, &result);44 #else45 42 uint32_t ua = a; 46 43 uint32_t ub = b; … … 51 48 // bit of the result and one of the values differ it did overflow. 52 49 return !((ua ^ ub) >> 31) & (uresult ^ ua) >> 31; 53 #endif54 50 } 55 51 … … 72 68 inline bool signedSubtractOverflows(int32_t a, int32_t b, int32_t& result) 73 69 { 74 #if COMPILER_HAS_CLANG_BUILTIN(__builtin_ssub_overflow)75 return __builtin_ssub_overflow(a, b, &result);76 #else77 70 uint32_t ua = a; 78 71 uint32_t ub = b; … … 83 76 // signed bit of the result and the first value differ it did overflow. 84 77 return (ua ^ ub) >> 31 & (uresult ^ ua) >> 31; 85 #endif86 78 } 87 79
Note:
See TracChangeset
for help on using the changeset viewer.