| 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 #include <stdarg.h> | 5 #include <stdarg.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_S390 | 9 #if V8_TARGET_ARCH_S390 |
| 10 | 10 |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 base::CallOnce(&once, &Simulator::EvalTableInit); | 736 base::CallOnce(&once, &Simulator::EvalTableInit); |
| 737 } | 737 } |
| 738 | 738 |
| 739 Simulator::EvaluateFuncType Simulator::EvalTable[] = {NULL}; | 739 Simulator::EvaluateFuncType Simulator::EvalTable[] = {NULL}; |
| 740 | 740 |
| 741 void Simulator::EvalTableInit() { | 741 void Simulator::EvalTableInit() { |
| 742 for (int i = 0; i < MAX_NUM_OPCODES; i++) { | 742 for (int i = 0; i < MAX_NUM_OPCODES; i++) { |
| 743 EvalTable[i] = &Simulator::Evaluate_Unknown; | 743 EvalTable[i] = &Simulator::Evaluate_Unknown; |
| 744 } | 744 } |
| 745 | 745 |
| 746 #define S390_SUPPORTED_VECTOR_OPCODE_LIST(V) \ |
| 747 V(vfs, VFS, 0xE7E2) /* type = VRR_C VECTOR FP SUBTRACT */ \ |
| 748 V(vfa, VFA, 0xE7E3) /* type = VRR_C VECTOR FP ADD */ \ |
| 749 V(vfd, VFD, 0xE7E5) /* type = VRR_C VECTOR FP DIVIDE */ \ |
| 750 V(vfm, VFM, 0xE7E7) /* type = VRR_C VECTOR FP MULTIPLY */ |
| 751 |
| 746 #define CREATE_EVALUATE_TABLE(name, op_name, op_value) \ | 752 #define CREATE_EVALUATE_TABLE(name, op_name, op_value) \ |
| 747 EvalTable[op_name] = &Simulator::Evaluate_##op_name; | 753 EvalTable[op_name] = &Simulator::Evaluate_##op_name; |
| 748 VRR_C_OPCODE_LIST(CREATE_EVALUATE_TABLE); | 754 S390_SUPPORTED_VECTOR_OPCODE_LIST(CREATE_EVALUATE_TABLE); |
| 749 #undef CREATE_EVALUATE_TABLE | 755 #undef CREATE_EVALUATE_TABLE |
| 750 | 756 |
| 751 EvalTable[DUMY] = &Simulator::Evaluate_DUMY; | 757 EvalTable[DUMY] = &Simulator::Evaluate_DUMY; |
| 752 EvalTable[BKPT] = &Simulator::Evaluate_BKPT; | 758 EvalTable[BKPT] = &Simulator::Evaluate_BKPT; |
| 753 EvalTable[SPM] = &Simulator::Evaluate_SPM; | 759 EvalTable[SPM] = &Simulator::Evaluate_SPM; |
| 754 EvalTable[BALR] = &Simulator::Evaluate_BALR; | 760 EvalTable[BALR] = &Simulator::Evaluate_BALR; |
| 755 EvalTable[BCTR] = &Simulator::Evaluate_BCTR; | 761 EvalTable[BCTR] = &Simulator::Evaluate_BCTR; |
| 756 EvalTable[BCR] = &Simulator::Evaluate_BCR; | 762 EvalTable[BCR] = &Simulator::Evaluate_BCR; |
| 757 EvalTable[SVC] = &Simulator::Evaluate_SVC; | 763 EvalTable[SVC] = &Simulator::Evaluate_SVC; |
| 758 EvalTable[BSM] = &Simulator::Evaluate_BSM; | 764 EvalTable[BSM] = &Simulator::Evaluate_BSM; |
| (...skipping 11964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12723 return 0; | 12729 return 0; |
| 12724 } | 12730 } |
| 12725 | 12731 |
| 12726 #undef EVALUATE | 12732 #undef EVALUATE |
| 12727 | 12733 |
| 12728 } // namespace internal | 12734 } // namespace internal |
| 12729 } // namespace v8 | 12735 } // namespace v8 |
| 12730 | 12736 |
| 12731 #endif // USE_SIMULATOR | 12737 #endif // USE_SIMULATOR |
| 12732 #endif // V8_TARGET_ARCH_S390 | 12738 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |