@@ -96,8 +96,8 @@ type Cpu::Inc(type data) {
9696 return data + 1 ;
9797}
9898
99- inline template <typename type>
100- void Cpu::UpdateEflagsForInc (type d) {
99+ template <typename type>
100+ inline void Cpu::UpdateEflagsForInc (type d) {
101101 type result = (type)(d + 1 );
102102 this ->UpdateZF (result);
103103 this ->UpdateSF (result);
@@ -112,8 +112,8 @@ type Cpu::Dec(type data) {
112112 return result;
113113}
114114
115- inline template <typename type>
116- void Cpu::UpdateEflagsForDec (type result, type d1, type d2) {
115+ template <typename type>
116+ inline void Cpu::UpdateEflagsForDec (type result, type d1, type d2) {
117117 this ->UpdateZF (result);
118118 this ->UpdateSF (result);
119119 this ->UpdatePF (result);
@@ -134,46 +134,46 @@ void Cpu::UpdateEflagsForDec(type result, type d1, type d2) {
134134 }
135135}
136136
137- inline template <typename type>
138- type Cpu::Adc (type data1, type data2) {
137+ template <typename type>
138+ inline type Cpu::Adc (type data1, type data2) {
139139 type carry = this ->IsFlag (CF) ? 1 : 0 ;
140140 this ->UpdateEflagsForAdc (data1, data2, carry);
141141 return data1 + data2 + carry;
142142}
143143
144- inline template <typename type>
145- type Cpu::Xor (type data1, type data2) {
144+ template <typename type>
145+ inline type Cpu::Xor (type data1, type data2) {
146146 type result = data1 ^ data2;
147147 this ->UpdateEflagsForAnd (result);
148148 return result;
149149}
150150
151- inline template <typename type>
152- type Cpu::Or (type data1, type data2) {
151+ template <typename type>
152+ inline type Cpu::Or (type data1, type data2) {
153153 this ->UpdateEflagsForAnd ((type)(data1 | data2));
154154 return data1 | data2;
155155}
156156
157- inline template <typename type>
158- type Cpu::And (type data1, type data2) {
157+ template <typename type>
158+ inline type Cpu::And (type data1, type data2) {
159159 this ->UpdateEflagsForAnd ((type)(data1 & data2));
160160 return data1 & data2;
161161}
162162
163- inline template <typename type>
164- type Cpu::Add (type data1, type data2) {
163+ template <typename type>
164+ inline type Cpu::Add (type data1, type data2) {
165165 this ->UpdateEflagsForAdd (data1, data2);
166166 return data1 + data2;
167167}
168168
169- inline template <typename type>
170- type Cpu::Sub (type data1, type data2) {
169+ template <typename type>
170+ inline type Cpu::Sub (type data1, type data2) {
171171 this ->UpdateEflagsForSub (data1, data2);
172172 return data1 - data2;
173173}
174174
175- inline template <typename type>
176- void Cpu::UpdateEflagsForSub (type data1, type data2) {
175+ template <typename type>
176+ inline void Cpu::UpdateEflagsForSub (type data1, type data2) {
177177 this ->UpdateZF ((type)(data1 - data2));
178178 this ->UpdatePF (data1 - data2);
179179 this ->UpdateSF ((type)(data1 - data2));
@@ -245,8 +245,8 @@ void Cpu::UpdateEflagsForAdc(type d1, type d2, type c) {
245245 }
246246}
247247
248- inline template <typename type>
249- void Cpu::UpdateEflagsForAdd (type d1, type d2) {
248+ template <typename type>
249+ inline void Cpu::UpdateEflagsForAdd (type d1, type d2) {
250250 this ->UpdateZF ((type)(d1 + d2));
251251 this ->UpdateSF ((type)(d1 + d2));
252252 this ->UpdatePF ((type)(d1 + d2));
@@ -561,15 +561,15 @@ void Cpu::Scas(type data) {
561561 }
562562}
563563
564- inline template <typename type>
565- void Cpu::UpdateEflagsForShr (type result) {
564+ template <typename type>
565+ inline void Cpu::UpdateEflagsForShr (type result) {
566566 this ->UpdateZF ((uint32_t )result);
567567 this ->UpdateSF (result);
568568 this ->UpdatePF ((uint32_t )result);
569569}
570570
571- inline template <typename type>
572- void Cpu::UpdateOF_Add (type result, type d1, type d2) {
571+ template <typename type>
572+ inline void Cpu::UpdateOF_Add (type result, type d1, type d2) {
573573 switch (sizeof (result)) {
574574 case 1 :
575575 this ->eflags .flgs .OF = ((d1 & SIGN_FLG1) == (d2 & SIGN_FLG1)) &&
@@ -589,8 +589,8 @@ void Cpu::UpdateOF_Add(type result, type d1, type d2) {
589589 }
590590}
591591
592- inline template <typename type>
593- void Cpu::UpdateCfForSub (type data, int group) {
592+ template <typename type>
593+ inline void Cpu::UpdateCfForSub (type data, int group) {
594594 switch (group) {
595595 case 1 :
596596 this ->eflags .flgs .CF = ((data >> 8 ) & 1 ) ? 1 : 0 ;
@@ -608,8 +608,8 @@ void Cpu::UpdateCfForSub(type data, int group) {
608608 }
609609}
610610
611- inline template <typename type>
612- void Cpu::UpdateSF (type data) {
611+ template <typename type>
612+ inline void Cpu::UpdateSF (type data) {
613613 switch (sizeof (data)) {
614614 case 1 :
615615 this ->eflags .flgs .SF = ((data & SIGN_FLG1) == SIGN_FLG1) ? 1 : 0 ;
@@ -627,17 +627,17 @@ void Cpu::UpdateSF(type data) {
627627 }
628628}
629629
630- inline template <typename type>
631- void Cpu::UpdateEflagsForAnd (type data) {
630+ template <typename type>
631+ inline void Cpu::UpdateEflagsForAnd (type data) {
632632 this ->ClearFlag (CF);
633633 this ->ClearFlag (OF);
634634 this ->UpdateSF (data);
635635 this ->UpdateZF (data);
636636 this ->UpdatePF (data);
637637}
638638
639- inline template <typename type>
640- void Cpu::UpdateEflagsForUnsignedMul (type data) {
639+ template <typename type>
640+ inline void Cpu::UpdateEflagsForUnsignedMul (type data) {
641641 if (data == 0 ) {
642642 this ->ClearFlag (OF);
643643 this ->ClearFlag (CF);
0 commit comments