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

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

Issue 216933003: ARM64: Optimize AllocateHeapNumber to use STP. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « src/arm64/macro-assembler-arm64-inl.h ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 __ B(ne, miss_label); 391 __ B(ne, miss_label);
392 } else if (representation.IsSmi()) { 392 } else if (representation.IsSmi()) {
393 __ JumpIfNotSmi(value_reg, miss_label); 393 __ JumpIfNotSmi(value_reg, miss_label);
394 } else if (representation.IsHeapObject()) { 394 } else if (representation.IsHeapObject()) {
395 __ JumpIfSmi(value_reg, miss_label); 395 __ JumpIfSmi(value_reg, miss_label);
396 } else if (representation.IsDouble()) { 396 } else if (representation.IsDouble()) {
397 UseScratchRegisterScope temps(masm); 397 UseScratchRegisterScope temps(masm);
398 DoubleRegister temp_double = temps.AcquireD(); 398 DoubleRegister temp_double = temps.AcquireD();
399 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); 399 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag);
400 400
401 Label do_store, heap_number; 401 Label do_store;
402 __ AllocateHeapNumber(storage_reg, slow, scratch1, scratch2);
403
404 __ JumpIfSmi(value_reg, &do_store); 402 __ JumpIfSmi(value_reg, &do_store);
405 403
406 __ CheckMap(value_reg, scratch1, Heap::kHeapNumberMapRootIndex, 404 __ CheckMap(value_reg, scratch1, Heap::kHeapNumberMapRootIndex,
407 miss_label, DONT_DO_SMI_CHECK); 405 miss_label, DONT_DO_SMI_CHECK);
408 __ Ldr(temp_double, FieldMemOperand(value_reg, HeapNumber::kValueOffset)); 406 __ Ldr(temp_double, FieldMemOperand(value_reg, HeapNumber::kValueOffset));
409 407
410 __ Bind(&do_store); 408 __ Bind(&do_store);
411 __ Str(temp_double, FieldMemOperand(storage_reg, HeapNumber::kValueOffset)); 409 __ AllocateHeapNumber(storage_reg, slow, scratch1, scratch2, temp_double);
412 } 410 }
413 411
414 // Stub never generated for non-global objects that require access checks. 412 // Stub never generated for non-global objects that require access checks.
415 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); 413 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
416 414
417 // Perform map transition for the receiver if necessary. 415 // Perform map transition for the receiver if necessary.
418 if ((details.type() == FIELD) && 416 if ((details.type() == FIELD) &&
419 (object->map()->unused_property_fields() == 0)) { 417 (object->map()->unused_property_fields() == 0)) {
420 // The properties must be extended before we can store the value. 418 // The properties must be extended before we can store the value.
421 // We jump to a runtime call that extends the properties array. 419 // We jump to a runtime call that extends the properties array.
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 1485
1488 // Miss case, call the runtime. 1486 // Miss case, call the runtime.
1489 __ Bind(&miss); 1487 __ Bind(&miss);
1490 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1488 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1491 } 1489 }
1492 1490
1493 1491
1494 } } // namespace v8::internal 1492 } } // namespace v8::internal
1495 1493
1496 #endif // V8_TARGET_ARCH_ARM64 1494 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64-inl.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698