OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Declares a Simulator for S390 instructions if we are not generating a native | 5 // Declares a Simulator for S390 instructions if we are not generating a native |
6 // S390 binary. This Simulator allows us to run and debug S390 code generation | 6 // S390 binary. This Simulator allows us to run and debug S390 code generation |
7 // on regular desktop machines. | 7 // on regular desktop machines. |
8 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro, | 8 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro, |
9 // which will start execution in the Simulator or forwards to the real entry | 9 // which will start execution in the Simulator or forwards to the real entry |
10 // on a S390 hardware platform. | 10 // on a S390 hardware platform. |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 int DecodeInstructionOriginal(Instruction* instr); | 515 int DecodeInstructionOriginal(Instruction* instr); |
516 int DecodeInstruction(Instruction* instr); | 516 int DecodeInstruction(Instruction* instr); |
517 int Evaluate_Unknown(Instruction* instr); | 517 int Evaluate_Unknown(Instruction* instr); |
518 #define MAX_NUM_OPCODES (1 << 16) | 518 #define MAX_NUM_OPCODES (1 << 16) |
519 typedef int (Simulator::*EvaluateFuncType)(Instruction*); | 519 typedef int (Simulator::*EvaluateFuncType)(Instruction*); |
520 | 520 |
521 static EvaluateFuncType EvalTable[MAX_NUM_OPCODES]; | 521 static EvaluateFuncType EvalTable[MAX_NUM_OPCODES]; |
522 static void EvalTableInit(); | 522 static void EvalTableInit(); |
523 | 523 |
524 #define EVALUATE(name) int Evaluate_##name(Instruction* instr) | 524 #define EVALUATE(name) int Evaluate_##name(Instruction* instr) |
| 525 #define EVALUATE_VRR_INSTRUCTIONS(name, op_name, op_value) EVALUATE(op_name); |
| 526 VRR_C_OPCODE_LIST(EVALUATE_VRR_INSTRUCTIONS) |
| 527 VRR_A_OPCODE_LIST(EVALUATE_VRR_INSTRUCTIONS) |
| 528 #undef EVALUATE_VRR_INSTRUCTIONS |
| 529 |
525 EVALUATE(DUMY); | 530 EVALUATE(DUMY); |
526 EVALUATE(BKPT); | 531 EVALUATE(BKPT); |
527 EVALUATE(SPM); | 532 EVALUATE(SPM); |
528 EVALUATE(BALR); | 533 EVALUATE(BALR); |
529 EVALUATE(BCTR); | 534 EVALUATE(BCTR); |
530 EVALUATE(BCR); | 535 EVALUATE(BCR); |
531 EVALUATE(SVC); | 536 EVALUATE(SVC); |
532 EVALUATE(BSM); | 537 EVALUATE(BSM); |
533 EVALUATE(BASSM); | 538 EVALUATE(BASSM); |
534 EVALUATE(BASR); | 539 EVALUATE(BASR); |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 static inline void UnregisterCTryCatch(v8::internal::Isolate* isolate) { | 1289 static inline void UnregisterCTryCatch(v8::internal::Isolate* isolate) { |
1285 Simulator::current(isolate)->PopAddress(); | 1290 Simulator::current(isolate)->PopAddress(); |
1286 } | 1291 } |
1287 }; | 1292 }; |
1288 | 1293 |
1289 } // namespace internal | 1294 } // namespace internal |
1290 } // namespace v8 | 1295 } // namespace v8 |
1291 | 1296 |
1292 #endif // !defined(USE_SIMULATOR) | 1297 #endif // !defined(USE_SIMULATOR) |
1293 #endif // V8_S390_SIMULATOR_S390_H_ | 1298 #endif // V8_S390_SIMULATOR_S390_H_ |
OLD | NEW |