Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
f128M_eq.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.c:

Go to the source code of this file.

Functions

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

Function Documentation

◆ f128M_eq()

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

Definition at line 55 of file f128M_eq.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 wordA = aWPtr[indexWord( 4, 2 )];
65 wordB = bWPtr[indexWord( 4, 2 )];
66 if ( wordA != wordB ) goto false_checkSigNaNs;
67 uiA96 = aWPtr[indexWordHi( 4 )];
68 uiB96 = bWPtr[indexWordHi( 4 )];
69 possibleOppositeZeros = false;
70 if ( uiA96 != uiB96 ) {
71 possibleOppositeZeros = (((uiA96 | uiB96) & 0x7FFFFFFF) == 0);
72 if ( ! possibleOppositeZeros ) goto false_checkSigNaNs;
73 }
74 mashWord = wordA | wordB;
75 wordA = aWPtr[indexWord( 4, 1 )];
76 wordB = bWPtr[indexWord( 4, 1 )];
77 if ( wordA != wordB ) goto false_checkSigNaNs;
78 mashWord |= wordA | wordB;
79 wordA = aWPtr[indexWord( 4, 0 )];
80 wordB = bWPtr[indexWord( 4, 0 )];
81 if ( wordA != wordB ) goto false_checkSigNaNs;
82 if ( possibleOppositeZeros && ((mashWord | wordA | wordB) != 0) ) {
83 goto false_checkSigNaNs;
84 }
85 if ( ! softfloat_isNaNF128M( aWPtr ) && ! softfloat_isNaNF128M( bWPtr ) ) {
86 return true;
87 }
88 false_checkSigNaNs:
89 if (
90 f128M_isSignalingNaN( (const float128_t *) aWPtr )
91 || f128M_isSignalingNaN( (const float128_t *) bWPtr )
92 ) {
94 }
95 return false;
96
97}
bool f128M_isSignalingNaN(const float128_t *aPtr)
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: