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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 9190001: Backport @10366 to 3.6 Base URL: http://v8.googlecode.com/svn/branches/3.6/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5562 matching lines...) Expand 10 before | Expand all | Expand 10 after
5573 Register result = candidate; 5573 Register result = candidate;
5574 __ bind(&found_in_symbol_table); 5574 __ bind(&found_in_symbol_table);
5575 __ mov(v0, result); 5575 __ mov(v0, result);
5576 } 5576 }
5577 5577
5578 5578
5579 void StringHelper::GenerateHashInit(MacroAssembler* masm, 5579 void StringHelper::GenerateHashInit(MacroAssembler* masm,
5580 Register hash, 5580 Register hash,
5581 Register character) { 5581 Register character) {
5582 // hash = seed + character + ((seed + character) << 10); 5582 // hash = seed + character + ((seed + character) << 10);
5583 __ LoadRoot(hash, Heap::kStringHashSeedRootIndex); 5583 __ LoadRoot(hash, Heap::kHashSeedRootIndex);
5584 // Untag smi seed and add the character. 5584 // Untag smi seed and add the character.
5585 __ SmiUntag(hash); 5585 __ SmiUntag(hash);
5586 __ addu(hash, hash, character); 5586 __ addu(hash, hash, character);
5587 __ sll(at, hash, 10); 5587 __ sll(at, hash, 10);
5588 __ addu(hash, hash, at); 5588 __ addu(hash, hash, at);
5589 // hash ^= hash >> 6; 5589 // hash ^= hash >> 6;
5590 __ sra(at, hash, 6); 5590 __ sra(at, hash, 6);
5591 __ xor_(hash, hash, at); 5591 __ xor_(hash, hash, at);
5592 } 5592 }
5593 5593
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
6962 __ mov(result, zero_reg); 6962 __ mov(result, zero_reg);
6963 __ Ret(); 6963 __ Ret();
6964 } 6964 }
6965 6965
6966 6966
6967 #undef __ 6967 #undef __
6968 6968
6969 } } // namespace v8::internal 6969 } } // namespace v8::internal
6970 6970
6971 #endif // V8_TARGET_ARCH_MIPS 6971 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698