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

Side by Side Diff: src/mips64/codegen-mips64.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: updates 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 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 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), false);
36 36
37 { 37 {
38 DoubleRegister input = f12; 38 DoubleRegister input = f12;
39 DoubleRegister result = f0; 39 DoubleRegister result = f0;
40 DoubleRegister double_scratch1 = f4; 40 DoubleRegister double_scratch1 = f4;
41 DoubleRegister double_scratch2 = f6; 41 DoubleRegister double_scratch2 = f6;
42 Register temp1 = a4; 42 Register temp1 = a4;
43 Register temp2 = a5; 43 Register temp2 = a5;
44 Register temp3 = a6; 44 Register temp3 = a6;
45 45
(...skipping 29 matching lines...) Expand all
75 return stub; 75 return stub;
76 #else 76 #else
77 77
78 size_t actual_size; 78 size_t actual_size;
79 byte* buffer = 79 byte* buffer =
80 static_cast<byte*>(base::OS::Allocate(3 * KB, &actual_size, true)); 80 static_cast<byte*>(base::OS::Allocate(3 * KB, &actual_size, true));
81 if (buffer == NULL) return stub; 81 if (buffer == NULL) return stub;
82 82
83 // This code assumes that cache lines are 32 bytes and if the cache line is 83 // This code assumes that cache lines are 32 bytes and if the cache line is
84 // larger it will not work correctly. 84 // larger it will not work correctly.
85 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); 85 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size), false);
86 86
87 { 87 {
88 Label lastb, unaligned, aligned, chkw, 88 Label lastb, unaligned, aligned, chkw,
89 loop16w, chk1w, wordCopy_loop, skip_pref, lastbloop, 89 loop16w, chk1w, wordCopy_loop, skip_pref, lastbloop,
90 leave, ua_chk16w, ua_loop16w, ua_skip_pref, ua_chkw, 90 leave, ua_chk16w, ua_loop16w, ua_skip_pref, ua_chkw,
91 ua_chk1w, ua_wordCopy_loop, ua_smallCopy, ua_smallCopy_loop; 91 ua_chk1w, ua_wordCopy_loop, ua_smallCopy, ua_smallCopy_loop;
92 92
93 // The size of each prefetch. 93 // The size of each prefetch.
94 uint32_t pref_chunk = 32; 94 uint32_t pref_chunk = 32;
95 // The maximum size of a prefetch, it must not be less then pref_chunk. 95 // The maximum size of a prefetch, it must not be less then pref_chunk.
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 605
606 UnaryMathFunction CreateSqrtFunction() { 606 UnaryMathFunction CreateSqrtFunction() {
607 #if defined(USE_SIMULATOR) 607 #if defined(USE_SIMULATOR)
608 return &std::sqrt; 608 return &std::sqrt;
609 #else 609 #else
610 size_t actual_size; 610 size_t actual_size;
611 byte* buffer = 611 byte* buffer =
612 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); 612 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
613 if (buffer == NULL) return &std::sqrt; 613 if (buffer == NULL) return &std::sqrt;
614 614
615 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); 615 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size), false);
616 616
617 __ MovFromFloatParameter(f12); 617 __ MovFromFloatParameter(f12);
618 __ sqrt_d(f0, f12); 618 __ sqrt_d(f0, f12);
619 __ MovToFloatResult(f0); 619 __ MovToFloatResult(f0);
620 __ Ret(); 620 __ Ret();
621 621
622 CodeDesc desc; 622 CodeDesc desc;
623 masm.GetCode(&desc); 623 masm.GetCode(&desc);
624 DCHECK(!RelocInfo::RequiresRelocation(desc)); 624 DCHECK(!RelocInfo::RequiresRelocation(desc));
625 625
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 } 1253 }
1254 } 1254 }
1255 1255
1256 1256
1257 #undef __ 1257 #undef __
1258 1258
1259 } // namespace internal 1259 } // namespace internal
1260 } // namespace v8 1260 } // namespace v8
1261 1261
1262 #endif // V8_TARGET_ARCH_MIPS64 1262 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698