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

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: Fix typo Created 7 years, 4 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/builtins-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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // doing certain constant folds, which may significantly reduce the 110 // doing certain constant folds, which may significantly reduce the
111 // code generated for some assembly instructions (because they boil down 111 // code generated for some assembly instructions (because they boil down
112 // to a few constants). If this is a problem, we could change the code 112 // to a few constants). If this is a problem, we could change the code
113 // such that we use an enum in optimized mode, and the struct in debug 113 // such that we use an enum in optimized mode, and the struct in debug
114 // mode. This way we get the compile-time error checking in debug mode 114 // mode. This way we get the compile-time error checking in debug mode
115 // and best performance in optimized code. 115 // and best performance in optimized code.
116 116
117 // Core register 117 // Core register
118 struct Register { 118 struct Register {
119 static const int kNumRegisters = 16; 119 static const int kNumRegisters = 16;
120 static const int kMaxNumAllocatableRegisters = 8; 120 static const int kMaxNumAllocatableRegisters =
121 FLAG_enable_ool_constant_pool ? 7 : 8;
121 static const int kSizeInBytes = 4; 122 static const int kSizeInBytes = 4;
122 123
123 inline static int NumAllocatableRegisters(); 124 inline static int NumAllocatableRegisters();
124 125
125 static int ToAllocationIndex(Register reg) { 126 static int ToAllocationIndex(Register reg) {
126 ASSERT(reg.code() < kMaxNumAllocatableRegisters); 127 ASSERT(reg.code() < kMaxNumAllocatableRegisters);
127 return reg.code(); 128 return reg.code();
128 } 129 }
129 130
130 static Register FromAllocationIndex(int index) { 131 static Register FromAllocationIndex(int index) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 194
194 const Register no_reg = { kRegister_no_reg_Code }; 195 const Register no_reg = { kRegister_no_reg_Code };
195 196
196 const Register r0 = { kRegister_r0_Code }; 197 const Register r0 = { kRegister_r0_Code };
197 const Register r1 = { kRegister_r1_Code }; 198 const Register r1 = { kRegister_r1_Code };
198 const Register r2 = { kRegister_r2_Code }; 199 const Register r2 = { kRegister_r2_Code };
199 const Register r3 = { kRegister_r3_Code }; 200 const Register r3 = { kRegister_r3_Code };
200 const Register r4 = { kRegister_r4_Code }; 201 const Register r4 = { kRegister_r4_Code };
201 const Register r5 = { kRegister_r5_Code }; 202 const Register r5 = { kRegister_r5_Code };
202 const Register r6 = { kRegister_r6_Code }; 203 const Register r6 = { kRegister_r6_Code };
204 // Used as constant pool pointer register if FLAGS_enable_ool_constant_pool.
203 const Register r7 = { kRegister_r7_Code }; 205 const Register r7 = { kRegister_r7_Code };
204 // Used as context register. 206 // Used as context register.
205 const Register r8 = { kRegister_r8_Code }; 207 const Register r8 = { kRegister_r8_Code };
206 // Used as lithium codegen scratch register. 208 // Used as lithium codegen scratch register.
207 const Register r9 = { kRegister_r9_Code }; 209 const Register r9 = { kRegister_r9_Code };
208 // Used as roots register. 210 // Used as roots register.
209 const Register r10 = { kRegister_r10_Code }; 211 const Register r10 = { kRegister_r10_Code };
210 const Register fp = { kRegister_fp_Code }; 212 const Register fp = { kRegister_fp_Code };
211 const Register ip = { kRegister_ip_Code }; 213 const Register ip = { kRegister_ip_Code };
212 const Register sp = { kRegister_sp_Code }; 214 const Register sp = { kRegister_sp_Code };
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 public: 1549 public:
1548 explicit EnsureSpace(Assembler* assembler) { 1550 explicit EnsureSpace(Assembler* assembler) {
1549 assembler->CheckBuffer(); 1551 assembler->CheckBuffer();
1550 } 1552 }
1551 }; 1553 };
1552 1554
1553 1555
1554 } } // namespace v8::internal 1556 } } // namespace v8::internal
1555 1557
1556 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1558 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/builtins-arm.cc » ('j') | src/arm/builtins-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698