[jit] round fpu

This commit is contained in:
Ced2911 2013-09-16 15:00:16 +02:00 committed by Unknown W. Brackets
parent d3bead638f
commit 09210a2ce9
2 changed files with 20 additions and 0 deletions

View File

@ -729,6 +729,20 @@ namespace PpcGen {
X_FORM(63, Bf, FRa, FRb, 32, 0);
}
// fpu convert
void PPCXEmitter::FRIN (PPCReg FRt, PPCReg FRb) { // round
X_FORM(63, FRt, 0, FRb, 392, 0);
}
void PPCXEmitter::FRIZ (PPCReg FRt, PPCReg FRb) { // trunc
X_FORM(63, FRt, 0, FRb, 456, 0);
}
void PPCXEmitter::FRIP (PPCReg FRt, PPCReg FRb) { // ceil
X_FORM(63, FRt, 0, FRb, 424, 0);
}
void PPCXEmitter::FRIM (PPCReg FRt, PPCReg FRb) { // floor
X_FORM(63, FRt, 0, FRb, 488, 0);
}
// Prologue / epilogue
/** save/load fpr in a static buffer ... **/

View File

@ -395,6 +395,12 @@ namespace PpcGen
void FCMPU (int Bf, PPCReg FRa, PPCReg FRb); // unordered
void FCMPO (int Bf, PPCReg FRa, PPCReg FRb); // ordered
// Fpu convert
void FRIN (PPCReg FRt, PPCReg FRb); // round
void FRIZ (PPCReg FRt, PPCReg FRb); // trunc
void FRIP (PPCReg FRt, PPCReg FRb); // ceil
void FRIM (PPCReg FRt, PPCReg FRb); // floor
// VPU - lvx128
void LoadVector(PPCReg Rd, PPCReg Ra, PPCReg Rb);