MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / getFloatInternalRoundedSome

Function getFloatInternalRoundedSome

src/softfloat/softfloat.cpp:378–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378floatx80 getFloatInternalRoundedSome( void )
379{
380 flag zSign;
381 int32_t zExp;
382 uint64_t zSig, zSig32, zSig64, zSig80;
383
384 if (floatx80_internal_precision == 80) {
385 getRoundedFloatInternal( 80, &zSign, &zExp, &zSig80 );
386 zSig = zSig80;
387 } else if (floatx80_internal_precision == 64) {
388 getRoundedFloatInternal( 64, &zSign, &zExp, &zSig64 );
389 zSig80 = floatx80_internal_sig0;
390 if (zSig64 != (zSig80 & LIT64( 0xFFFFFFFFFFFFF800 ))) {
391 zSig80++;
392 }
393 zSig = zSig64;
394 zSig |= zSig80 & LIT64( 0x00000000000007FF );
395 } else {
396 getRoundedFloatInternal( 32, &zSign, &zExp, &zSig32 );
397 zSig80 = floatx80_internal_sig0;
398 if (zSig32 != (zSig80 & LIT64( 0xFFFFFF0000000000 ))) {
399 zSig80++;
400 }
401 zSig = zSig32;
402 zSig |= zSig80 & LIT64( 0x000000FFFFFFFFFF );
403 }
404
405 return packFloatx80( zSign, zExp & 0x7FFF, zSig );
406
407}
408
409floatx80 getFloatInternalFloatx80( void )
410{

Callers 1

fp_get_internal_roundFunction · 0.85

Calls 2

getRoundedFloatInternalFunction · 0.85
packFloatx80Function · 0.85

Tested by

no test coverage detected