Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
f128M_eq_signaling.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include "platform.h"
#include "internals.h"
#include "specialize.h"
#include "softfloat.h"
Include dependency graph for f128M_eq_signaling.c:

Go to the source code of this file.

Functions

bool f128M_eq_signaling (const float128_t *aPtr, const float128_t *bPtr)
 

Function Documentation

◆ f128M_eq_signaling()

bool f128M_eq_signaling ( const float128_t * aPtr,
const float128_t * bPtr )

Definition at line 55 of file f128M_eq_signaling.c.

56{
57 const uint32_t *aWPtr, *bWPtr;
58 uint32_t wordA, wordB, uiA96, uiB96;
59 bool possibleOppositeZeros;
60 uint32_t mashWord;
61
62 aWPtr = (const uint32_t *) aPtr;
63 bWPtr = (const uint32_t *) bPtr;
64 if ( softfloat_isNaNF128M( aWPtr ) || softfloat_isNaNF128M( bWPtr ) ) {
66 return false;
67 }
68 wordA = aWPtr[indexWord( 4, 2 )];
69 wordB = bWPtr[indexWord( 4, 2 )];
70 if ( wordA != wordB ) return false;
71 uiA96 = aWPtr[indexWordHi( 4 )];
72 uiB96 = bWPtr[indexWordHi( 4 )];
73 possibleOppositeZeros = false;
74 if ( uiA96 != uiB96 ) {
75 possibleOppositeZeros = (((uiA96 | uiB96) & 0x7FFFFFFF) == 0);
76 if ( ! possibleOppositeZeros ) return false;
77 }
78 mashWord = wordA | wordB;
79 wordA = aWPtr[indexWord( 4, 1 )];
80 wordB = bWPtr[indexWord( 4, 1 )];
81 if ( wordA != wordB ) return false;
82 mashWord |= wordA | wordB;
83 wordA = aWPtr[indexWord( 4, 0 )];
84 wordB = bWPtr[indexWord( 4, 0 )];
85 return
86 (wordA == wordB)
87 && (! possibleOppositeZeros || ((mashWord | wordA | wordB) == 0));
88
89}
void softfloat_raiseFlags(uint_fast8_t flags)
bool softfloat_isNaNF128M(const uint32_t *)
#define indexWord(total, n)
#define indexWordHi(total)
@ softfloat_flag_invalid
Definition softfloat.h:89
unsigned int uint32_t
Definition stdint.h:126
Here is the call graph for this function: