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

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

Issue 753743005: Explicitly clear out the IC-data register in ExecuteMatch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: x64 fix and mips mov Created 6 years 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 | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_ia32.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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 if (FLAG_use_jscre) { 1939 if (FLAG_use_jscre) {
1940 return; 1940 return;
1941 } 1941 }
1942 static const intptr_t kRegExpParamOffset = 2 * kWordSize; 1942 static const intptr_t kRegExpParamOffset = 2 * kWordSize;
1943 static const intptr_t kStringParamOffset = 1 * kWordSize; 1943 static const intptr_t kStringParamOffset = 1 * kWordSize;
1944 // start_index smi is located at offset 0. 1944 // start_index smi is located at offset 0.
1945 1945
1946 // Incoming registers: 1946 // Incoming registers:
1947 // R0: Function. (Will be reloaded with the specialized matcher function.) 1947 // R0: Function. (Will be reloaded with the specialized matcher function.)
1948 // R4: Arguments descriptor. (Will be preserved.) 1948 // R4: Arguments descriptor. (Will be preserved.)
1949 // R5: IC-Data. (Will be preserved.) 1949 // R5: Unknown. (Must be GC safe on tail call.)
1950 1950
1951 // Load the specialized function pointer into R0. Leverage the fact the 1951 // Load the specialized function pointer into R0. Leverage the fact the
1952 // string CIDs as well as stored function pointers are in sequence. 1952 // string CIDs as well as stored function pointers are in sequence.
1953 __ ldr(R2, Address(SP, kRegExpParamOffset)); 1953 __ ldr(R2, Address(SP, kRegExpParamOffset));
1954 __ ldr(R1, Address(SP, kStringParamOffset)); 1954 __ ldr(R1, Address(SP, kStringParamOffset));
1955 __ LoadClassId(R1, R1, kNoPP); 1955 __ LoadClassId(R1, R1, kNoPP);
1956 __ AddImmediate(R1, R1, -kOneByteStringCid, kNoPP); 1956 __ AddImmediate(R1, R1, -kOneByteStringCid, kNoPP);
1957 __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2)); 1957 __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2));
1958 __ ldr(R0, FieldAddress(R1, JSRegExp::function_offset(kOneByteStringCid))); 1958 __ ldr(R0, FieldAddress(R1, JSRegExp::function_offset(kOneByteStringCid)));
1959 1959
1960 // Registers are now set up for the lazy compile stub. It expects the function 1960 // Registers are now set up for the lazy compile stub. It expects the function
1961 // in R0, the argument descriptor in R4, and IC-Data in R5. 1961 // in R0, the argument descriptor in R4, and IC-Data in R5.
1962 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount; 1962 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount;
1963 __ LoadObject(R4, Array::Handle(ArgumentsDescriptor::New(arg_count)), kNoPP); 1963 __ LoadObject(R4, Array::Handle(ArgumentsDescriptor::New(arg_count)), kNoPP);
1964 __ eor(R5, R5, Operand(R5));
1964 1965
1965 // Tail-call the function. 1966 // Tail-call the function.
1966 __ ldr(R1, FieldAddress(R0, Function::instructions_offset())); 1967 __ ldr(R1, FieldAddress(R0, Function::instructions_offset()));
1967 __ AddImmediate(R1, R1, Instructions::HeaderSize() - kHeapObjectTag, kNoPP); 1968 __ AddImmediate(R1, R1, Instructions::HeaderSize() - kHeapObjectTag, kNoPP);
1968 __ br(R1); 1969 __ br(R1);
1969 } 1970 }
1970 1971
1971 1972
1972 // On stack: user tag (+0). 1973 // On stack: user tag (+0).
1973 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { 1974 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) {
(...skipping 30 matching lines...) Expand all
2004 Isolate* isolate = Isolate::Current(); 2005 Isolate* isolate = Isolate::Current();
2005 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate), kNoPP); 2006 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate), kNoPP);
2006 // Set return value to Isolate::current_tag_. 2007 // Set return value to Isolate::current_tag_.
2007 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); 2008 __ ldr(R0, Address(R1, Isolate::current_tag_offset()));
2008 __ ret(); 2009 __ ret();
2009 } 2010 }
2010 2011
2011 } // namespace dart 2012 } // namespace dart
2012 2013
2013 #endif // defined TARGET_ARCH_ARM64 2014 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698