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

Side by Side Diff: src/arm/assembler-arm.h

Issue 21063002: Out-of-line constant pool on Arm: Stage 1 - Free up r7 for use as constant pool pointer register (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/builtins-arm.cc » ('j') | src/arm/stub-cache-arm.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // doing certain constant folds, which may significantly reduce the 111 // doing certain constant folds, which may significantly reduce the
112 // code generated for some assembly instructions (because they boil down 112 // code generated for some assembly instructions (because they boil down
113 // to a few constants). If this is a problem, we could change the code 113 // to a few constants). If this is a problem, we could change the code
114 // such that we use an enum in optimized mode, and the struct in debug 114 // such that we use an enum in optimized mode, and the struct in debug
115 // mode. This way we get the compile-time error checking in debug mode 115 // mode. This way we get the compile-time error checking in debug mode
116 // and best performance in optimized code. 116 // and best performance in optimized code.
117 117
118 // Core register 118 // Core register
119 struct Register { 119 struct Register {
120 static const int kNumRegisters = 16; 120 static const int kNumRegisters = 16;
121 static const int kMaxNumAllocatableRegisters = 8; 121 static const int kMaxNumAllocatableRegisters =
122 FLAG_enable_ool_constant_pool ? 7 : 8;
122 static const int kSizeInBytes = 4; 123 static const int kSizeInBytes = 4;
123 124
124 inline static int NumAllocatableRegisters(); 125 inline static int NumAllocatableRegisters();
125 126
126 static int ToAllocationIndex(Register reg) { 127 static int ToAllocationIndex(Register reg) {
127 ASSERT(reg.code() < kMaxNumAllocatableRegisters); 128 ASSERT(reg.code() < kMaxNumAllocatableRegisters);
128 return reg.code(); 129 return reg.code();
129 } 130 }
130 131
131 static Register FromAllocationIndex(int index) { 132 static Register FromAllocationIndex(int index) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 195
195 const Register no_reg = { kRegister_no_reg_Code }; 196 const Register no_reg = { kRegister_no_reg_Code };
196 197
197 const Register r0 = { kRegister_r0_Code }; 198 const Register r0 = { kRegister_r0_Code };
198 const Register r1 = { kRegister_r1_Code }; 199 const Register r1 = { kRegister_r1_Code };
199 const Register r2 = { kRegister_r2_Code }; 200 const Register r2 = { kRegister_r2_Code };
200 const Register r3 = { kRegister_r3_Code }; 201 const Register r3 = { kRegister_r3_Code };
201 const Register r4 = { kRegister_r4_Code }; 202 const Register r4 = { kRegister_r4_Code };
202 const Register r5 = { kRegister_r5_Code }; 203 const Register r5 = { kRegister_r5_Code };
203 const Register r6 = { kRegister_r6_Code }; 204 const Register r6 = { kRegister_r6_Code };
205 // Used as constant pool pointer register if FLAGS_enable_ool_constant_pool.
204 const Register r7 = { kRegister_r7_Code }; 206 const Register r7 = { kRegister_r7_Code };
205 // Used as context register. 207 // Used as context register.
206 const Register r8 = { kRegister_r8_Code }; 208 const Register r8 = { kRegister_r8_Code };
207 // Used as lithium codegen scratch register. 209 // Used as lithium codegen scratch register.
208 const Register r9 = { kRegister_r9_Code }; 210 const Register r9 = { kRegister_r9_Code };
209 // Used as roots register. 211 // Used as roots register.
210 const Register r10 = { kRegister_r10_Code }; 212 const Register r10 = { kRegister_r10_Code };
211 const Register fp = { kRegister_fp_Code }; 213 const Register fp = { kRegister_fp_Code };
212 const Register ip = { kRegister_ip_Code }; 214 const Register ip = { kRegister_ip_Code };
213 const Register sp = { kRegister_sp_Code }; 215 const Register sp = { kRegister_sp_Code };
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 public: 1578 public:
1577 explicit EnsureSpace(Assembler* assembler) { 1579 explicit EnsureSpace(Assembler* assembler) {
1578 assembler->CheckBuffer(); 1580 assembler->CheckBuffer();
1579 } 1581 }
1580 }; 1582 };
1581 1583
1582 1584
1583 } } // namespace v8::internal 1585 } } // namespace v8::internal
1584 1586
1585 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1587 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/builtins-arm.cc » ('j') | src/arm/stub-cache-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698