mirror of
https://github.com/libretro/oberon-risc-emu.git
synced 2024-12-04 07:00:52 +00:00
Update to match 2016-09-04 FPAdder.v
This commit is contained in:
parent
52bd02f198
commit
6ce0b8c6f7
@ -50,11 +50,14 @@ uint32_t fp_add(uint32_t x, uint32_t y, bool u, bool v) {
|
||||
e1 -= 24;
|
||||
}
|
||||
|
||||
bool xn = (x & 0x7FFFFFFF) == 0;
|
||||
bool yn = (y & 0x7FFFFFFF) == 0;
|
||||
|
||||
if (v) {
|
||||
return (int32_t)(sum << 5) >> 6;
|
||||
} else if ((x & 0x7FFFFFFF) == 0) {
|
||||
return !u ? y : 0;
|
||||
} else if ((y & 0x7FFFFFFF) == 0) {
|
||||
} else if (xn) {
|
||||
return (u | yn) ? 0 : y;
|
||||
} else if (yn) {
|
||||
return x;
|
||||
} else if ((t3 & 0x01FFFFFF) == 0 || (e1 & 0x100) != 0) {
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user