Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Side by Side Diff: src/s390/simulator-s390.cc

Issue 2522283003: s390: introduce DUMY opcode for special use. (Closed)
Patch Set: make sure not overwrite opcode field Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/s390/simulator-s390.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 EvalTable[DUMY] = &Simulator::Evaluate_DUMY;
746 EvalTable[BKPT] = &Simulator::Evaluate_BKPT; 747 EvalTable[BKPT] = &Simulator::Evaluate_BKPT;
747 EvalTable[SPM] = &Simulator::Evaluate_SPM; 748 EvalTable[SPM] = &Simulator::Evaluate_SPM;
748 EvalTable[BALR] = &Simulator::Evaluate_BALR; 749 EvalTable[BALR] = &Simulator::Evaluate_BALR;
749 EvalTable[BCTR] = &Simulator::Evaluate_BCTR; 750 EvalTable[BCTR] = &Simulator::Evaluate_BCTR;
750 EvalTable[BCR] = &Simulator::Evaluate_BCR; 751 EvalTable[BCR] = &Simulator::Evaluate_BCR;
751 EvalTable[SVC] = &Simulator::Evaluate_SVC; 752 EvalTable[SVC] = &Simulator::Evaluate_SVC;
752 EvalTable[BSM] = &Simulator::Evaluate_BSM; 753 EvalTable[BSM] = &Simulator::Evaluate_BSM;
753 EvalTable[BASSM] = &Simulator::Evaluate_BASSM; 754 EvalTable[BASSM] = &Simulator::Evaluate_BASSM;
754 EvalTable[BASR] = &Simulator::Evaluate_BASR; 755 EvalTable[BASR] = &Simulator::Evaluate_BASR;
755 EvalTable[MVCL] = &Simulator::Evaluate_MVCL; 756 EvalTable[MVCL] = &Simulator::Evaluate_MVCL;
(...skipping 5295 matching lines...) Expand 10 before | Expand all | Expand 10 after
6051 6052
6052 #define GET_ADDRESS(index_reg, base_reg, offset) \ 6053 #define GET_ADDRESS(index_reg, base_reg, offset) \
6053 (((index_reg) == 0) ? 0 : get_register(index_reg)) + \ 6054 (((index_reg) == 0) ? 0 : get_register(index_reg)) + \
6054 (((base_reg) == 0) ? 0 : get_register(base_reg)) + offset 6055 (((base_reg) == 0) ? 0 : get_register(base_reg)) + offset
6055 6056
6056 int Simulator::Evaluate_Unknown(Instruction* instr) { 6057 int Simulator::Evaluate_Unknown(Instruction* instr) {
6057 UNREACHABLE(); 6058 UNREACHABLE();
6058 return 0; 6059 return 0;
6059 } 6060 }
6060 6061
6062 EVALUATE(DUMY) {
6063 DCHECK_OPCODE(DUMY);
6064 // dummy instruction does nothing.
6065 return 6;
6066 }
6067
6061 EVALUATE(CLR) { 6068 EVALUATE(CLR) {
6062 DCHECK_OPCODE(CLR); 6069 DCHECK_OPCODE(CLR);
6063 DECODE_RR_INSTRUCTION(r1, r2); 6070 DECODE_RR_INSTRUCTION(r1, r2);
6064 uint32_t r1_val = get_low_register<uint32_t>(r1); 6071 uint32_t r1_val = get_low_register<uint32_t>(r1);
6065 uint32_t r2_val = get_low_register<uint32_t>(r2); 6072 uint32_t r2_val = get_low_register<uint32_t>(r2);
6066 SetS390ConditionCode<uint32_t>(r1_val, r2_val); 6073 SetS390ConditionCode<uint32_t>(r1_val, r2_val);
6067 return length; 6074 return length;
6068 } 6075 }
6069 6076
6070 EVALUATE(LR) { 6077 EVALUATE(LR) {
(...skipping 6566 matching lines...) Expand 10 before | Expand all | Expand 10 after
12637 return 0; 12644 return 0;
12638 } 12645 }
12639 12646
12640 #undef EVALUATE 12647 #undef EVALUATE
12641 12648
12642 } // namespace internal 12649 } // namespace internal
12643 } // namespace v8 12650 } // namespace v8
12644 12651
12645 #endif // USE_SIMULATOR 12652 #endif // USE_SIMULATOR
12646 #endif // V8_TARGET_ARCH_S390 12653 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/s390/simulator-s390.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698