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

Side by Side Diff: src/ppc/codegen-ppc.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/ppc/code-stubs-ppc.h ('k') | src/ppc/macro-assembler-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ppc/codegen-ppc.h" 5 #include "src/ppc/codegen-ppc.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
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 15 matching lines...) Expand all
26 #endif 26 #endif
27 27
28 28
29 UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) { 29 UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
30 size_t actual_size; 30 size_t actual_size;
31 byte* buffer = 31 byte* buffer =
32 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); 32 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
33 if (buffer == nullptr) return nullptr; 33 if (buffer == nullptr) return nullptr;
34 ExternalReference::InitializeMathExpData(); 34 ExternalReference::InitializeMathExpData();
35 35
36 MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size)); 36 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
37 CodeObjectRequired::kNo);
37 38
38 { 39 {
39 DoubleRegister input = d1; 40 DoubleRegister input = d1;
40 DoubleRegister result = d2; 41 DoubleRegister result = d2;
41 DoubleRegister double_scratch1 = d3; 42 DoubleRegister double_scratch1 = d3;
42 DoubleRegister double_scratch2 = d4; 43 DoubleRegister double_scratch2 = d4;
43 Register temp1 = r7; 44 Register temp1 = r7;
44 Register temp2 = r8; 45 Register temp2 = r8;
45 Register temp3 = r9; 46 Register temp3 = r9;
46 47
(...skipping 28 matching lines...) Expand all
75 76
76 UnaryMathFunction CreateSqrtFunction() { 77 UnaryMathFunction CreateSqrtFunction() {
77 #if defined(USE_SIMULATOR) 78 #if defined(USE_SIMULATOR)
78 return &std::sqrt; 79 return &std::sqrt;
79 #else 80 #else
80 size_t actual_size; 81 size_t actual_size;
81 byte* buffer = 82 byte* buffer =
82 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); 83 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
83 if (buffer == NULL) return &std::sqrt; 84 if (buffer == NULL) return &std::sqrt;
84 85
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 // Called from C 89 // Called from C
88 __ function_descriptor(); 90 __ function_descriptor();
89 91
90 __ MovFromFloatParameter(d1); 92 __ MovFromFloatParameter(d1);
91 __ fsqrt(d1, d1); 93 __ fsqrt(d1, d1);
92 __ MovToFloatResult(d1); 94 __ MovToFloatResult(d1);
93 __ Ret(); 95 __ Ret();
94 96
95 CodeDesc desc; 97 CodeDesc desc;
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 patcher.masm()->Jump(r3); 675 patcher.masm()->Jump(r3);
674 for (int i = 0; i < kCodeAgingSequenceNops; i++) { 676 for (int i = 0; i < kCodeAgingSequenceNops; i++) {
675 patcher.masm()->nop(); 677 patcher.masm()->nop();
676 } 678 }
677 } 679 }
678 } 680 }
679 } // namespace internal 681 } // namespace internal
680 } // namespace v8 682 } // namespace v8
681 683
682 #endif // V8_TARGET_ARCH_PPC 684 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/code-stubs-ppc.h ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698