OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 // hash = hash ^ (hash >> 4); | 1107 // hash = hash ^ (hash >> 4); |
1108 mov(scratch, r0); | 1108 mov(scratch, r0); |
1109 shr(scratch, 4); | 1109 shr(scratch, 4); |
1110 xor_(r0, scratch); | 1110 xor_(r0, scratch); |
1111 // hash = hash * 2057; | 1111 // hash = hash * 2057; |
1112 imul(r0, r0, 2057); | 1112 imul(r0, r0, 2057); |
1113 // hash = hash ^ (hash >> 16); | 1113 // hash = hash ^ (hash >> 16); |
1114 mov(scratch, r0); | 1114 mov(scratch, r0); |
1115 shr(scratch, 16); | 1115 shr(scratch, 16); |
1116 xor_(r0, scratch); | 1116 xor_(r0, scratch); |
| 1117 and_(r0, 0x3fffffff); |
1117 } | 1118 } |
1118 | 1119 |
1119 | 1120 |
1120 | 1121 |
1121 void MacroAssembler::LoadFromNumberDictionary(Label* miss, | 1122 void MacroAssembler::LoadFromNumberDictionary(Label* miss, |
1122 Register elements, | 1123 Register elements, |
1123 Register key, | 1124 Register key, |
1124 Register r0, | 1125 Register r0, |
1125 Register r1, | 1126 Register r1, |
1126 Register r2, | 1127 Register r2, |
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3097 if (mag.shift > 0) sar(edx, mag.shift); | 3098 if (mag.shift > 0) sar(edx, mag.shift); |
3098 mov(eax, dividend); | 3099 mov(eax, dividend); |
3099 shr(eax, 31); | 3100 shr(eax, 31); |
3100 add(edx, eax); | 3101 add(edx, eax); |
3101 } | 3102 } |
3102 | 3103 |
3103 | 3104 |
3104 } } // namespace v8::internal | 3105 } } // namespace v8::internal |
3105 | 3106 |
3106 #endif // V8_TARGET_ARCH_X87 | 3107 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |