OLD | NEW |
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // code generated for some assembly instructions (because they boil down | 65 // code generated for some assembly instructions (because they boil down |
66 // to a few constants). If this is a problem, we could change the code | 66 // to a few constants). If this is a problem, we could change the code |
67 // such that we use an enum in optimized mode, and the struct in debug | 67 // such that we use an enum in optimized mode, and the struct in debug |
68 // mode. This way we get the compile-time error checking in debug mode | 68 // mode. This way we get the compile-time error checking in debug mode |
69 // and best performance in optimized code. | 69 // and best performance in optimized code. |
70 | 70 |
71 // Core register | 71 // Core register |
72 struct Register { | 72 struct Register { |
73 static const int kNumRegisters = 16; | 73 static const int kNumRegisters = 16; |
74 static const int kNumAllocatableRegisters = 8; | 74 static const int kNumAllocatableRegisters = 8; |
| 75 static const int kSizeInBytes = 4; |
75 | 76 |
76 static int ToAllocationIndex(Register reg) { | 77 static int ToAllocationIndex(Register reg) { |
77 ASSERT(reg.code() < kNumAllocatableRegisters); | 78 ASSERT(reg.code() < kNumAllocatableRegisters); |
78 return reg.code(); | 79 return reg.code(); |
79 } | 80 } |
80 | 81 |
81 static Register FromAllocationIndex(int index) { | 82 static Register FromAllocationIndex(int index) { |
82 ASSERT(index >= 0 && index < kNumAllocatableRegisters); | 83 ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
83 return from_code(index); | 84 return from_code(index); |
84 } | 85 } |
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 public: | 1364 public: |
1364 explicit EnsureSpace(Assembler* assembler) { | 1365 explicit EnsureSpace(Assembler* assembler) { |
1365 assembler->CheckBuffer(); | 1366 assembler->CheckBuffer(); |
1366 } | 1367 } |
1367 }; | 1368 }; |
1368 | 1369 |
1369 | 1370 |
1370 } } // namespace v8::internal | 1371 } } // namespace v8::internal |
1371 | 1372 |
1372 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1373 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |