Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: src/ppc/macro-assembler-ppc.cc

Issue 1157123002: PPC: Move hash code from hidden string to a private symbol (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698