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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 sp = 13, | 135 sp = 13, |
136 lr = 14, | 136 lr = 14, |
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 num_d_registers = 16 | 145 d16, d17, d18, d19, d20, d21, d22, d23, |
| 146 d24, d25, d26, d27, d28, d29, d30, d31, |
| 147 num_d_registers = 32 |
146 }; | 148 }; |
147 | 149 |
148 explicit Simulator(Isolate* isolate); | 150 explicit Simulator(Isolate* isolate); |
149 ~Simulator(); | 151 ~Simulator(); |
150 | 152 |
151 // The currently executing Simulator instance. Potentially there can be one | 153 // The currently executing Simulator instance. Potentially there can be one |
152 // for each native thread. | 154 // for each native thread. |
153 static Simulator* current(v8::internal::Isolate* isolate); | 155 static Simulator* current(v8::internal::Isolate* isolate); |
154 | 156 |
155 // Accessors for register state. Reading the pc value adheres to the ARM | 157 // Accessors for register state. Reading the pc value adheres to the ARM |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // Saturating instructions require a Q flag to indicate saturation. | 366 // Saturating instructions require a Q flag to indicate saturation. |
365 // There is currently no way to read the CPSR directly, and thus read the Q | 367 // There is currently no way to read the CPSR directly, and thus read the Q |
366 // flag, so this is left unimplemented. | 368 // flag, so this is left unimplemented. |
367 int32_t registers_[16]; | 369 int32_t registers_[16]; |
368 bool n_flag_; | 370 bool n_flag_; |
369 bool z_flag_; | 371 bool z_flag_; |
370 bool c_flag_; | 372 bool c_flag_; |
371 bool v_flag_; | 373 bool v_flag_; |
372 | 374 |
373 // VFP architecture state. | 375 // VFP architecture state. |
374 unsigned int vfp_register[num_s_registers]; | 376 unsigned int vfp_register[num_d_registers * 2]; |
375 bool n_flag_FPSCR_; | 377 bool n_flag_FPSCR_; |
376 bool z_flag_FPSCR_; | 378 bool z_flag_FPSCR_; |
377 bool c_flag_FPSCR_; | 379 bool c_flag_FPSCR_; |
378 bool v_flag_FPSCR_; | 380 bool v_flag_FPSCR_; |
379 | 381 |
380 // VFP rounding mode. See ARM DDI 0406B Page A2-29. | 382 // VFP rounding mode. See ARM DDI 0406B Page A2-29. |
381 VFPRoundingMode FPSCR_rounding_mode_; | 383 VFPRoundingMode FPSCR_rounding_mode_; |
382 | 384 |
383 // VFP FP exception flags architecture state. | 385 // VFP FP exception flags architecture state. |
384 bool inv_op_vfp_flag_; | 386 bool inv_op_vfp_flag_; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 | 459 |
458 static inline void UnregisterCTryCatch() { | 460 static inline void UnregisterCTryCatch() { |
459 Simulator::current(Isolate::Current())->PopAddress(); | 461 Simulator::current(Isolate::Current())->PopAddress(); |
460 } | 462 } |
461 }; | 463 }; |
462 | 464 |
463 } } // namespace v8::internal | 465 } } // namespace v8::internal |
464 | 466 |
465 #endif // !defined(USE_SIMULATOR) | 467 #endif // !defined(USE_SIMULATOR) |
466 #endif // V8_ARM_SIMULATOR_ARM_H_ | 468 #endif // V8_ARM_SIMULATOR_ARM_H_ |
OLD | NEW |