Index: src/s390/simulator-s390.h |
diff --git a/src/s390/simulator-s390.h b/src/s390/simulator-s390.h |
index 8fee5145e66cbacc61ee49693d874646891c6b38..ae3dd5820944ced1a8cd8b56e89e0091f467ceb3 100644 |
--- a/src/s390/simulator-s390.h |
+++ b/src/s390/simulator-s390.h |
@@ -309,6 +309,7 @@ class Simulator { |
bool DecodeTwoByte(Instruction* instr); |
bool DecodeFourByte(Instruction* instr); |
bool DecodeFourByteArithmetic(Instruction* instr); |
+ bool DecodeFourByteArithmetic64Bit(Instruction* instr); |
bool DecodeFourByteFloatingPoint(Instruction* instr); |
void DecodeFourByteFloatingPointIntConversion(Instruction* instr); |
void DecodeFourByteFloatingPointRound(Instruction* instr); |
@@ -395,6 +396,23 @@ class Simulator { |
if (condition_reg_ == 0) condition_reg_ = unordered; |
} |
+ // Used by arithmetic operations that use carry. |
+ template <typename T> |
+ void SetS390ConditionCodeCarry(T result, bool overflow) { |
+ condition_reg_ = 0; |
+ bool zero_result = (result == static_cast<T>(0)); |
+ if (zero_result && !overflow) { |
+ condition_reg_ |= 8; |
+ } else if (!zero_result && !overflow) { |
+ condition_reg_ |= 4; |
+ } else if (zero_result && overflow) { |
+ condition_reg_ |= 2; |
+ } else if (!zero_result && overflow) { |
+ condition_reg_ |= 1; |
+ } |
+ if (condition_reg_ == 0) UNREACHABLE(); |
+ } |
+ |
bool isNaN(double value) { return (value != value); } |
// Set the condition code for bitwise operations |