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

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

?? softfloat.c

?? microwindows移植到S3C44B0的源碼
?? 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一区二区三区免费野_久草精品视频
欧美日本在线看| 国产拍欧美日韩视频二区| 精品少妇一区二区三区 | 精品精品国产高清一毛片一天堂| 亚洲国产电影在线观看| 天天av天天翘天天综合网色鬼国产| 国产69精品久久久久毛片| 欧美精品九九99久久| 亚洲人成影院在线观看| 国产成人精品亚洲午夜麻豆| 欧美一卡二卡在线| 一区二区三区91| 91在线免费看| 国产精品久久毛片av大全日韩| 男人的j进女人的j一区| 日本精品视频一区二区三区| 国产精品高潮呻吟| 大尺度一区二区| 国产日产欧美一区| 狠狠色丁香婷婷综合| 日韩欧美亚洲国产精品字幕久久久 | 国产真实乱子伦精品视频| 欧美精品久久一区| 午夜欧美电影在线观看| 欧美三级三级三级| 亚洲一区二区在线免费观看视频 | 久久66热re国产| 欧美日韩免费电影| 亚洲综合999| 99精品在线免费| 国产精品久久一卡二卡| 成人影视亚洲图片在线| 久久久综合九色合综国产精品| 亚洲成人av电影在线| 在线观看免费一区| 视频一区二区中文字幕| 91精品在线观看入口| 久久精品免费观看| 国产偷国产偷精品高清尤物| 高潮精品一区videoshd| 国产精品福利一区二区三区| 成人av在线网| 亚洲激情男女视频| 精品视频在线免费| 日本亚洲天堂网| 久久色成人在线| 国产成人av网站| 亚洲视频狠狠干| 欧美精品久久99久久在免费线| 轻轻草成人在线| 欧美国产乱子伦| 在线观看成人免费视频| 奇米精品一区二区三区四区| 国产亚洲成aⅴ人片在线观看 | 亚洲免费观看在线视频| 欧美日韩亚洲综合一区| 九九九精品视频| 中文字幕制服丝袜一区二区三区 | 色综合久久久久网| 亚洲色图一区二区三区| 欧美特级限制片免费在线观看| 婷婷久久综合九色综合伊人色| 精品国产一区二区三区四区四 | 国产精品你懂的在线欣赏| 91视频观看视频| 蜜臀精品一区二区三区在线观看| 欧美极品另类videosde| 欧美在线色视频| 国产精品一二二区| 一区二区不卡在线播放 | 午夜国产精品一区| 欧美国产亚洲另类动漫| 欧美色图一区二区三区| 激情欧美一区二区三区在线观看| 亚洲天堂久久久久久久| 欧美一区二区美女| 成人午夜看片网址| 日韩—二三区免费观看av| 国产欧美日韩在线看| 91麻豆精品国产91久久久久久久久| 国产精品夜夜嗨| 蜜臀99久久精品久久久久久软件| 中文字幕一区二区日韩精品绯色| 欧美一区二区精品| 在线观看日韩电影| av成人动漫在线观看| 国产一区二区三区免费| 亚洲成人av免费| 一区二区视频在线看| 国产欧美一区二区精品婷婷| 欧美一区2区视频在线观看| 欧美网站一区二区| 97se亚洲国产综合自在线| 国产盗摄女厕一区二区三区| 日本色综合中文字幕| 亚洲综合久久久久| 亚洲欧美成人一区二区三区| 国产精品系列在线| 精品av综合导航| 日韩欧美亚洲国产另类| 日韩一区二区三区高清免费看看| 国产精品一区专区| 国产一区二区三区观看| 美女高潮久久久| 日本 国产 欧美色综合| 日韩精品亚洲专区| 日韩精品久久久久久| 午夜精品福利一区二区三区av | 日韩女同互慰一区二区| 欧美日韩精品一区二区在线播放| 一本久久a久久免费精品不卡| 99久久99久久精品免费观看 | 一区二区三国产精华液| 亚洲精品老司机| 亚洲一区二区三区中文字幕| 亚洲美女在线一区| 亚洲一区二区免费视频| 亚洲亚洲精品在线观看| 亚洲一区免费在线观看| 视频在线观看91| 人禽交欧美网站| 国产一区二区视频在线播放| 国产99精品视频| 99久久国产综合色|国产精品| 国内精品视频一区二区三区八戒| 激情综合一区二区三区| 国产老妇另类xxxxx| 成人丝袜高跟foot| av不卡免费电影| 欧美日韩成人综合| 日韩欧美高清在线| 欧美激情一区不卡| 久久久.com| 亚洲精品少妇30p| 亚洲成人动漫一区| 日韩极品在线观看| 国产不卡视频一区| 99国内精品久久| 欧美区在线观看| 国产调教视频一区| 亚洲啪啪综合av一区二区三区| 午夜在线电影亚洲一区| 激情综合色丁香一区二区| 国产乱码精品一区二区三区忘忧草 | 蜜芽一区二区三区| 东方欧美亚洲色图在线| 在线观看日韩高清av| 2021中文字幕一区亚洲| 亚洲女与黑人做爰| 捆绑变态av一区二区三区| 不卡的看片网站| 欧美一级二级三级蜜桃| 中文字幕欧美一区| 麻豆精品视频在线| 色香色香欲天天天影视综合网| 91精品视频网| 日韩一区中文字幕| 久久99精品网久久| 在线观看av不卡| 国产日韩欧美一区二区三区综合| 亚洲国产视频a| 国产成人精品一区二区三区四区 | 亚洲色图另类专区| 韩国精品在线观看| 欧美无乱码久久久免费午夜一区| 久久久亚洲综合| 日本一道高清亚洲日美韩| 色悠悠久久综合| 中文字幕欧美日本乱码一线二线| 欧美a一区二区| 91精品1区2区| 国产精品国产a| 国产a视频精品免费观看| 欧美熟乱第一页| 1024精品合集| 成人精品免费看| 久久你懂得1024| 美腿丝袜亚洲综合| 欧美日韩成人一区| 亚洲精品伦理在线| av不卡免费在线观看| 亚洲国产经典视频| 国产一区福利在线| 2021中文字幕一区亚洲| 蜜桃一区二区三区在线| 欧美人伦禁忌dvd放荡欲情| 一区二区三区丝袜| 99精品久久免费看蜜臀剧情介绍| 中文字幕欧美日本乱码一线二线| 国内成+人亚洲+欧美+综合在线 | 精品在线播放免费| 日韩视频免费观看高清完整版| 午夜欧美大尺度福利影院在线看| 色综合色狠狠综合色| 亚洲视频在线一区| 日本久久精品电影| 亚洲综合色网站| 欧美日韩激情一区二区三区| 亚洲第一久久影院| 欧美放荡的少妇|