| 1099 | } |
| 1100 | |
| 1101 | int FPU::GetTag(CPU* cpu, U32 index) { |
| 1102 | U32 tag = this->tags[index] & 3; |
| 1103 | if (isMMXInUse) { |
| 1104 | tag = TAG_Valid; |
| 1105 | } |
| 1106 | if (tag != TAG_Empty) { |
| 1107 | if (isRegCached[index]) { |
| 1108 | if (regCache[index].d == 0.0) { |
| 1109 | tag = TAG_Zero; |
| 1110 | } else if (isnan(regCache[index].d) || isinf(regCache[index].d)) { |
| 1111 | tag = TAG_Special; |
| 1112 | } |
| 1113 | } else { |
| 1114 | if (F80_iszero(regs[index])) { |
| 1115 | tag = TAG_Zero; |
| 1116 | } else if (F80_isnan(regs[index]) || F80_isinf(regs[index])) { |
| 1117 | tag = TAG_Special; |
| 1118 | } |
| 1119 | } |
| 1120 | } |
| 1121 | return tag; |
| 1122 | } |
| 1123 | |
| 1124 | int FPU::GetTag(CPU* cpu) { |
| 1125 | int tags = 0; |