OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 126 matching lines...) Loading... |
137 pc = 15, | 137 pc = 15, |
138 s0 = 0, s1, s2, s3, s4, s5, s6, s7, | 138 s0 = 0, s1, s2, s3, s4, s5, s6, s7, |
139 s8, s9, s10, s11, s12, s13, s14, s15, | 139 s8, s9, s10, s11, s12, s13, s14, s15, |
140 s16, s17, s18, s19, s20, s21, s22, s23, | 140 s16, s17, s18, s19, s20, s21, s22, s23, |
141 s24, s25, s26, s27, s28, s29, s30, s31, | 141 s24, s25, s26, s27, s28, s29, s30, s31, |
142 num_s_registers = 32, | 142 num_s_registers = 32, |
143 d0 = 0, d1, d2, d3, d4, d5, d6, d7, | 143 d0 = 0, d1, d2, d3, d4, d5, d6, d7, |
144 d8, d9, d10, d11, d12, d13, d14, d15, | 144 d8, d9, d10, d11, d12, d13, d14, d15, |
145 d16, d17, d18, d19, d20, d21, d22, d23, | 145 d16, d17, d18, d19, d20, d21, d22, d23, |
146 d24, d25, d26, d27, d28, d29, d30, d31, | 146 d24, d25, d26, d27, d28, d29, d30, d31, |
147 num_d_registers = 32 | 147 num_d_registers = 32, |
| 148 q0 = 0, q1, q2, q3, q4, q5, q6, q7, |
| 149 q8, q9, q10, q11, q12, q13, q14, q15, |
| 150 num_q_registers = 16 |
148 }; | 151 }; |
149 | 152 |
150 explicit Simulator(Isolate* isolate); | 153 explicit Simulator(Isolate* isolate); |
151 ~Simulator(); | 154 ~Simulator(); |
152 | 155 |
153 // The currently executing Simulator instance. Potentially there can be one | 156 // The currently executing Simulator instance. Potentially there can be one |
154 // for each native thread. | 157 // for each native thread. |
155 static Simulator* current(v8::internal::Isolate* isolate); | 158 static Simulator* current(v8::internal::Isolate* isolate); |
156 | 159 |
157 // Accessors for register state. Reading the pc value adheres to the ARM | 160 // Accessors for register state. Reading the pc value adheres to the ARM |
158 // architecture specification and is off by a 8 from the currently executing | 161 // architecture specification and is off by a 8 from the currently executing |
159 // instruction. | 162 // instruction. |
160 void set_register(int reg, int32_t value); | 163 void set_register(int reg, int32_t value); |
161 int32_t get_register(int reg) const; | 164 int32_t get_register(int reg) const; |
162 double get_double_from_register_pair(int reg); | 165 double get_double_from_register_pair(int reg); |
163 void set_dw_register(int dreg, const int* dbl); | 166 void set_dw_register(int dreg, const int* dbl); |
164 | 167 |
165 // Support for VFP. | 168 // Support for VFP. |
| 169 void get_d_register(int dreg, uint64_t* value); |
| 170 void set_d_register(int dreg, const uint64_t* value); |
| 171 void get_d_register(int dreg, uint32_t* value); |
| 172 void set_d_register(int dreg, const uint32_t* value); |
| 173 void get_q_register(int qreg, uint64_t* value); |
| 174 void set_q_register(int qreg, const uint64_t* value); |
| 175 void get_q_register(int qreg, uint32_t* value); |
| 176 void set_q_register(int qreg, const uint32_t* value); |
| 177 |
166 void set_s_register(int reg, unsigned int value); | 178 void set_s_register(int reg, unsigned int value); |
167 unsigned int get_s_register(int reg) const; | 179 unsigned int get_s_register(int reg) const; |
168 | 180 |
169 void set_d_register_from_double(int dreg, const double& dbl) { | 181 void set_d_register_from_double(int dreg, const double& dbl) { |
170 SetVFPRegister<double, 2>(dreg, dbl); | 182 SetVFPRegister<double, 2>(dreg, dbl); |
171 } | 183 } |
172 | 184 |
173 double get_double_from_d_register(int dreg) { | 185 double get_double_from_d_register(int dreg) { |
174 return GetFromVFPRegister<double, 2>(dreg); | 186 return GetFromVFPRegister<double, 2>(dreg); |
175 } | 187 } |
(...skipping 145 matching lines...) Loading... |
321 void DecodeType2(Instruction* instr); | 333 void DecodeType2(Instruction* instr); |
322 void DecodeType3(Instruction* instr); | 334 void DecodeType3(Instruction* instr); |
323 void DecodeType4(Instruction* instr); | 335 void DecodeType4(Instruction* instr); |
324 void DecodeType5(Instruction* instr); | 336 void DecodeType5(Instruction* instr); |
325 void DecodeType6(Instruction* instr); | 337 void DecodeType6(Instruction* instr); |
326 void DecodeType7(Instruction* instr); | 338 void DecodeType7(Instruction* instr); |
327 | 339 |
328 // Support for VFP. | 340 // Support for VFP. |
329 void DecodeTypeVFP(Instruction* instr); | 341 void DecodeTypeVFP(Instruction* instr); |
330 void DecodeType6CoprocessorIns(Instruction* instr); | 342 void DecodeType6CoprocessorIns(Instruction* instr); |
| 343 void DecodeSpecialCondition(Instruction* instr); |
331 | 344 |
332 void DecodeVMOVBetweenCoreAndSinglePrecisionRegisters(Instruction* instr); | 345 void DecodeVMOVBetweenCoreAndSinglePrecisionRegisters(Instruction* instr); |
333 void DecodeVCMP(Instruction* instr); | 346 void DecodeVCMP(Instruction* instr); |
334 void DecodeVCVTBetweenDoubleAndSingle(Instruction* instr); | 347 void DecodeVCVTBetweenDoubleAndSingle(Instruction* instr); |
335 void DecodeVCVTBetweenFloatingPointAndInteger(Instruction* instr); | 348 void DecodeVCVTBetweenFloatingPointAndInteger(Instruction* instr); |
336 | 349 |
337 // Executes one instruction. | 350 // Executes one instruction. |
338 void InstructionDecode(Instruction* instr); | 351 void InstructionDecode(Instruction* instr); |
339 | 352 |
340 // ICache. | 353 // ICache. |
(...skipping 118 matching lines...) Loading... |
459 | 472 |
460 static inline void UnregisterCTryCatch() { | 473 static inline void UnregisterCTryCatch() { |
461 Simulator::current(Isolate::Current())->PopAddress(); | 474 Simulator::current(Isolate::Current())->PopAddress(); |
462 } | 475 } |
463 }; | 476 }; |
464 | 477 |
465 } } // namespace v8::internal | 478 } } // namespace v8::internal |
466 | 479 |
467 #endif // !defined(USE_SIMULATOR) | 480 #endif // !defined(USE_SIMULATOR) |
468 #endif // V8_ARM_SIMULATOR_ARM_H_ | 481 #endif // V8_ARM_SIMULATOR_ARM_H_ |
OLD | NEW |