From 448d80db64fc18e90631249d6e5b0e439358f137 Mon Sep 17 00:00:00 2001 From: "erik.corry@gmail.com" Date: Wed, 29 Feb 2012 14:38:54 +0000 Subject: [PATCH] Fix stub cache on ARM, broken in 10864. Review URL: https://chromiumcodereview.appspot.com/9539010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/stub-cache-arm.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc index 59d0859dfc..74fca2e4c5 100644 --- a/src/arm/stub-cache-arm.cc +++ b/src/arm/stub-cache-arm.cc @@ -237,7 +237,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm, __ mov(scratch, Operand(scratch, LSR, kHeapObjectTagSize)); // Mask down the eor argument to the minimum to keep the immediate // ARM-encodable. - __ eor(scratch, scratch, Operand(flags & mask)); + __ eor(scratch, scratch, Operand((flags >> kHeapObjectTagSize) & mask)); // Prefer and_ to ubfx here because ubfx takes 2 cycles. __ and_(scratch, scratch, Operand(mask)); @@ -255,7 +255,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm, // Primary miss: Compute hash for secondary probe. __ sub(scratch, scratch, Operand(name, LSR, kHeapObjectTagSize)); - uint32_t mask2 = (kSecondaryTableSize - 1); + uint32_t mask2 = kSecondaryTableSize - 1; __ add(scratch, scratch, Operand((flags >> kHeapObjectTagSize) & mask2)); __ and_(scratch, scratch, Operand(mask2));