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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 9539010: Fix stub cache on ARM, broken in 10864. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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
« 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Get the map of the receiver and compute the hash. 230 // Get the map of the receiver and compute the hash.
231 __ ldr(scratch, FieldMemOperand(name, String::kHashFieldOffset)); 231 __ ldr(scratch, FieldMemOperand(name, String::kHashFieldOffset));
232 __ ldr(ip, FieldMemOperand(receiver, HeapObject::kMapOffset)); 232 __ ldr(ip, FieldMemOperand(receiver, HeapObject::kMapOffset));
233 __ add(scratch, scratch, Operand(ip)); 233 __ add(scratch, scratch, Operand(ip));
234 uint32_t mask = kPrimaryTableSize - 1; 234 uint32_t mask = kPrimaryTableSize - 1;
235 // We shift out the last two bits because they are not part of the hash and 235 // We shift out the last two bits because they are not part of the hash and
236 // they are always 01 for maps. 236 // they are always 01 for maps.
237 __ mov(scratch, Operand(scratch, LSR, kHeapObjectTagSize)); 237 __ mov(scratch, Operand(scratch, LSR, kHeapObjectTagSize));
238 // Mask down the eor argument to the minimum to keep the immediate 238 // Mask down the eor argument to the minimum to keep the immediate
239 // ARM-encodable. 239 // ARM-encodable.
240 __ eor(scratch, scratch, Operand(flags & mask)); 240 __ eor(scratch, scratch, Operand((flags >> kHeapObjectTagSize) & mask));
241 // Prefer and_ to ubfx here because ubfx takes 2 cycles. 241 // Prefer and_ to ubfx here because ubfx takes 2 cycles.
242 __ and_(scratch, scratch, Operand(mask)); 242 __ and_(scratch, scratch, Operand(mask));
243 243
244 // Probe the primary table. 244 // Probe the primary table.
245 ProbeTable(isolate, 245 ProbeTable(isolate,
246 masm, 246 masm,
247 flags, 247 flags,
248 kPrimary, 248 kPrimary,
249 receiver, 249 receiver,
250 name, 250 name,
251 scratch, 251 scratch,
252 extra, 252 extra,
253 extra2, 253 extra2,
254 extra3); 254 extra3);
255 255
256 // Primary miss: Compute hash for secondary probe. 256 // Primary miss: Compute hash for secondary probe.
257 __ sub(scratch, scratch, Operand(name, LSR, kHeapObjectTagSize)); 257 __ sub(scratch, scratch, Operand(name, LSR, kHeapObjectTagSize));
258 uint32_t mask2 = (kSecondaryTableSize - 1); 258 uint32_t mask2 = kSecondaryTableSize - 1;
259 __ add(scratch, scratch, Operand((flags >> kHeapObjectTagSize) & mask2)); 259 __ add(scratch, scratch, Operand((flags >> kHeapObjectTagSize) & mask2));
260 __ and_(scratch, scratch, Operand(mask2)); 260 __ and_(scratch, scratch, Operand(mask2));
261 261
262 // Probe the secondary table. 262 // Probe the secondary table.
263 ProbeTable(isolate, 263 ProbeTable(isolate,
264 masm, 264 masm,
265 flags, 265 flags,
266 kSecondary, 266 kSecondary,
267 receiver, 267 receiver,
268 name, 268 name,
(...skipping 4189 matching lines...) Expand 10 before | Expand all | Expand 10 after
4458 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4458 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4459 } 4459 }
4460 } 4460 }
4461 4461
4462 4462
4463 #undef __ 4463 #undef __
4464 4464
4465 } } // namespace v8::internal 4465 } } // namespace v8::internal
4466 4466
4467 #endif // V8_TARGET_ARCH_ARM 4467 #endif // V8_TARGET_ARCH_ARM
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