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 1607663004: PPC: Cleanup ABI-specifc code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/disasm-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/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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 __ Push(temp3, temp2, temp1); 51 __ Push(temp3, temp2, temp1);
52 MathExpGenerator::EmitMathExp(&masm, input, result, double_scratch1, 52 MathExpGenerator::EmitMathExp(&masm, input, result, double_scratch1,
53 double_scratch2, temp1, temp2, temp3); 53 double_scratch2, temp1, temp2, temp3);
54 __ Pop(temp3, temp2, temp1); 54 __ Pop(temp3, temp2, temp1);
55 __ fmr(d1, result); 55 __ fmr(d1, result);
56 __ Ret(); 56 __ Ret();
57 } 57 }
58 58
59 CodeDesc desc; 59 CodeDesc desc;
60 masm.GetCode(&desc); 60 masm.GetCode(&desc);
61 #if !ABI_USES_FUNCTION_DESCRIPTORS 61 DCHECK(ABI_USES_FUNCTION_DESCRIPTORS || !RelocInfo::RequiresRelocation(desc));
62 DCHECK(!RelocInfo::RequiresRelocation(desc));
63 #endif
64 62
65 Assembler::FlushICache(isolate, buffer, actual_size); 63 Assembler::FlushICache(isolate, buffer, actual_size);
66 base::OS::ProtectCode(buffer, actual_size); 64 base::OS::ProtectCode(buffer, actual_size);
67 65
68 #if !defined(USE_SIMULATOR) 66 #if !defined(USE_SIMULATOR)
69 return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer); 67 return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer);
70 #else 68 #else
71 fast_exp_ppc_machine_code = buffer; 69 fast_exp_ppc_machine_code = buffer;
72 return &fast_exp_simulator; 70 return &fast_exp_simulator;
73 #endif 71 #endif
(...skipping 15 matching lines...) Expand all
89 // Called from C 87 // Called from C
90 __ function_descriptor(); 88 __ function_descriptor();
91 89
92 __ MovFromFloatParameter(d1); 90 __ MovFromFloatParameter(d1);
93 __ fsqrt(d1, d1); 91 __ fsqrt(d1, d1);
94 __ MovToFloatResult(d1); 92 __ MovToFloatResult(d1);
95 __ Ret(); 93 __ Ret();
96 94
97 CodeDesc desc; 95 CodeDesc desc;
98 masm.GetCode(&desc); 96 masm.GetCode(&desc);
99 #if !ABI_USES_FUNCTION_DESCRIPTORS 97 DCHECK(ABI_USES_FUNCTION_DESCRIPTORS || !RelocInfo::RequiresRelocation(desc));
100 DCHECK(!RelocInfo::RequiresRelocation(desc));
101 #endif
102 98
103 Assembler::FlushICache(isolate, buffer, actual_size); 99 Assembler::FlushICache(isolate, buffer, actual_size);
104 base::OS::ProtectCode(buffer, actual_size); 100 base::OS::ProtectCode(buffer, actual_size);
105 return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer); 101 return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer);
106 #endif 102 #endif
107 } 103 }
108 104
109 #undef __ 105 #undef __
110 106
111 107
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 patcher.masm()->Jump(r3); 674 patcher.masm()->Jump(r3);
679 for (int i = 0; i < kCodeAgingSequenceNops; i++) { 675 for (int i = 0; i < kCodeAgingSequenceNops; i++) {
680 patcher.masm()->nop(); 676 patcher.masm()->nop();
681 } 677 }
682 } 678 }
683 } 679 }
684 } // namespace internal 680 } // namespace internal
685 } // namespace v8 681 } // namespace v8
686 682
687 #endif // V8_TARGET_ARCH_PPC 683 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | src/ppc/disasm-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698