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

Use shift and add instead of mul on ARM for integer hash.

Review URL: http://codereview.chromium.org/9153002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4bea3b5c
......@@ -1456,8 +1456,9 @@ void MacroAssembler::LoadFromNumberDictionary(Label* miss,
// hash = hash ^ (hash >> 4);
eor(t0, t0, Operand(t0, LSR, 4));
// hash = hash * 2057;
mov(t1, Operand(2057));
mul(t0, t0, t1);
mov(t1, Operand(t0, LSL, 11));
add(t0, t0, Operand(t0, LSL, 3));
add(t0, t0, t1);
// hash = hash ^ (hash >> 16);
eor(t0, t0, Operand(t0, LSR, 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