Tests updated: cpu/ppu_gpr and cpu/ppu_fpu

* cpu/ppu_gpr: Updated *.elf and *.expected files after Bigpet's commit.
* cpu/ppu_fpu: Fixed some issues reported by InoriRus.
This commit is contained in:
Alexandro Sánchez Bach 2014-03-24 19:56:53 +01:00
parent 1efbd77356
commit 62b653e7d2
5 changed files with 48648 additions and 47637 deletions

View File

@ -3,9 +3,12 @@
#include <float.h> #include <float.h>
#include <ppu_intrinsics.h> #include <ppu_intrinsics.h>
#define PRINT_FPR1(name,i,FPR) printf(name "[%02d] -> %016llx\n", i, *(unsigned long long*)&FPR); #define PRINT_FPR1(name,i,FPR) if (sizeof(FPR)==4) printf(name "[%02d] -> %08x\n", i, *(int*)&FPR);\
#define PRINT_FPR2(name,i,j,FPR) printf(name "[%02d],[%02d]) -> %016llx\n", i, j, *(unsigned long long*)&FPR); else printf(name "[%02d] -> %016llx\n", i, *(unsigned long long*)&FPR);
#define PRINT_FPR3(name,i,j,k,FPR) printf(name "[%02d],[%02d],[%02d]) -> %016llx\n", i, j, k, *(unsigned long long*)&FPR); #define PRINT_FPR2(name,i,j,FPR) if (sizeof(FPR)==4) printf(name "[%02d],[%02d]) -> %08x\n", i, j, *(int*)&FPR);\
else printf(name "[%02d],[%02d]) -> %016llx\n", i, j, *(unsigned long long*)&FPR);
#define PRINT_FPR3(name,i,j,k,FPR) if (sizeof(FPR)==4) printf(name "[%02d],[%02d],[%02d]) -> %08x\n", i, j, k, *(int*)&FPR);\
else printf(name "[%02d],[%02d],[%02d]) -> %016llx\n", i, j, k, *(unsigned long long*)&FPR);
// Loops with floats // Loops with floats
#define ITERATE1f(x) \ #define ITERATE1f(x) \
@ -99,10 +102,10 @@ int main(void)
ITERATE1f(__asm__ ("fctiwz %0,%1" : "=f"(f0) : "f"(f1)); PRINT_FPR1("fctiwz ",i,f0)); ITERATE1f(__asm__ ("fctiwz %0,%1" : "=f"(f0) : "f"(f1)); PRINT_FPR1("fctiwz ",i,f0));
// Floating-Point Compare Instructions // Floating-Point Compare Instructions
ITERATE2d(__asm__ ("fcmpu %0,%1,%2" : "=f"(d0) : "f"(d1), "f"(d2)); PRINT_FPR2("fcmpu ",i,j,d0)); ITERATE2d(__asm__ ("fcmpu 1,%1,%2\n" "mffs %0" : "=f"(d0) : "f"(d1), "f"(d2)); PRINT_FPR2("fcmpu ",i,j,d0));
ITERATE2f(__asm__ ("fcmpu %0,%1,%2" : "=f"(f0) : "f"(f1), "f"(f2)); PRINT_FPR2("fcmpu ",i,j,f0)); ITERATE2f(__asm__ ("fcmpu 1,%1,%2\n" "mffs %0" : "=f"(f0) : "f"(f1), "f"(f2)); PRINT_FPR2("fcmpu ",i,j,f0));
ITERATE2d(__asm__ ("fcmpo %0,%1,%2" : "=f"(d0) : "f"(d1), "f"(d2)); PRINT_FPR2("fcmpo ",i,j,d0)); ITERATE2d(__asm__ ("fcmpo 1,%1,%2\n" "mffs %0" : "=f"(d0) : "f"(d1), "f"(d2)); PRINT_FPR2("fcmpo ",i,j,d0));
ITERATE2f(__asm__ ("fcmpo %0,%1,%2" : "=f"(f0) : "f"(f1), "f"(f2)); PRINT_FPR2("fcmpo ",i,j,f0)); ITERATE2f(__asm__ ("fcmpo 1,%1,%2\n" "mffs %0" : "=f"(f0) : "f"(f1), "f"(f2)); PRINT_FPR2("fcmpo ",i,j,f0));
// Floating-Point Status and Control Register Instructions // Floating-Point Status and Control Register Instructions
// TODO ? // TODO ?

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.