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

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

Issue 817143002: Contribution of PowerPC port (continuation of 422063005) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Contribution of PowerPC port - rebase and address initial set of comments Created 5 years, 11 months 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.cc ('k') | src/ppc/regexp-macro-assembler-ppc.cc » ('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/v8.h" 5 #include "src/v8.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 28 matching lines...) Expand all
39 { 39 {
40 DoubleRegister input = d1; 40 DoubleRegister input = d1;
41 DoubleRegister result = d2; 41 DoubleRegister result = d2;
42 DoubleRegister double_scratch1 = d3; 42 DoubleRegister double_scratch1 = d3;
43 DoubleRegister double_scratch2 = d4; 43 DoubleRegister double_scratch2 = d4;
44 Register temp1 = r7; 44 Register temp1 = r7;
45 Register temp2 = r8; 45 Register temp2 = r8;
46 Register temp3 = r9; 46 Register temp3 = r9;
47 47
48 // Called from C 48 // Called from C
49 #if ABI_USES_FUNCTION_DESCRIPTORS
50 __ function_descriptor(); 49 __ function_descriptor();
51 #endif
52 50
53 __ Push(temp3, temp2, temp1); 51 __ Push(temp3, temp2, temp1);
54 MathExpGenerator::EmitMathExp(&masm, input, result, double_scratch1, 52 MathExpGenerator::EmitMathExp(&masm, input, result, double_scratch1,
55 double_scratch2, temp1, temp2, temp3); 53 double_scratch2, temp1, temp2, temp3);
56 __ Pop(temp3, temp2, temp1); 54 __ Pop(temp3, temp2, temp1);
57 __ fmr(d1, result); 55 __ fmr(d1, result);
58 __ Ret(); 56 __ Ret();
59 } 57 }
60 58
61 CodeDesc desc; 59 CodeDesc desc;
(...skipping 19 matching lines...) Expand all
81 return &std::sqrt; 79 return &std::sqrt;
82 #else 80 #else
83 size_t actual_size; 81 size_t actual_size;
84 byte* buffer = 82 byte* buffer =
85 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); 83 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
86 if (buffer == NULL) return &std::sqrt; 84 if (buffer == NULL) return &std::sqrt;
87 85
88 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); 86 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
89 87
90 // Called from C 88 // Called from C
91 #if ABI_USES_FUNCTION_DESCRIPTORS
92 __ function_descriptor(); 89 __ function_descriptor();
93 #endif
94 90
95 __ MovFromFloatParameter(d1); 91 __ MovFromFloatParameter(d1);
96 __ fsqrt(d1, d1); 92 __ fsqrt(d1, d1);
97 __ MovToFloatResult(d1); 93 __ MovToFloatResult(d1);
98 __ Ret(); 94 __ Ret();
99 95
100 CodeDesc desc; 96 CodeDesc desc;
101 masm.GetCode(&desc); 97 masm.GetCode(&desc);
102 #if !ABI_USES_FUNCTION_DESCRIPTORS 98 #if !ABI_USES_FUNCTION_DESCRIPTORS
103 DCHECK(!RelocInfo::RequiresRelocation(desc)); 99 DCHECK(!RelocInfo::RequiresRelocation(desc));
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 patcher.masm()->Jump(r3); 687 patcher.masm()->Jump(r3);
692 for (int i = 0; i < kCodeAgingSequenceNops; i++) { 688 for (int i = 0; i < kCodeAgingSequenceNops; i++) {
693 patcher.masm()->nop(); 689 patcher.masm()->nop();
694 } 690 }
695 } 691 }
696 } 692 }
697 } 693 }
698 } // namespace v8::internal 694 } // namespace v8::internal
699 695
700 #endif // V8_TARGET_ARCH_PPC 696 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | src/ppc/regexp-macro-assembler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698