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

Side by Side Diff: src/arm64/macro-assembler-arm64.h

Issue 1475823003: [runtime] First step to sanitize regexp literal creation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/arm64/assembler-arm64.h" 10 #include "src/arm64/assembler-arm64.h"
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 FPRegister scratch_d, 1021 FPRegister scratch_d,
1022 Label* on_successful_conversion = NULL, 1022 Label* on_successful_conversion = NULL,
1023 Label* on_failed_conversion = NULL) { 1023 Label* on_failed_conversion = NULL) {
1024 DCHECK(as_int.Is64Bits()); 1024 DCHECK(as_int.Is64Bits());
1025 TryRepresentDoubleAsInt(as_int, value, scratch_d, on_successful_conversion, 1025 TryRepresentDoubleAsInt(as_int, value, scratch_d, on_successful_conversion,
1026 on_failed_conversion); 1026 on_failed_conversion);
1027 } 1027 }
1028 1028
1029 // ---- Object Utilities ---- 1029 // ---- Object Utilities ----
1030 1030
1031 // Copy fields from 'src' to 'dst', where both are tagged objects.
1032 // The 'temps' list is a list of X registers which can be used for scratch
1033 // values. The temps list must include at least one register.
1034 //
1035 // Currently, CopyFields cannot make use of more than three registers from
1036 // the 'temps' list.
1037 //
1038 // CopyFields expects to be able to take at least two registers from
1039 // MacroAssembler::TmpList().
1040 void CopyFields(Register dst, Register src, CPURegList temps, unsigned count);
1041
1042 // Initialize fields with filler values. Fields starting at |current_address| 1031 // Initialize fields with filler values. Fields starting at |current_address|
1043 // not including |end_address| are overwritten with the value in |filler|. At 1032 // not including |end_address| are overwritten with the value in |filler|. At
1044 // the end the loop, |current_address| takes the value of |end_address|. 1033 // the end the loop, |current_address| takes the value of |end_address|.
1045 void InitializeFieldsWithFiller(Register current_address, 1034 void InitializeFieldsWithFiller(Register current_address,
1046 Register end_address, Register filler); 1035 Register end_address, Register filler);
1047 1036
1048 // Copies a number of bytes from src to dst. All passed registers are 1037 // Copies a number of bytes from src to dst. All passed registers are
1049 // clobbered. On exit src and dst will point to the place just after where the 1038 // clobbered. On exit src and dst will point to the place just after where the
1050 // last byte was read or written and length will be zero. Hint may be used to 1039 // last byte was read or written and length will be zero. Hint may be used to
1051 // determine which is the most efficient algorithm to use for copying. 1040 // determine which is the most efficient algorithm to use for copying.
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 // Perform necessary maintenance operations before a push or after a pop. 1992 // Perform necessary maintenance operations before a push or after a pop.
2004 // 1993 //
2005 // Note that size is specified in bytes. 1994 // Note that size is specified in bytes.
2006 void PushPreamble(Operand total_size); 1995 void PushPreamble(Operand total_size);
2007 void PopPostamble(Operand total_size); 1996 void PopPostamble(Operand total_size);
2008 1997
2009 void PushPreamble(int count, int size) { PushPreamble(count * size); } 1998 void PushPreamble(int count, int size) { PushPreamble(count * size); }
2010 void PopPostamble(int count, int size) { PopPostamble(count * size); } 1999 void PopPostamble(int count, int size) { PopPostamble(count * size); }
2011 2000
2012 private: 2001 private:
2013 // Helpers for CopyFields.
2014 // These each implement CopyFields in a different way.
2015 void CopyFieldsLoopPairsHelper(Register dst, Register src, unsigned count,
2016 Register scratch1, Register scratch2,
2017 Register scratch3, Register scratch4,
2018 Register scratch5);
2019 void CopyFieldsUnrolledPairsHelper(Register dst, Register src, unsigned count,
2020 Register scratch1, Register scratch2,
2021 Register scratch3, Register scratch4);
2022 void CopyFieldsUnrolledHelper(Register dst, Register src, unsigned count,
2023 Register scratch1, Register scratch2,
2024 Register scratch3);
2025
2026 // The actual Push and Pop implementations. These don't generate any code 2002 // The actual Push and Pop implementations. These don't generate any code
2027 // other than that required for the push or pop. This allows 2003 // other than that required for the push or pop. This allows
2028 // (Push|Pop)CPURegList to bundle together run-time assertions for a large 2004 // (Push|Pop)CPURegList to bundle together run-time assertions for a large
2029 // block of registers. 2005 // block of registers.
2030 // 2006 //
2031 // Note that size is per register, and is specified in bytes. 2007 // Note that size is per register, and is specified in bytes.
2032 void PushHelper(int count, int size, 2008 void PushHelper(int count, int size,
2033 const CPURegister& src0, const CPURegister& src1, 2009 const CPURegister& src0, const CPURegister& src1,
2034 const CPURegister& src2, const CPURegister& src3); 2010 const CPURegister& src2, const CPURegister& src3);
2035 void PopHelper(int count, int size, 2011 void PopHelper(int count, int size,
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 #error "Unsupported option" 2262 #error "Unsupported option"
2287 #define CODE_COVERAGE_STRINGIFY(x) #x 2263 #define CODE_COVERAGE_STRINGIFY(x) #x
2288 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 2264 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
2289 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 2265 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
2290 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 2266 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
2291 #else 2267 #else
2292 #define ACCESS_MASM(masm) masm-> 2268 #define ACCESS_MASM(masm) masm->
2293 #endif 2269 #endif
2294 2270
2295 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ 2271 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698