Commit ae698e73 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

MIPS: Use shift and add instead of mul on ARM for integer hash. This is a...

MIPS: Use shift and add instead of mul on ARM for integer hash.  This is a commit of http://codereview.chromium.org/9192011/ for Daniel Kalmar

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 60f16189
......@@ -444,8 +444,10 @@ void MacroAssembler::GetNumberHash(Register reg0, Register scratch) {
xor_(reg0, reg0, at);
// hash = hash * 2057;
li(scratch, Operand(2057));
mul(reg0, reg0, scratch);
sll(scratch, reg0, 11);
sll(at, reg0, 3);
addu(reg0, reg0, at);
addu(reg0, reg0, scratch);
// hash = hash ^ (hash >> 16);
srl(at, reg0, 16);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment