OLD | NEW |
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 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1929 __ movq(RAX, FieldAddress(RBX, RDI, TIMES_8, | 1929 __ movq(RAX, FieldAddress(RBX, RDI, TIMES_8, |
1930 JSRegExp::function_offset(kOneByteStringCid))); | 1930 JSRegExp::function_offset(kOneByteStringCid))); |
1931 | 1931 |
1932 // Registers are now set up for the lazy compile stub. It expects the function | 1932 // Registers are now set up for the lazy compile stub. It expects the function |
1933 // in RAX, the argument descriptor in R10, and IC-Data in RCX. | 1933 // in RAX, the argument descriptor in R10, and IC-Data in RCX. |
1934 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount; | 1934 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount; |
1935 __ LoadObject(R10, Array::Handle(ArgumentsDescriptor::New(arg_count)), PP); | 1935 __ LoadObject(R10, Array::Handle(ArgumentsDescriptor::New(arg_count)), PP); |
1936 __ xorq(RCX, RCX); | 1936 __ xorq(RCX, RCX); |
1937 | 1937 |
1938 // Tail-call the function. | 1938 // Tail-call the function. |
1939 __ movq(RDI, FieldAddress(RAX, Function::instructions_offset())); | 1939 __ movq(CODE_REG, FieldAddress(RAX, Function::code_offset())); |
| 1940 __ movq(RDI, FieldAddress(CODE_REG, Code::instructions_offset())); |
1940 __ addq(RDI, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); | 1941 __ addq(RDI, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); |
1941 __ jmp(RDI); | 1942 __ jmp(RDI); |
1942 } | 1943 } |
1943 | 1944 |
1944 | 1945 |
1945 // On stack: user tag (+1), return-address (+0). | 1946 // On stack: user tag (+1), return-address (+0). |
1946 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { | 1947 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { |
1947 // RBX: Isolate. | 1948 // RBX: Isolate. |
1948 Isolate* isolate = Isolate::Current(); | 1949 Isolate* isolate = Isolate::Current(); |
1949 const Immediate& isolate_address = | 1950 const Immediate& isolate_address = |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1985 // Set return value to Isolate::current_tag_. | 1986 // Set return value to Isolate::current_tag_. |
1986 __ movq(RAX, Address(RBX, Isolate::current_tag_offset())); | 1987 __ movq(RAX, Address(RBX, Isolate::current_tag_offset())); |
1987 __ ret(); | 1988 __ ret(); |
1988 } | 1989 } |
1989 | 1990 |
1990 #undef __ | 1991 #undef __ |
1991 | 1992 |
1992 } // namespace dart | 1993 } // namespace dart |
1993 | 1994 |
1994 #endif // defined TARGET_ARCH_X64 | 1995 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |