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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 EvalTable[CGFRL] = &Simulator::Evaluate_CGFRL; | 958 EvalTable[CGFRL] = &Simulator::Evaluate_CGFRL; |
959 EvalTable[ECTG] = &Simulator::Evaluate_ECTG; | 959 EvalTable[ECTG] = &Simulator::Evaluate_ECTG; |
960 EvalTable[CSST] = &Simulator::Evaluate_CSST; | 960 EvalTable[CSST] = &Simulator::Evaluate_CSST; |
961 EvalTable[LPD] = &Simulator::Evaluate_LPD; | 961 EvalTable[LPD] = &Simulator::Evaluate_LPD; |
962 EvalTable[LPDG] = &Simulator::Evaluate_LPDG; | 962 EvalTable[LPDG] = &Simulator::Evaluate_LPDG; |
963 EvalTable[BRCTH] = &Simulator::Evaluate_BRCTH; | 963 EvalTable[BRCTH] = &Simulator::Evaluate_BRCTH; |
964 EvalTable[AIH] = &Simulator::Evaluate_AIH; | 964 EvalTable[AIH] = &Simulator::Evaluate_AIH; |
965 EvalTable[ALSIH] = &Simulator::Evaluate_ALSIH; | 965 EvalTable[ALSIH] = &Simulator::Evaluate_ALSIH; |
966 EvalTable[ALSIHN] = &Simulator::Evaluate_ALSIHN; | 966 EvalTable[ALSIHN] = &Simulator::Evaluate_ALSIHN; |
967 EvalTable[CIH] = &Simulator::Evaluate_CIH; | 967 EvalTable[CIH] = &Simulator::Evaluate_CIH; |
| 968 EvalTable[CLIH] = &Simulator::Evaluate_CLIH; |
968 EvalTable[STCK] = &Simulator::Evaluate_STCK; | 969 EvalTable[STCK] = &Simulator::Evaluate_STCK; |
969 EvalTable[CFC] = &Simulator::Evaluate_CFC; | 970 EvalTable[CFC] = &Simulator::Evaluate_CFC; |
970 EvalTable[IPM] = &Simulator::Evaluate_IPM; | 971 EvalTable[IPM] = &Simulator::Evaluate_IPM; |
971 EvalTable[HSCH] = &Simulator::Evaluate_HSCH; | 972 EvalTable[HSCH] = &Simulator::Evaluate_HSCH; |
972 EvalTable[MSCH] = &Simulator::Evaluate_MSCH; | 973 EvalTable[MSCH] = &Simulator::Evaluate_MSCH; |
973 EvalTable[SSCH] = &Simulator::Evaluate_SSCH; | 974 EvalTable[SSCH] = &Simulator::Evaluate_SSCH; |
974 EvalTable[STSCH] = &Simulator::Evaluate_STSCH; | 975 EvalTable[STSCH] = &Simulator::Evaluate_STSCH; |
975 EvalTable[TSCH] = &Simulator::Evaluate_TSCH; | 976 EvalTable[TSCH] = &Simulator::Evaluate_TSCH; |
976 EvalTable[TPI] = &Simulator::Evaluate_TPI; | 977 EvalTable[TPI] = &Simulator::Evaluate_TPI; |
977 EvalTable[SAL] = &Simulator::Evaluate_SAL; | 978 EvalTable[SAL] = &Simulator::Evaluate_SAL; |
(...skipping 7327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8305 return 0; | 8306 return 0; |
8306 } | 8307 } |
8307 | 8308 |
8308 EVALUATE(BRCTH) { | 8309 EVALUATE(BRCTH) { |
8309 UNIMPLEMENTED(); | 8310 UNIMPLEMENTED(); |
8310 USE(instr); | 8311 USE(instr); |
8311 return 0; | 8312 return 0; |
8312 } | 8313 } |
8313 | 8314 |
8314 EVALUATE(AIH) { | 8315 EVALUATE(AIH) { |
8315 UNIMPLEMENTED(); | 8316 DCHECK_OPCODE(AIH); |
8316 USE(instr); | 8317 DECODE_RIL_A_INSTRUCTION(r1, i2); |
8317 return 0; | 8318 int32_t r1_val = get_high_register<int32_t>(r1); |
| 8319 bool isOF = CheckOverflowForIntAdd(r1_val, static_cast<int32_t>(i2), int32_t); |
| 8320 r1_val += static_cast<int32_t>(i2); |
| 8321 set_high_register(r1, r1_val); |
| 8322 SetS390ConditionCode<int32_t>(r1_val, 0); |
| 8323 SetS390OverflowCode(isOF); |
| 8324 return length; |
8318 } | 8325 } |
8319 | 8326 |
8320 EVALUATE(ALSIH) { | 8327 EVALUATE(ALSIH) { |
8321 UNIMPLEMENTED(); | 8328 UNIMPLEMENTED(); |
8322 USE(instr); | 8329 USE(instr); |
8323 return 0; | 8330 return 0; |
8324 } | 8331 } |
8325 | 8332 |
8326 EVALUATE(ALSIHN) { | 8333 EVALUATE(ALSIHN) { |
8327 UNIMPLEMENTED(); | 8334 UNIMPLEMENTED(); |
8328 USE(instr); | 8335 USE(instr); |
8329 return 0; | 8336 return 0; |
8330 } | 8337 } |
8331 | 8338 |
8332 EVALUATE(CIH) { | 8339 EVALUATE(CIH) { |
8333 UNIMPLEMENTED(); | 8340 DCHECK_OPCODE(CIH); |
8334 USE(instr); | 8341 DECODE_RIL_A_INSTRUCTION(r1, imm); |
8335 return 0; | 8342 int32_t r1_val = get_high_register<int32_t>(r1); |
| 8343 SetS390ConditionCode<int32_t>(r1_val, static_cast<int32_t>(imm)); |
| 8344 return length; |
| 8345 } |
| 8346 |
| 8347 EVALUATE(CLIH) { |
| 8348 DCHECK_OPCODE(CLIH); |
| 8349 // Compare Logical with Immediate (32) |
| 8350 DECODE_RIL_A_INSTRUCTION(r1, imm); |
| 8351 SetS390ConditionCode<uint32_t>(get_high_register<uint32_t>(r1), imm); |
| 8352 return length; |
8336 } | 8353 } |
8337 | 8354 |
8338 EVALUATE(STCK) { | 8355 EVALUATE(STCK) { |
8339 UNIMPLEMENTED(); | 8356 UNIMPLEMENTED(); |
8340 USE(instr); | 8357 USE(instr); |
8341 return 0; | 8358 return 0; |
8342 } | 8359 } |
8343 | 8360 |
8344 EVALUATE(CFC) { | 8361 EVALUATE(CFC) { |
8345 UNIMPLEMENTED(); | 8362 UNIMPLEMENTED(); |
(...skipping 4383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12729 return 0; | 12746 return 0; |
12730 } | 12747 } |
12731 | 12748 |
12732 #undef EVALUATE | 12749 #undef EVALUATE |
12733 | 12750 |
12734 } // namespace internal | 12751 } // namespace internal |
12735 } // namespace v8 | 12752 } // namespace v8 |
12736 | 12753 |
12737 #endif // USE_SIMULATOR | 12754 #endif // USE_SIMULATOR |
12738 #endif // V8_TARGET_ARCH_S390 | 12755 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |