| 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 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1963 // string CIDs as well as stored function pointers are in sequence. | 1963 // string CIDs as well as stored function pointers are in sequence. |
| 1964 __ movq(RBX, Address(RSP, kRegExpParamOffset)); | 1964 __ movq(RBX, Address(RSP, kRegExpParamOffset)); |
| 1965 __ movq(RDI, Address(RSP, kStringParamOffset)); | 1965 __ movq(RDI, Address(RSP, kStringParamOffset)); |
| 1966 __ LoadClassId(RDI, RDI); | 1966 __ LoadClassId(RDI, RDI); |
| 1967 __ SubImmediate(RDI, Immediate(kOneByteStringCid)); | 1967 __ SubImmediate(RDI, Immediate(kOneByteStringCid)); |
| 1968 __ movq(RAX, FieldAddress(RBX, RDI, TIMES_8, | 1968 __ movq(RAX, FieldAddress(RBX, RDI, TIMES_8, |
| 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; | |
| 1974 __ LoadObject(R10, | |
| 1975 Array::ZoneHandle(ArgumentsDescriptor::New(arg_count))); | |
| 1976 __ xorq(RCX, RCX); | 1973 __ xorq(RCX, RCX); |
| 1977 | 1974 |
| 1978 // Tail-call the function. | 1975 // Tail-call the function. |
| 1979 __ movq(RDI, FieldAddress(RAX, Function::entry_point_offset())); | 1976 __ movq(RDI, FieldAddress(RAX, Function::entry_point_offset())); |
| 1980 __ jmp(RDI); | 1977 __ jmp(RDI); |
| 1981 } | 1978 } |
| 1982 | 1979 |
| 1983 | 1980 |
| 1984 // On stack: user tag (+1), return-address (+0). | 1981 // On stack: user tag (+1), return-address (+0). |
| 1985 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { | 1982 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2010 __ LoadIsolate(RAX); | 2007 __ LoadIsolate(RAX); |
| 2011 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); | 2008 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); |
| 2012 __ ret(); | 2009 __ ret(); |
| 2013 } | 2010 } |
| 2014 | 2011 |
| 2015 #undef __ | 2012 #undef __ |
| 2016 | 2013 |
| 2017 } // namespace dart | 2014 } // namespace dart |
| 2018 | 2015 |
| 2019 #endif // defined TARGET_ARCH_X64 | 2016 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |