refactors zeroProd branch to allow for better case handling

This commit is contained in:
Eyck-Alexander Jentzsch 2024-07-30 12:02:40 +02:00
parent 7ffa7667b6
commit 2edd68d1bd
1 changed files with 12 additions and 7 deletions

View File

@ -212,13 +212,18 @@ float32_t
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
zeroProd: zeroProd:
uiZ = (uiC & ~(1UL << 31)) | ((unsigned long)signC << 31); //set sign bit if(expC | sigC){
if ( ! (expC | sigC) && (signProd != signC) ) { //3rd operand != 0
uiZ = (uiC & ~(1UL << 31)) | ((unsigned long)(signC) << 31); //set sign bit
}
else {
//3rd operand == +-0
if (signProd != signC) {
completeCancellation: completeCancellation:
uiZ = uiZ = packToF32UI((softfloat_roundingMode == softfloat_round_min), 0, 0 );
packToF32UI( goto uiZ;
(softfloat_roundingMode == softfloat_round_min), 0, 0 ); }
uiZ = (uiZ & ~(1UL << 31)) | ((unsigned long)(signC|signProd) << 31); //set sign bit uiZ = (uiC & ~(1UL << 31)) | ((unsigned long)signC << 31); //set sign bit
} }
uiZ: uiZ:
uZ.ui = uiZ; uZ.ui = uiZ;