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

Side by Side Diff: src/x87/builtins-x87.cc

Issue 642603004: X87: Updates to maintain flag --vector-ics (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | src/x87/debug-x87.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 995
996 // Copy all arguments from the array to the stack. 996 // Copy all arguments from the array to the stack.
997 Label entry, loop; 997 Label entry, loop;
998 Register receiver = LoadDescriptor::ReceiverRegister(); 998 Register receiver = LoadDescriptor::ReceiverRegister();
999 Register key = LoadDescriptor::NameRegister(); 999 Register key = LoadDescriptor::NameRegister();
1000 __ mov(key, Operand(ebp, kIndexOffset)); 1000 __ mov(key, Operand(ebp, kIndexOffset));
1001 __ jmp(&entry); 1001 __ jmp(&entry);
1002 __ bind(&loop); 1002 __ bind(&loop);
1003 __ mov(receiver, Operand(ebp, kArgumentsOffset)); // load arguments 1003 __ mov(receiver, Operand(ebp, kArgumentsOffset)); // load arguments
1004 1004
1005 // Use inline caching to speed up access to arguments.
1006 if (FLAG_vector_ics) { 1005 if (FLAG_vector_ics) {
1007 __ mov(VectorLoadICDescriptor::SlotRegister(), 1006 // TODO(mvstanton): Vector-based ics need additional infrastructure to
1008 Immediate(Smi::FromInt(0))); 1007 // be embedded here. For now, just call the runtime.
1008 __ push(receiver);
1009 __ push(key);
1010 __ CallRuntime(Runtime::kGetProperty, 2);
1011 } else {
1012 // Use inline caching to speed up access to arguments.
1013 Handle<Code> ic = CodeFactory::KeyedLoadIC(masm->isolate()).code();
1014 __ call(ic, RelocInfo::CODE_TARGET);
1015 // It is important that we do not have a test instruction after the
1016 // call. A test instruction after the call is used to indicate that
1017 // we have generated an inline version of the keyed load. In this
1018 // case, we know that we are not generating a test instruction next.
1009 } 1019 }
1010 Handle<Code> ic = CodeFactory::KeyedLoadIC(masm->isolate()).code();
1011 __ call(ic, RelocInfo::CODE_TARGET);
1012 // It is important that we do not have a test instruction after the
1013 // call. A test instruction after the call is used to indicate that
1014 // we have generated an inline version of the keyed load. In this
1015 // case, we know that we are not generating a test instruction next.
1016 1020
1017 // Push the nth argument. 1021 // Push the nth argument.
1018 __ push(eax); 1022 __ push(eax);
1019 1023
1020 // Update the index on the stack and in register key. 1024 // Update the index on the stack and in register key.
1021 __ mov(key, Operand(ebp, kIndexOffset)); 1025 __ mov(key, Operand(ebp, kIndexOffset));
1022 __ add(key, Immediate(1 << kSmiTagSize)); 1026 __ add(key, Immediate(1 << kSmiTagSize));
1023 __ mov(Operand(ebp, kIndexOffset), key); 1027 __ mov(Operand(ebp, kIndexOffset), key);
1024 1028
1025 __ bind(&entry); 1029 __ bind(&entry);
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 1453
1450 __ bind(&ok); 1454 __ bind(&ok);
1451 __ ret(0); 1455 __ ret(0);
1452 } 1456 }
1453 1457
1454 #undef __ 1458 #undef __
1455 } 1459 }
1456 } // namespace v8::internal 1460 } // namespace v8::internal
1457 1461
1458 #endif // V8_TARGET_ARCH_X87 1462 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/debug-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698