| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 bool is_valid() const { return 0 <= code_ && code_ < 32; } | 113 bool is_valid() const { return 0 <= code_ && code_ < 32; } |
| 114 bool is(SwVfpRegister reg) const { return code_ == reg.code_; } | 114 bool is(SwVfpRegister reg) const { return code_ == reg.code_; } |
| 115 int code() const { | 115 int code() const { |
| 116 ASSERT(is_valid()); | 116 ASSERT(is_valid()); |
| 117 return code_; | 117 return code_; |
| 118 } | 118 } |
| 119 int bit() const { | 119 int bit() const { |
| 120 ASSERT(is_valid()); | 120 ASSERT(is_valid()); |
| 121 return 1 << code_; | 121 return 1 << code_; |
| 122 } | 122 } |
| 123 void split_code(int* vm, int* m) const { |
| 124 ASSERT(is_valid()); |
| 125 *m = code_ & 0x1; |
| 126 *vm = code_ >> 1; |
| 127 } |
| 123 | 128 |
| 124 int code_; | 129 int code_; |
| 125 }; | 130 }; |
| 126 | 131 |
| 127 | 132 |
| 128 // Double word VFP register. | 133 // Double word VFP register. |
| 129 struct DwVfpRegister { | 134 struct DwVfpRegister { |
| 130 // Supporting d0 to d15, can be later extended to d31. | 135 // Supporting d0 to d15, can be later extended to d31. |
| 131 bool is_valid() const { return 0 <= code_ && code_ < 16; } | 136 bool is_valid() const { return 0 <= code_ && code_ < 16; } |
| 132 bool is(DwVfpRegister reg) const { return code_ == reg.code_; } | 137 bool is(DwVfpRegister reg) const { return code_ == reg.code_; } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 145 return reg; | 150 return reg; |
| 146 } | 151 } |
| 147 int code() const { | 152 int code() const { |
| 148 ASSERT(is_valid()); | 153 ASSERT(is_valid()); |
| 149 return code_; | 154 return code_; |
| 150 } | 155 } |
| 151 int bit() const { | 156 int bit() const { |
| 152 ASSERT(is_valid()); | 157 ASSERT(is_valid()); |
| 153 return 1 << code_; | 158 return 1 << code_; |
| 154 } | 159 } |
| 160 void split_code(int* vm, int* m) const { |
| 161 ASSERT(is_valid()); |
| 162 *m = (code_ & 0x10) >> 4; |
| 163 *vm = code_ & 0x0F; |
| 164 } |
| 155 | 165 |
| 156 int code_; | 166 int code_; |
| 157 }; | 167 }; |
| 158 | 168 |
| 159 | 169 |
| 160 // Support for the VFP registers s0 to s31 (d0 to d15). | 170 // Support for the VFP registers s0 to s31 (d0 to d15). |
| 161 // Note that "s(N):s(N+1)" is the same as "d(N/2)". | 171 // Note that "s(N):s(N+1)" is the same as "d(N/2)". |
| 162 const SwVfpRegister s0 = { 0 }; | 172 const SwVfpRegister s0 = { 0 }; |
| 163 const SwVfpRegister s1 = { 1 }; | 173 const SwVfpRegister s1 = { 1 }; |
| 164 const SwVfpRegister s2 = { 2 }; | 174 const SwVfpRegister s2 = { 2 }; |
| (...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 | 1285 |
| 1276 friend class RegExpMacroAssemblerARM; | 1286 friend class RegExpMacroAssemblerARM; |
| 1277 friend class RelocInfo; | 1287 friend class RelocInfo; |
| 1278 friend class CodePatcher; | 1288 friend class CodePatcher; |
| 1279 friend class BlockConstPoolScope; | 1289 friend class BlockConstPoolScope; |
| 1280 }; | 1290 }; |
| 1281 | 1291 |
| 1282 } } // namespace v8::internal | 1292 } } // namespace v8::internal |
| 1283 | 1293 |
| 1284 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1294 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |