| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/mips64/codegen-mips64.h" | 5 #include "src/mips64/codegen-mips64.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
| (...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 | 1176 |
| 1177 __ bind(&done); | 1177 __ bind(&done); |
| 1178 } | 1178 } |
| 1179 | 1179 |
| 1180 #ifdef DEBUG | 1180 #ifdef DEBUG |
| 1181 // nop(CODE_AGE_MARKER_NOP) | 1181 // nop(CODE_AGE_MARKER_NOP) |
| 1182 static const uint32_t kCodeAgePatchFirstInstruction = 0x00010180; | 1182 static const uint32_t kCodeAgePatchFirstInstruction = 0x00010180; |
| 1183 #endif | 1183 #endif |
| 1184 | 1184 |
| 1185 | 1185 |
| 1186 CodeAgingHelper::CodeAgingHelper() { | 1186 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { |
| 1187 USE(isolate); |
| 1187 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); | 1188 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); |
| 1188 // Since patcher is a large object, allocate it dynamically when needed, | 1189 // Since patcher is a large object, allocate it dynamically when needed, |
| 1189 // to avoid overloading the stack in stress conditions. | 1190 // to avoid overloading the stack in stress conditions. |
| 1190 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in | 1191 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in |
| 1191 // the process, before MIPS simulator ICache is setup. | 1192 // the process, before MIPS simulator ICache is setup. |
| 1192 base::SmartPointer<CodePatcher> patcher(new CodePatcher( | 1193 base::SmartPointer<CodePatcher> patcher(new CodePatcher( |
| 1193 young_sequence_.start(), young_sequence_.length() / Assembler::kInstrSize, | 1194 young_sequence_.start(), young_sequence_.length() / Assembler::kInstrSize, |
| 1194 CodePatcher::DONT_FLUSH)); | 1195 CodePatcher::DONT_FLUSH)); |
| 1195 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); | 1196 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); |
| 1196 patcher->masm()->Push(ra, fp, cp, a1); | 1197 patcher->masm()->Push(ra, fp, cp, a1); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 } | 1257 } |
| 1257 } | 1258 } |
| 1258 | 1259 |
| 1259 | 1260 |
| 1260 #undef __ | 1261 #undef __ |
| 1261 | 1262 |
| 1262 } // namespace internal | 1263 } // namespace internal |
| 1263 } // namespace v8 | 1264 } // namespace v8 |
| 1264 | 1265 |
| 1265 #endif // V8_TARGET_ARCH_MIPS64 | 1266 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |