TestSuite: fix bug in first fpu test (must use stfd to get value of FPSCR, stfs corrupts the value trying to convert to single precision)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3430 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
625eeec130
commit
757e8e5b4c
|
@ -41,12 +41,12 @@ void TestDivision() {
|
|||
}
|
||||
|
||||
void TestFres() {
|
||||
u32 fpscr;
|
||||
u32 fpscr[2];
|
||||
float out, out2;
|
||||
TestFRES1(&fpscr, &out, &out2);
|
||||
TestFRES1(fpscr, &out, &out2);
|
||||
char temp[100];
|
||||
sprintf(temp, "%08x %1.1f %1.1f", fpscr, out, out2);
|
||||
Compare(temp, "ffc00004 inf 0.0");
|
||||
sprintf(temp, "%08x %1.1f %1.1f", fpscr[1], out, out2);
|
||||
Compare(temp, "86002004 inf 0.0");
|
||||
}
|
||||
|
||||
void TestNormalize() {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#define _LANGUAGE_ASSEMBLY
|
||||
#include "asm.h"
|
||||
|
||||
.globl TestFRES1
|
||||
//r3 = &fpscr
|
||||
//r4 = result
|
||||
.globl TestFRES1
|
||||
TestFRES1:
|
||||
lis r9,Unit01@ha
|
||||
addi r9,r9,Unit01@l
|
||||
|
@ -13,7 +13,7 @@ TestFRES1:
|
|||
fres fr0, fr0
|
||||
stfs fr0, 0(r5)
|
||||
mffs fr1
|
||||
stfs fr1, 0(r3)
|
||||
stfd fr1, 0(r3)
|
||||
blr
|
||||
|
||||
.section .data
|
||||
|
|
Loading…
Reference in New Issue