@@ -6,8 +6,8 @@ namespace {
66
77template <typename Tag, typename T>
88ALWAYS_INLINE static void WriteFlagsIncDec (State &state, T lhs, T rhs, T res) {
9- FLAG_ICC_ZF = ZeroFlag (res);
10- FLAG_ICC_NF = SignFlag (res);
9+ FLAG_ICC_ZF = ZeroFlag (res, lhs, rhs );
10+ FLAG_ICC_NF = SignFlag (res, lhs, rhs );
1111 FLAG_ICC_VF = Overflow<Tag>::Flag (lhs, rhs, res);
1212}
1313
@@ -20,16 +20,16 @@ ALWAYS_INLINE static void WriteFlagsAddSub(State &state, T lhs, T rhs, T res) {
2020template <typename Tag, typename T>
2121ALWAYS_INLINE static void WriteXCCFlagsIncDec (State &state, T lhs, T rhs,
2222 T res) {
23- FLAG_XCC_ZF = ZeroFlag (res);
24- FLAG_XCC_NF = SignFlag (res);
23+ FLAG_XCC_ZF = ZeroFlag (res, lhs, rhs );
24+ FLAG_XCC_NF = SignFlag (res, lhs, rhs );
2525 FLAG_XCC_VF = Overflow<Tag>::Flag (lhs, rhs, res);
2626}
2727
2828template <typename Tag, typename T>
2929ALWAYS_INLINE static void WriteICCFlagsIncDec (State &state, T lhs, T rhs,
3030 T res) {
31- FLAG_ICC_ZF = ZeroFlag (res);
32- FLAG_ICC_NF = SignFlag (res);
31+ FLAG_ICC_ZF = ZeroFlag (res, lhs, rhs );
32+ FLAG_ICC_NF = SignFlag (res, lhs, rhs );
3333 FLAG_ICC_VF = Overflow<Tag>::Flag (lhs, rhs, res);
3434}
3535
@@ -145,8 +145,8 @@ DEF_SEM(SMULcc, S1 src1, S2 src2, D dst) {
145145 auto rhs_wide = SExt (rhs);
146146 auto res = SMul (lhs_wide, rhs_wide);
147147 auto res_trunc = TruncTo<S1>(res);
148- FLAG_ICC_NF = SignFlag (static_cast <uint32_t >(res));
149- FLAG_ICC_ZF = ZeroFlag (static_cast <uint32_t >(res));
148+ FLAG_ICC_NF = SignFlag (static_cast <uint32_t >(res), src1, src2 );
149+ FLAG_ICC_ZF = ZeroFlag (static_cast <uint32_t >(res), src1, src2 );
150150 FLAG_ICC_VF = 0 ;
151151 FLAG_ICC_CF = 0 ;
152152 auto index = Literal<S1>(32 );
@@ -176,8 +176,8 @@ DEF_SEM(UMULcc, S1 src1, S2 src2, D dst) {
176176 auto rhs_wide = ZExt (rhs);
177177 auto res = UMul (lhs_wide, rhs_wide);
178178 auto res_trunc = TruncTo<S1>(res);
179- FLAG_ICC_NF = SignFlag (static_cast <uint32_t >(res));
180- FLAG_ICC_ZF = ZeroFlag (static_cast <uint32_t >(res));
179+ FLAG_ICC_NF = SignFlag (static_cast <uint32_t >(res), src1, src2 );
180+ FLAG_ICC_ZF = ZeroFlag (static_cast <uint32_t >(res), src1, src2 );
181181 FLAG_ICC_VF = 0 ;
182182 FLAG_ICC_CF = 0 ;
183183 auto index = Literal<S1>(32 );
@@ -223,8 +223,8 @@ DEF_SEM(SDIVcc, S1 src1, S2 src2, D dst) {
223223 auto rhs = Read (src2);
224224 auto rhs_wide = SExt (rhs);
225225 auto quot = SDiv (y_lhs_wide, rhs_wide);
226- FLAG_ICC_NF = SignFlag (static_cast <uint32_t >(quot));
227- FLAG_ICC_ZF = ZeroFlag (static_cast <uint32_t >(quot));
226+ FLAG_ICC_NF = SignFlag (static_cast <uint32_t >(quot), src1, src2 );
227+ FLAG_ICC_ZF = ZeroFlag (static_cast <uint32_t >(quot), src1, src2 );
228228 FLAG_ICC_VF = Overflow<tag_sdiv>::Flag (lhs, rhs, quot);
229229 FLAG_ICC_CF = 0 ;
230230 auto res = Overflow<tag_sdiv>::Value (lhs, rhs, quot);
@@ -250,8 +250,8 @@ DEF_SEM(UDIVcc, S1 src1, S2 src2, D dst) {
250250 auto lhs_wide = ZExt (lhs);
251251 auto rhs_wide = ZExt (rhs);
252252 auto quot = UDiv (lhs_wide, rhs_wide);
253- FLAG_ICC_NF = SignFlag (static_cast <uint32_t >(quot));
254- FLAG_ICC_ZF = ZeroFlag (static_cast <uint32_t >(quot));
253+ FLAG_ICC_NF = SignFlag (static_cast <uint32_t >(quot), src1, src2 );
254+ FLAG_ICC_ZF = ZeroFlag (static_cast <uint32_t >(quot), src1, src2 );
255255 FLAG_ICC_VF = Overflow<tag_udiv>::Flag (lhs, rhs, quot);
256256 FLAG_ICC_CF = 0 ;
257257 auto res = Overflow<tag_udiv>::Value (lhs, rhs, quot);
0 commit comments