compile fix

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3431 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-06-13 20:55:25 +00:00
parent 757e8e5b4c
commit df7b29da32
2 changed files with 13 additions and 15 deletions

View File

@ -121,7 +121,7 @@ THREAD_RETURN innerFlush(void *pArgs)
PanicAlert("Could not write memory card file %s.\n\n" PanicAlert("Could not write memory card file %s.\n\n"
"Are you running Dolphin from a CD/DVD, or is the save file maybe write protected?", data->filename.c_str()); "Are you running Dolphin from a CD/DVD, or is the save file maybe write protected?", data->filename.c_str());
delete data; delete data;
return 1; return 0;
} }
fwrite(data->memcardContent, data->memcardSize, 1, pFile); fwrite(data->memcardContent, data->memcardSize, 1, pFile);

View File

@ -380,21 +380,19 @@ int PPCFPClass(double dvalue)
} value; } value;
value.d = dvalue; value.d = dvalue;
// 5 bits (C, <, >, =, ?) // 5 bits (C, <, >, =, ?)
// top: class descriptor
FPSCR.FPRF = 4;
// easy cases first // easy cases first
if (value.i == 0) { if (value.i == 0) {
// positive zero // positive zero
FPSCR.FPRF = 0x2; return 0x2;
} else if (value.i == 0x8000000000000000ULL) { } else if (value.i == 0x8000000000000000ULL) {
// negative zero // negative zero
FPSCR.FPRF = 0x12; return 0x12;
} else if (value.i == 0x7FF0000000000000ULL) { } else if (value.i == 0x7FF0000000000000ULL) {
// positive inf // positive inf
FPSCR.FPRF = 0x5; return 0x5;
} else if (value.i == 0xFFF0000000000000ULL) { } else if (value.i == 0xFFF0000000000000ULL) {
// negative inf // negative inf
FPSCR.FPRF = 0x9; return 0x9;
} else { } else {
// OK let's dissect this thing. // OK let's dissect this thing.
int sign = (int)(value.i & 0x8000000000000000ULL) ? 1 : 0; int sign = (int)(value.i & 0x8000000000000000ULL) ? 1 : 0;
@ -402,25 +400,25 @@ int PPCFPClass(double dvalue)
if (exp >= 1 && exp <= 2046) { if (exp >= 1 && exp <= 2046) {
// Nice normalized number. // Nice normalized number.
if (sign) { if (sign) {
FPSCR.FPRF = 0x8; // negative return 0x8; // negative
} else { } else {
FPSCR.FPRF = 0x4; // positive return 0x4; // positive
} }
return;
} }
u64 mantissa = value.i & 0x000FFFFFFFFFFFFFULL; u64 mantissa = value.i & 0x000FFFFFFFFFFFFFULL;
if (exp == 0 && mantissa) { if (exp == 0 && mantissa) {
// Denormalized number. // Denormalized number.
if (sign) { if (sign) {
FPSCR.FPRF = 0x18; return 0x18;
} else { } else {
FPSCR.FPRF = 0x14; return 0x14;
} }
} else if (exp == 0x7FF && mantissa /* && mantissa_top*/) { } else if (exp == 0x7FF && mantissa /* && mantissa_top*/) {
FPSCR.FPRF = 0x11; // Quiet NAN return 0x11; // Quiet NAN
return;
} }
} }
return 0x4;
#endif #endif
} }