From d4d0051199b6a0eb71e6f1a6c6bc8e24046fe329 Mon Sep 17 00:00:00 2001 From: Ced2911 Date: Tue, 3 Sep 2013 15:24:07 +0200 Subject: [PATCH] fix fmin/fmax --- Common/ppcEmitter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Common/ppcEmitter.cpp b/Common/ppcEmitter.cpp index 301b4c89e9..a5c8c86090 100644 --- a/Common/ppcEmitter.cpp +++ b/Common/ppcEmitter.cpp @@ -678,17 +678,19 @@ namespace PpcGen { void PPCXEmitter::FSEL (PPCReg FRt, PPCReg FRa, PPCReg FRc, PPCReg FRb) { A_FORM(63, FRt, FRa, FRb, FRc, 23, 0); } + // #define fpmin(a,b) __fsel((a)-(b), b,a) void PPCXEmitter::FMIN (PPCReg FRt, PPCReg FRa, PPCReg FRb) { PPCReg safe = FPR3; // hope it's safe !! FSUBS(safe, FRa, FRb); - FSEL(FRt, safe, FRa, FRb); - Break(); + FSEL(FRt, safe, FRb, FRa); + //Break(); } + // #define fpmax(a,b) __fsel((a)-(b), a,b) void PPCXEmitter::FMAX (PPCReg FRt, PPCReg FRa, PPCReg FRb) { PPCReg safe = FPR3; // hope it's safe !! FSUBS(safe, FRa, FRb); - FSEL(FRt, safe, FRb, FRa); - Break(); + FSEL(FRt, safe, FRa, FRb); + //Break(); } // Prologue / epilogue