OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #if V8_TARGET_ARCH_PPC | 10 #if V8_TARGET_ARCH_PPC |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 xor_(t0, t0, scratch); | 1215 xor_(t0, t0, scratch); |
1216 // hash = hash * 2057; | 1216 // hash = hash * 2057; |
1217 mr(r0, t0); | 1217 mr(r0, t0); |
1218 slwi(scratch, t0, Operand(3)); | 1218 slwi(scratch, t0, Operand(3)); |
1219 add(t0, t0, scratch); | 1219 add(t0, t0, scratch); |
1220 slwi(scratch, r0, Operand(11)); | 1220 slwi(scratch, r0, Operand(11)); |
1221 add(t0, t0, scratch); | 1221 add(t0, t0, scratch); |
1222 // hash = hash ^ (hash >> 16); | 1222 // hash = hash ^ (hash >> 16); |
1223 srwi(scratch, t0, Operand(16)); | 1223 srwi(scratch, t0, Operand(16)); |
1224 xor_(t0, t0, scratch); | 1224 xor_(t0, t0, scratch); |
| 1225 // hash & 0x3fffffff |
| 1226 ExtractBitRange(t0, t0, 29, 0); |
1225 } | 1227 } |
1226 | 1228 |
1227 | 1229 |
1228 void MacroAssembler::LoadFromNumberDictionary(Label* miss, Register elements, | 1230 void MacroAssembler::LoadFromNumberDictionary(Label* miss, Register elements, |
1229 Register key, Register result, | 1231 Register key, Register result, |
1230 Register t0, Register t1, | 1232 Register t0, Register t1, |
1231 Register t2) { | 1233 Register t2) { |
1232 // Register use: | 1234 // Register use: |
1233 // | 1235 // |
1234 // elements - holds the slow-case elements of the receiver on entry. | 1236 // elements - holds the slow-case elements of the receiver on entry. |
(...skipping 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4523 } | 4525 } |
4524 if (mag.shift > 0) srawi(result, result, mag.shift); | 4526 if (mag.shift > 0) srawi(result, result, mag.shift); |
4525 ExtractBit(r0, dividend, 31); | 4527 ExtractBit(r0, dividend, 31); |
4526 add(result, result, r0); | 4528 add(result, result, r0); |
4527 } | 4529 } |
4528 | 4530 |
4529 } // namespace internal | 4531 } // namespace internal |
4530 } // namespace v8 | 4532 } // namespace v8 |
4531 | 4533 |
4532 #endif // V8_TARGET_ARCH_PPC | 4534 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |