| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 | 71 |
| 72 static inline void UnregisterCTryCatch() { } | 72 static inline void UnregisterCTryCatch() { } |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #else // !defined(USE_SIMULATOR) | 75 #else // !defined(USE_SIMULATOR) |
| 76 // Running with a simulator. | 76 // Running with a simulator. |
| 77 | 77 |
| 78 #include "constants-arm.h" | 78 #include "constants-arm.h" |
| 79 #include "hashmap.h" | 79 #include "hashmap.h" |
| 80 #include "assembler.h" |
| 80 | 81 |
| 81 namespace v8 { | 82 namespace v8 { |
| 82 namespace internal { | 83 namespace internal { |
| 83 | 84 |
| 84 class CachePage { | 85 class CachePage { |
| 85 public: | 86 public: |
| 86 static const int LINE_VALID = 0; | 87 static const int LINE_VALID = 0; |
| 87 static const int LINE_INVALID = 1; | 88 static const int LINE_INVALID = 1; |
| 88 | 89 |
| 89 static const int kPageShift = 12; | 90 static const int kPageShift = 12; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 // Executes one instruction. | 279 // Executes one instruction. |
| 279 void InstructionDecode(Instruction* instr); | 280 void InstructionDecode(Instruction* instr); |
| 280 | 281 |
| 281 // ICache. | 282 // ICache. |
| 282 static void CheckICache(v8::internal::HashMap* i_cache, Instruction* instr); | 283 static void CheckICache(v8::internal::HashMap* i_cache, Instruction* instr); |
| 283 static void FlushOnePage(v8::internal::HashMap* i_cache, intptr_t start, | 284 static void FlushOnePage(v8::internal::HashMap* i_cache, intptr_t start, |
| 284 int size); | 285 int size); |
| 285 static CachePage* GetCachePage(v8::internal::HashMap* i_cache, void* page); | 286 static CachePage* GetCachePage(v8::internal::HashMap* i_cache, void* page); |
| 286 | 287 |
| 287 // Runtime call support. | 288 // Runtime call support. |
| 288 static void* RedirectExternalReference(void* external_function, | 289 static void* RedirectExternalReference( |
| 289 bool fp_return); | 290 void* external_function, |
| 291 v8::internal::ExternalReference::Type type); |
| 290 | 292 |
| 291 // For use in calls that take two double values, constructed from r0, r1, r2 | 293 // For use in calls that take two double values, constructed from r0, r1, r2 |
| 292 // and r3. | 294 // and r3. |
| 293 void GetFpArgs(double* x, double* y); | 295 void GetFpArgs(double* x, double* y); |
| 294 void SetFpResult(const double& result); | 296 void SetFpResult(const double& result); |
| 295 void TrashCallerSaveRegisters(); | 297 void TrashCallerSaveRegisters(); |
| 296 | 298 |
| 297 // Architecture state. | 299 // Architecture state. |
| 298 // Saturating instructions require a Q flag to indicate saturation. | 300 // Saturating instructions require a Q flag to indicate saturation. |
| 299 // There is currently no way to read the CPSR directly, and thus read the Q | 301 // There is currently no way to read the CPSR directly, and thus read the Q |
| 300 // flag, so this is left unimplemented. | 302 // flag, so this is left unimplemented. |
| 301 int32_t registers_[16]; | 303 int32_t registers_[16]; |
| 302 bool n_flag_; | 304 bool n_flag_; |
| 303 bool z_flag_; | 305 bool z_flag_; |
| 304 bool c_flag_; | 306 bool c_flag_; |
| 305 bool v_flag_; | 307 bool v_flag_; |
| 306 | 308 |
| 307 // VFP architecture state. | 309 // VFP architecture state. |
| 308 unsigned int vfp_register[num_s_registers]; | 310 unsigned int vfp_register[num_s_registers]; |
| 309 bool n_flag_FPSCR_; | 311 bool n_flag_FPSCR_; |
| 310 bool z_flag_FPSCR_; | 312 bool z_flag_FPSCR_; |
| 311 bool c_flag_FPSCR_; | 313 bool c_flag_FPSCR_; |
| 312 bool v_flag_FPSCR_; | 314 bool v_flag_FPSCR_; |
| 313 | 315 |
| 314 // VFP rounding mode. See ARM DDI 0406B Page A2-29. | 316 // VFP rounding mode. See ARM DDI 0406B Page A2-29. |
| 315 FPSCRRoundingModes FPSCR_rounding_mode_; | 317 VFPRoundingMode FPSCR_rounding_mode_; |
| 316 | 318 |
| 317 // VFP FP exception flags architecture state. | 319 // VFP FP exception flags architecture state. |
| 318 bool inv_op_vfp_flag_; | 320 bool inv_op_vfp_flag_; |
| 319 bool div_zero_vfp_flag_; | 321 bool div_zero_vfp_flag_; |
| 320 bool overflow_vfp_flag_; | 322 bool overflow_vfp_flag_; |
| 321 bool underflow_vfp_flag_; | 323 bool underflow_vfp_flag_; |
| 322 bool inexact_vfp_flag_; | 324 bool inexact_vfp_flag_; |
| 323 | 325 |
| 324 // Simulator support. | 326 // Simulator support. |
| 325 char* stack_; | 327 char* stack_; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 389 |
| 388 static inline void UnregisterCTryCatch() { | 390 static inline void UnregisterCTryCatch() { |
| 389 Simulator::current(Isolate::Current())->PopAddress(); | 391 Simulator::current(Isolate::Current())->PopAddress(); |
| 390 } | 392 } |
| 391 }; | 393 }; |
| 392 | 394 |
| 393 } } // namespace v8::internal | 395 } } // namespace v8::internal |
| 394 | 396 |
| 395 #endif // !defined(USE_SIMULATOR) | 397 #endif // !defined(USE_SIMULATOR) |
| 396 #endif // V8_ARM_SIMULATOR_ARM_H_ | 398 #endif // V8_ARM_SIMULATOR_ARM_H_ |
| OLD | NEW |