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

Side by Side Diff: runtime/vm/intrinsifier_x64.cc

Issue 1295823003: VM: Cache instructions entry point in RawFunction/RawCode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/object.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 JSRegExp::function_offset(kOneByteStringCid))); 1969 JSRegExp::function_offset(kOneByteStringCid)));
1970 1970
1971 // Registers are now set up for the lazy compile stub. It expects the function 1971 // Registers are now set up for the lazy compile stub. It expects the function
1972 // in RAX, the argument descriptor in R10, and IC-Data in RCX. 1972 // in RAX, the argument descriptor in R10, and IC-Data in RCX.
1973 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount; 1973 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount;
1974 __ LoadObject(R10, 1974 __ LoadObject(R10,
1975 Array::ZoneHandle(ArgumentsDescriptor::New(arg_count))); 1975 Array::ZoneHandle(ArgumentsDescriptor::New(arg_count)));
1976 __ xorq(RCX, RCX); 1976 __ xorq(RCX, RCX);
1977 1977
1978 // Tail-call the function. 1978 // Tail-call the function.
1979 __ movq(RDI, FieldAddress(RAX, Function::instructions_offset())); 1979 __ movq(RDI, FieldAddress(RAX, Function::entry_point_offset()));
1980 __ addq(RDI, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
1981 __ jmp(RDI); 1980 __ jmp(RDI);
1982 } 1981 }
1983 1982
1984 1983
1985 // On stack: user tag (+1), return-address (+0). 1984 // On stack: user tag (+1), return-address (+0).
1986 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { 1985 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) {
1987 // RBX: Isolate. 1986 // RBX: Isolate.
1988 __ LoadIsolate(RBX); 1987 __ LoadIsolate(RBX);
1989 // RAX: Current user tag. 1988 // RAX: Current user tag.
1990 __ movq(RAX, Address(RBX, Isolate::current_tag_offset())); 1989 __ movq(RAX, Address(RBX, Isolate::current_tag_offset()));
(...skipping 20 matching lines...) Expand all
2011 __ LoadIsolate(RAX); 2010 __ LoadIsolate(RAX);
2012 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); 2011 __ movq(RAX, Address(RAX, Isolate::current_tag_offset()));
2013 __ ret(); 2012 __ ret();
2014 } 2013 }
2015 2014
2016 #undef __ 2015 #undef __
2017 2016
2018 } // namespace dart 2017 } // namespace dart
2019 2018
2020 #endif // defined TARGET_ARCH_X64 2019 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698