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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // r7: context register | 142 // r7: context register |
143 // r8: constant pool pointer register if FLAG_enable_embedded_constant_pool. | 143 // r8: constant pool pointer register if FLAG_enable_embedded_constant_pool. |
144 // r9: lithium scratch | 144 // r9: lithium scratch |
145 #define DECLARE_REGISTER(R) const Register R = {Register::kCode_##R}; | 145 #define DECLARE_REGISTER(R) const Register R = {Register::kCode_##R}; |
146 GENERAL_REGISTERS(DECLARE_REGISTER) | 146 GENERAL_REGISTERS(DECLARE_REGISTER) |
147 #undef DECLARE_REGISTER | 147 #undef DECLARE_REGISTER |
148 const Register no_reg = {Register::kCode_no_reg}; | 148 const Register no_reg = {Register::kCode_no_reg}; |
149 | 149 |
150 // Single word VFP register. | 150 // Single word VFP register. |
151 struct SwVfpRegister { | 151 struct SwVfpRegister { |
| 152 enum Code { |
| 153 #define REGISTER_CODE(R) kCode_##R, |
| 154 FLOAT_REGISTERS(REGISTER_CODE) |
| 155 #undef REGISTER_CODE |
| 156 kAfterLast, |
| 157 kCode_no_reg = -1 |
| 158 }; |
| 159 |
| 160 static const int kMaxNumRegisters = Code::kAfterLast; |
| 161 |
152 static const int kSizeInBytes = 4; | 162 static const int kSizeInBytes = 4; |
| 163 |
| 164 const char* ToString(); |
| 165 bool IsAllocatable() const; |
153 bool is_valid() const { return 0 <= reg_code && reg_code < 32; } | 166 bool is_valid() const { return 0 <= reg_code && reg_code < 32; } |
154 bool is(SwVfpRegister reg) const { return reg_code == reg.reg_code; } | 167 bool is(SwVfpRegister reg) const { return reg_code == reg.reg_code; } |
155 int code() const { | 168 int code() const { |
156 DCHECK(is_valid()); | 169 DCHECK(is_valid()); |
157 return reg_code; | 170 return reg_code; |
158 } | 171 } |
159 int bit() const { | 172 int bit() const { |
160 DCHECK(is_valid()); | 173 DCHECK(is_valid()); |
161 return 1 << reg_code; | 174 return 1 << reg_code; |
162 } | 175 } |
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1684 explicit EnsureSpace(Assembler* assembler) { | 1697 explicit EnsureSpace(Assembler* assembler) { |
1685 assembler->CheckBuffer(); | 1698 assembler->CheckBuffer(); |
1686 } | 1699 } |
1687 }; | 1700 }; |
1688 | 1701 |
1689 | 1702 |
1690 } // namespace internal | 1703 } // namespace internal |
1691 } // namespace v8 | 1704 } // namespace v8 |
1692 | 1705 |
1693 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1706 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |