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

Side by Side Diff: src/mips/codegen-mips.cc

Issue 1476763002: Make whether or not a Code object should be created by masm explicit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: enum class FTW 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
« no previous file with comments | « src/mips/code-stubs-mips.h ('k') | src/mips/macro-assembler-mips.h » ('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 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/mips/codegen-mips.h" 5 #include "src/mips/codegen-mips.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
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 14 matching lines...) Expand all
25 #endif 25 #endif
26 26
27 27
28 UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) { 28 UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
29 size_t actual_size; 29 size_t actual_size;
30 byte* buffer = 30 byte* buffer =
31 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); 31 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
32 if (buffer == nullptr) return nullptr; 32 if (buffer == nullptr) return nullptr;
33 ExternalReference::InitializeMathExpData(); 33 ExternalReference::InitializeMathExpData();
34 34
35 MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size)); 35 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
36 CodeObjectRequired::kNo);
36 37
37 { 38 {
38 DoubleRegister input = f12; 39 DoubleRegister input = f12;
39 DoubleRegister result = f0; 40 DoubleRegister result = f0;
40 DoubleRegister double_scratch1 = f4; 41 DoubleRegister double_scratch1 = f4;
41 DoubleRegister double_scratch2 = f6; 42 DoubleRegister double_scratch2 = f6;
42 Register temp1 = t0; 43 Register temp1 = t0;
43 Register temp2 = t1; 44 Register temp2 = t1;
44 Register temp3 = t2; 45 Register temp3 = t2;
45 46
(...skipping 29 matching lines...) Expand all
75 defined(_MIPS_ARCH_MIPS32RX) 76 defined(_MIPS_ARCH_MIPS32RX)
76 return stub; 77 return stub;
77 #else 78 #else
78 size_t actual_size; 79 size_t actual_size;
79 byte* buffer = 80 byte* buffer =
80 static_cast<byte*>(base::OS::Allocate(3 * KB, &actual_size, true)); 81 static_cast<byte*>(base::OS::Allocate(3 * KB, &actual_size, true));
81 if (buffer == NULL) return stub; 82 if (buffer == NULL) return stub;
82 83
83 // This code assumes that cache lines are 32 bytes and if the cache line is 84 // This code assumes that cache lines are 32 bytes and if the cache line is
84 // larger it will not work correctly. 85 // larger it will not work correctly.
85 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); 86 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
87 CodeObjectRequired::kNo);
86 88
87 { 89 {
88 Label lastb, unaligned, aligned, chkw, 90 Label lastb, unaligned, aligned, chkw,
89 loop16w, chk1w, wordCopy_loop, skip_pref, lastbloop, 91 loop16w, chk1w, wordCopy_loop, skip_pref, lastbloop,
90 leave, ua_chk16w, ua_loop16w, ua_skip_pref, ua_chkw, 92 leave, ua_chk16w, ua_loop16w, ua_skip_pref, ua_chkw,
91 ua_chk1w, ua_wordCopy_loop, ua_smallCopy, ua_smallCopy_loop; 93 ua_chk1w, ua_wordCopy_loop, ua_smallCopy, ua_smallCopy_loop;
92 94
93 // The size of each prefetch. 95 // The size of each prefetch.
94 uint32_t pref_chunk = 32; 96 uint32_t pref_chunk = 32;
95 // The maximum size of a prefetch, it must not be less then pref_chunk. 97 // The maximum size of a prefetch, it must not be less then pref_chunk.
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 606
605 UnaryMathFunction CreateSqrtFunction() { 607 UnaryMathFunction CreateSqrtFunction() {
606 #if defined(USE_SIMULATOR) 608 #if defined(USE_SIMULATOR)
607 return &std::sqrt; 609 return &std::sqrt;
608 #else 610 #else
609 size_t actual_size; 611 size_t actual_size;
610 byte* buffer = 612 byte* buffer =
611 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); 613 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
612 if (buffer == NULL) return &std::sqrt; 614 if (buffer == NULL) return &std::sqrt;
613 615
614 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); 616 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
617 CodeObjectRequired::kNo);
615 618
616 __ MovFromFloatParameter(f12); 619 __ MovFromFloatParameter(f12);
617 __ sqrt_d(f0, f12); 620 __ sqrt_d(f0, f12);
618 __ MovToFloatResult(f0); 621 __ MovToFloatResult(f0);
619 __ Ret(); 622 __ Ret();
620 623
621 CodeDesc desc; 624 CodeDesc desc;
622 masm.GetCode(&desc); 625 masm.GetCode(&desc);
623 DCHECK(!RelocInfo::RequiresRelocation(desc)); 626 DCHECK(!RelocInfo::RequiresRelocation(desc));
624 627
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 } 1259 }
1257 } 1260 }
1258 1261
1259 1262
1260 #undef __ 1263 #undef __
1261 1264
1262 } // namespace internal 1265 } // namespace internal
1263 } // namespace v8 1266 } // namespace v8
1264 1267
1265 #endif // V8_TARGET_ARCH_MIPS 1268 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698