1
0
Fork 0

move some FillFlags calls into their respective cpu function;

change some cpu functions to directly return values


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2864
This commit is contained in:
Sebastian Strohhäcker 2007-06-01 16:40:40 +00:00
parent fb1ef3c95d
commit 43de744e01
14 changed files with 99 additions and 134 deletions

View file

@ -31,7 +31,7 @@ LazyFlags lflags;
/* CF Carry Flag -- Set on high-order bit carry or borrow; cleared
otherwise.
*/
Bitu get_CF(void) {
Bit32u get_CF(void) {
switch (lflags.type) {
case t_UNKNOWN:
@ -43,7 +43,6 @@ Bitu get_CF(void) {
case t_DECd:
case t_MUL:
return GETFLAG(CF);
break;
case t_ADDb:
return (lf_resb<lf_var1b);
case t_ADDw:
@ -129,7 +128,7 @@ Bitu get_CF(void) {
four bits of AL; cleared otherwise. Used for decimal
arithmetic.
*/
Bitu get_AF(void) {
Bit32u get_AF(void) {
Bitu type=lflags.type;
switch (type) {
case t_UNKNOWN:
@ -207,7 +206,7 @@ Bitu get_AF(void) {
/* ZF Zero Flag -- Set if result is zero; cleared otherwise.
*/
Bitu get_ZF(void) {
Bit32u get_ZF(void) {
Bitu type=lflags.type;
switch (type) {
case t_UNKNOWN:
@ -275,7 +274,7 @@ Bitu get_ZF(void) {
/* SF Sign Flag -- Set equal to high-order bit of result (0 is
positive, 1 if negative).
*/
Bitu get_SF(void) {
Bit32u get_SF(void) {
Bitu type=lflags.type;
switch (type) {
case t_UNKNOWN:
@ -341,7 +340,7 @@ Bitu get_SF(void) {
return false;
}
Bitu get_OF(void) {
Bit32u get_OF(void) {
Bitu type=lflags.type;
switch (type) {
case t_UNKNOWN:
@ -442,14 +441,14 @@ Bit16u parity_lookup[256] = {
FLAG_PF, 0, 0, FLAG_PF, 0, FLAG_PF, FLAG_PF, 0, 0, FLAG_PF, FLAG_PF, 0, FLAG_PF, 0, 0, FLAG_PF
};
Bitu get_PF(void) {
Bit32u get_PF(void) {
switch (lflags.type) {
case t_UNKNOWN:
return GETFLAG(PF);
default:
return (parity_lookup[lf_resb]);;
return (parity_lookup[lf_resb]);
};
return false;
return 0;
}
@ -860,4 +859,8 @@ Bitu FillFlags(void) {
return reg_flags;
}
void DestroyConditionFlags(void) {
lflags.type=t_UNKNOWN;
}
#endif