亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? softfloat.c

?? 該文件是rt_linux
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*===============================================================================This C source file is part of the SoftFloat IEC/IEEE Floating-pointArithmetic Package, Release 2.Written by John R. Hauser.  This work was made possible in part by theInternational Computer Science Institute, located at Suite 600, 1947 CenterStreet, Berkeley, California 94704.  Funding was partially provided by theNational Science Foundation under grant MIP-9311980.  The original versionof this code was written as part of a project to build a fixed-point vectorprocessor in collaboration with the University of California at Berkeley,overseen by Profs. Nelson Morgan and John Wawrzynek.  More informationis available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/softfloat.html'.THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable efforthas been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL ATTIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TOPERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANYAND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.Derivative works are acceptable, even for commercial purposes, so long as(1) they include prominent notice that the work is derivative, and (2) theyinclude prominent notice akin to these three paragraphs for those parts ofthis code that are retained.===============================================================================*/#include "fpa11.h"#include "milieu.h"#include "softfloat.h"/*-------------------------------------------------------------------------------Floating-point rounding mode, extended double-precision rounding precision,and exception flags.-------------------------------------------------------------------------------*/int8 float_rounding_mode = float_round_nearest_even;int8 floatx80_rounding_precision = 80;int8 float_exception_flags;/*-------------------------------------------------------------------------------Primitive arithmetic functions, including multi-word arithmetic, anddivision and square root approximations.  (Can be specialized to target ifdesired.)-------------------------------------------------------------------------------*/#include "softfloat-macros"/*-------------------------------------------------------------------------------Functions and definitions to determine:  (1) whether tininess for underflowis detected before or after rounding by default, (2) what (if anything)happens when exceptions are raised, (3) how signaling NaNs are distinguishedfrom quiet NaNs, (4) the default generated quiet NaNs, and (5) how NaNsare propagated from function inputs to output.  These details are target-specific.-------------------------------------------------------------------------------*/#include "softfloat-specialize"/*-------------------------------------------------------------------------------Takes a 64-bit fixed-point value `absZ' with binary point between bits 6and 7, and returns the properly rounded 32-bit integer corresponding to theinput.  If `zSign' is nonzero, the input is negated before being convertedto an integer.  Bit 63 of `absZ' must be zero.  Ordinarily, the fixed-pointinput is simply rounded to an integer, with the inexact exception raised ifthe input cannot be represented exactly as an integer.  If the fixed-pointinput is too large, however, the invalid exception is raised and the largestpositive or negative integer is returned.-------------------------------------------------------------------------------*/static int32 roundAndPackInt32( flag zSign, bits64 absZ ){    int8 roundingMode;    flag roundNearestEven;    int8 roundIncrement, roundBits;    int32 z;    roundingMode = float_rounding_mode;    roundNearestEven = ( roundingMode == float_round_nearest_even );    roundIncrement = 0x40;    if ( ! roundNearestEven ) {        if ( roundingMode == float_round_to_zero ) {            roundIncrement = 0;        }        else {            roundIncrement = 0x7F;            if ( zSign ) {                if ( roundingMode == float_round_up ) roundIncrement = 0;            }            else {                if ( roundingMode == float_round_down ) roundIncrement = 0;            }        }    }    roundBits = absZ & 0x7F;    absZ = ( absZ + roundIncrement )>>7;    absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );    z = absZ;    if ( zSign ) z = - z;    if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) {        float_exception_flags |= float_flag_invalid;        return zSign ? 0x80000000 : 0x7FFFFFFF;    }    if ( roundBits ) float_exception_flags |= float_flag_inexact;    return z;}/*-------------------------------------------------------------------------------Returns the fraction bits of the single-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE bits32 extractFloat32Frac( float32 a ){    return a & 0x007FFFFF;}/*-------------------------------------------------------------------------------Returns the exponent bits of the single-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE int16 extractFloat32Exp( float32 a ){    return ( a>>23 ) & 0xFF;}/*-------------------------------------------------------------------------------Returns the sign bit of the single-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE flag extractFloat32Sign( float32 a ){    return a>>31;}/*-------------------------------------------------------------------------------Normalizes the subnormal single-precision floating-point value representedby the denormalized significand `aSig'.  The normalized exponent andsignificand are stored at the locations pointed to by `zExpPtr' and`zSigPtr', respectively.-------------------------------------------------------------------------------*/static void normalizeFloat32Subnormal( bits32 aSig, int16 *zExpPtr, bits32 *zSigPtr ){    int8 shiftCount;    shiftCount = countLeadingZeros32( aSig ) - 8;    *zSigPtr = aSig<<shiftCount;    *zExpPtr = 1 - shiftCount;}/*-------------------------------------------------------------------------------Packs the sign `zSign', exponent `zExp', and significand `zSig' into asingle-precision floating-point value, returning the result.  After beingshifted into the proper positions, the three fields are simply addedtogether to form the result.  This means that any integer portion of `zSig'will be added into the exponent.  Since a properly normalized significandwill have an integer portion equal to 1, the `zExp' input should be 1 lessthan the desired result exponent whenever `zSig' is a complete, normalizedsignificand.-------------------------------------------------------------------------------*/INLINE float32 packFloat32( flag zSign, int16 zExp, bits32 zSig ){#if 0   float32 f;   __asm__("@ packFloat32;   	    mov %0, %1, asl #31;   	    orr %0, %2, asl #23;   	    orr %0, %3"   	    : /* no outputs */   	    : "g" (f), "g" (zSign), "g" (zExp), "g" (zSig)   	    : "cc");   return f;#else    return ( ( (bits32) zSign )<<31 ) + ( ( (bits32) zExp )<<23 ) + zSig;#endif }/*-------------------------------------------------------------------------------Takes an abstract floating-point value having sign `zSign', exponent `zExp',and significand `zSig', and returns the proper single-precision floating-point value corresponding to the abstract input.  Ordinarily, the abstractvalue is simply rounded and packed into the single-precision format, withthe inexact exception raised if the abstract input cannot be representedexactly.  If the abstract value is too large, however, the overflow andinexact exceptions are raised and an infinity or maximal finite value isreturned.  If the abstract value is too small, the input value is rounded toa subnormal number, and the underflow and inexact exceptions are raised ifthe abstract input cannot be represented exactly as a subnormal single-precision floating-point number.    The input significand `zSig' has its binary point between bits 30and 29, which is 7 bits to the left of the usual location.  This shiftedsignificand must be normalized or smaller.  If `zSig' is not normalized,`zExp' must be 0; in that case, the result returned is a subnormal number,and it must not require rounding.  In the usual case that `zSig' isnormalized, `zExp' must be 1 less than the ``true'' floating-point exponent.The handling of underflow and overflow follows the IEC/IEEE Standard forBinary Floating-point Arithmetic.-------------------------------------------------------------------------------*/static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig ){    int8 roundingMode;    flag roundNearestEven;    int8 roundIncrement, roundBits;    flag isTiny;    roundingMode = float_rounding_mode;    roundNearestEven = ( roundingMode == float_round_nearest_even );    roundIncrement = 0x40;    if ( ! roundNearestEven ) {        if ( roundingMode == float_round_to_zero ) {            roundIncrement = 0;        }        else {            roundIncrement = 0x7F;            if ( zSign ) {                if ( roundingMode == float_round_up ) roundIncrement = 0;            }            else {                if ( roundingMode == float_round_down ) roundIncrement = 0;            }        }    }    roundBits = zSig & 0x7F;    if ( 0xFD <= (bits16) zExp ) {        if (    ( 0xFD < zExp )             || (    ( zExp == 0xFD )                  && ( (sbits32) ( zSig + roundIncrement ) < 0 ) )           ) {            float_raise( float_flag_overflow | float_flag_inexact );            return packFloat32( zSign, 0xFF, 0 ) - ( roundIncrement == 0 );        }        if ( zExp < 0 ) {            isTiny =                   ( float_detect_tininess == float_tininess_before_rounding )                || ( zExp < -1 )                || ( zSig + roundIncrement < 0x80000000 );            shift32RightJamming( zSig, - zExp, &zSig );            zExp = 0;            roundBits = zSig & 0x7F;            if ( isTiny && roundBits ) float_raise( float_flag_underflow );        }    }    if ( roundBits ) float_exception_flags |= float_flag_inexact;    zSig = ( zSig + roundIncrement )>>7;    zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );    if ( zSig == 0 ) zExp = 0;    return packFloat32( zSign, zExp, zSig );}/*-------------------------------------------------------------------------------Takes an abstract floating-point value having sign `zSign', exponent `zExp',and significand `zSig', and returns the proper single-precision floating-point value corresponding to the abstract input.  This routine is just like`roundAndPackFloat32' except that `zSig' does not have to be normalized inany way.  In all cases, `zExp' must be 1 less than the ``true'' floating-point exponent.-------------------------------------------------------------------------------*/static float32 normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig ){    int8 shiftCount;    shiftCount = countLeadingZeros32( zSig ) - 1;    return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<<shiftCount );}/*-------------------------------------------------------------------------------Returns the fraction bits of the double-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE bits64 extractFloat64Frac( float64 a ){    return a & LIT64( 0x000FFFFFFFFFFFFF );}/*-------------------------------------------------------------------------------Returns the exponent bits of the double-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE int16 extractFloat64Exp( float64 a ){    return ( a>>52 ) & 0x7FF;}/*-------------------------------------------------------------------------------Returns the sign bit of the double-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE flag extractFloat64Sign( float64 a ){    return a>>63;}/*-------------------------------------------------------------------------------Normalizes the subnormal double-precision floating-point value representedby the denormalized significand `aSig'.  The normalized exponent andsignificand are stored at the locations pointed to by `zExpPtr' and`zSigPtr', respectively.-------------------------------------------------------------------------------*/static void normalizeFloat64Subnormal( bits64 aSig, int16 *zExpPtr, bits64 *zSigPtr ){    int8 shiftCount;    shiftCount = countLeadingZeros64( aSig ) - 11;    *zSigPtr = aSig<<shiftCount;    *zExpPtr = 1 - shiftCount;}/*-------------------------------------------------------------------------------Packs the sign `zSign', exponent `zExp', and significand `zSig' into adouble-precision floating-point value, returning the result.  After beingshifted into the proper positions, the three fields are simply addedtogether to form the result.  This means that any integer portion of `zSig'will be added into the exponent.  Since a properly normalized significandwill have an integer portion equal to 1, the `zExp' input should be 1 lessthan the desired result exponent whenever `zSig' is a complete, normalizedsignificand.-------------------------------------------------------------------------------*/INLINE float64 packFloat64( flag zSign, int16 zExp, bits64 zSig ){    return ( ( (bits64) zSign )<<63 ) + ( ( (bits64) zExp )<<52 ) + zSig;}/*-------------------------------------------------------------------------------Takes an abstract floating-point value having sign `zSign', exponent `zExp',and significand `zSig', and returns the proper double-precision floating-point value corresponding to the abstract input.  Ordinarily, the abstractvalue is simply rounded and packed into the double-precision format, withthe inexact exception raised if the abstract input cannot be representedexactly.  If the abstract value is too large, however, the overflow andinexact exceptions are raised and an infinity or maximal finite value isreturned.  If the abstract value is too small, the input value is rounded to

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
337p亚洲精品色噜噜狠狠| 国产精品自拍一区| 国产精品水嫩水嫩| 精品精品国产高清a毛片牛牛| 欧美三级电影精品| 欧美最猛黑人xxxxx猛交| 波波电影院一区二区三区| 国产成人午夜视频| 高清国产午夜精品久久久久久| 国产成人综合在线| 国产成人99久久亚洲综合精品| 成人综合激情网| 波波电影院一区二区三区| av色综合久久天堂av综合| www.久久久久久久久| 91麻豆文化传媒在线观看| 99re这里都是精品| 欧美嫩在线观看| 精品国产一区二区三区av性色| 国产亚洲成aⅴ人片在线观看| 欧美韩日一区二区三区四区| ...av二区三区久久精品| 亚洲激情自拍偷拍| 免费观看在线综合色| 极品少妇一区二区| 不卡电影一区二区三区| 在线观看中文字幕不卡| 日韩精品一区二区三区视频播放 | 欧美一级精品在线| 欧美videossexotv100| 国产日韩欧美麻豆| 亚洲一区视频在线观看视频| 青青草国产成人99久久| 国产91精品免费| 欧美日本一道本| 久久久777精品电影网影网| 亚洲欧洲日产国产综合网| 亚洲成av人综合在线观看| 国产在线精品一区在线观看麻豆| 94-欧美-setu| 91精品国产综合久久蜜臀 | 国产日韩欧美精品一区| 亚洲一区欧美一区| 国产成人超碰人人澡人人澡| 在线视频欧美精品| 国产色产综合色产在线视频| 亚洲第一福利一区| 99久久精品国产麻豆演员表| 精品精品国产高清a毛片牛牛| 一区二区三区波多野结衣在线观看| 免费在线一区观看| 欧美色图激情小说| 国产精品人妖ts系列视频| 蜜桃视频免费观看一区| 色哟哟亚洲精品| 亚洲国产精品t66y| 老鸭窝一区二区久久精品| 欧美日韩色综合| 亚洲免费资源在线播放| 成人一区在线看| 久久久久久一二三区| 久久精品国产99国产| 欧美日韩电影在线| 亚洲国产日日夜夜| 一本久久综合亚洲鲁鲁五月天| 久久蜜桃av一区二区天堂| 久久精品国产精品亚洲精品| 欧美日韩免费视频| 亚洲综合一区二区三区| 在线视频综合导航| 亚洲综合视频在线观看| 色域天天综合网| 亚洲激情中文1区| 一本色道久久综合精品竹菊| 中文字幕永久在线不卡| 丁香婷婷综合激情五月色| 国产女同互慰高潮91漫画| 国产乱码精品一区二区三 | 国产精品系列在线| 国产东北露脸精品视频| 久久久欧美精品sm网站| 国产精品系列在线播放| 欧美—级在线免费片| 成人黄色大片在线观看| 国产精品电影院| 91理论电影在线观看| 一区二区三区日韩欧美精品| 一本久久精品一区二区| 亚洲黄一区二区三区| 欧美另类高清zo欧美| 麻豆国产欧美日韩综合精品二区| 日韩三级精品电影久久久| 激情文学综合插| 中文在线资源观看网站视频免费不卡| 国产精品综合网| 亚洲精品国产a久久久久久| 欧美亚洲图片小说| 乱中年女人伦av一区二区| 久久精品视频免费| 波多野结衣亚洲一区| 亚洲国产毛片aaaaa无费看 | 久久久午夜精品理论片中文字幕| 国产伦精品一区二区三区免费| 国产色一区二区| 欧美在线观看一二区| 欧美aⅴ一区二区三区视频| 国产亚洲精品久| 一本大道久久a久久精二百| 偷拍一区二区三区| 久久精品一级爱片| 欧美亚洲图片小说| 国产精品99久| 视频一区中文字幕国产| 精品少妇一区二区三区| 99久久精品国产毛片| 久久精品国产免费| 中文字幕亚洲一区二区va在线| 欧美日韩精品久久久| 国产精品亚洲一区二区三区在线| 有码一区二区三区| 国产午夜亚洲精品不卡| 欧美二区在线观看| 91在线免费播放| 国产一区美女在线| 午夜视频在线观看一区| 成人欧美一区二区三区小说| 欧美肥妇free| 在线观看日韩国产| 大尺度一区二区| 久久国产免费看| 亚洲丰满少妇videoshd| 国产精品久久久久久久第一福利| 91精品国产高清一区二区三区| 9i看片成人免费高清| 国产一区激情在线| 热久久免费视频| 首页亚洲欧美制服丝腿| 一区二区三区在线观看欧美| 日本一区二区三区四区在线视频| 7777精品伊人久久久大香线蕉的 | 美女脱光内衣内裤视频久久影院| 亚洲欧洲国产日本综合| 久久丝袜美腿综合| 日韩欧美成人一区| 欧美不卡一区二区| 91精品国产综合久久精品图片| 91行情网站电视在线观看高清版| 丁香网亚洲国际| 成人sese在线| 成人国产精品免费| 99国产精品久久久久久久久久| 国产二区国产一区在线观看| 麻豆成人综合网| 久久99精品久久久久| 精品一区二区日韩| 精品综合久久久久久8888| 久久精品国内一区二区三区| 秋霞午夜鲁丝一区二区老狼| 天天综合色天天综合色h| 五月激情综合色| 日韩电影在线一区二区三区| 蜜臀av性久久久久蜜臀aⅴ流畅 | 欧美日韩一区二区三区视频| 色成年激情久久综合| 日本韩国精品在线| 欧美中文字幕亚洲一区二区va在线| 91成人在线精品| 欧美日韩一区 二区 三区 久久精品| 欧美性xxxxxxxx| 91精品欧美久久久久久动漫| 欧美成人三级电影在线| www国产精品av| 中文字幕一区二区三区av| 亚洲综合久久久| 日精品一区二区| 国产黄人亚洲片| 色先锋aa成人| 日韩欧美在线影院| 久久精品网站免费观看| 亚洲精选视频在线| 日韩和欧美一区二区三区| 久久爱www久久做| 成人h动漫精品一区二| 欧美日韩在线综合| 久久夜色精品国产欧美乱极品| 国产精品毛片大码女人| 亚洲国产精品影院| 国产精品一品二品| 欧美亚洲综合另类| 国产嫩草影院久久久久| 一区二区三区毛片| 国产美女久久久久| 欧美优质美女网站| 欧美精品一区二区三区在线播放 | 欧美sm美女调教| 亚洲视频你懂的| 国内外精品视频| 欧美中文字幕一区| 国产精品色婷婷久久58| 免费xxxx性欧美18vr|