资源简介
mips-sde-elf-i686-pc-linux-gnu.tar.bz2 下载这里来编译mips
代码片段和文件信息
/*
* Copyright (c) 2009 CodeSourcery Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of CodeSourcery nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY CODESOURCERY INC. ‘‘AS IS‘‘ AND ANY
* EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL CODESOURCERY BE LIABLE FOR ANY
* DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES
* (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
ieee754dp
ieee754dp_format(int sn int xe uint64_t xm)
{
xe += DP_EBIAS;
if (UNLIKELY (xe < DP_EBIAS + DP_EMIN))
{
/* Strip lower bits. */
int es;
if (IEEE754_NO_DENORMS ())
{
SETCX(IEEE754_UNDERFLOW);
return ieee754dp_zero(sn);
}
/* Sticky right shift es bits. */
es = DP_EBIAS + DP_EMIN - xe;
xm = XDPSRS(xmes);
xe += es;
}
if ((uint32_t)xm & ((1 << DP_GUARDBITS) - 1))
{
SETCX(IEEE754_INEXACT);
/* Inexact must round off guard bits. */
switch (IEEE754_GET_RM ())
{
case IEEE754_RZ:
break;
case IEEE754_RN:
xm += ((0x1 << (DP_GUARDBITS - 1)) - 1)
+ (((uint32_t)xm >> DP_GUARDBITS) & 1);
break;
case IEEE754_RU: /* toward +Infinity */
if (!sn)
xm += (0x1 << DP_GUARDBITS);
break;
case IEEE754_RD: /* toward -Infinity */
if (sn)
xm += (0x1 << DP_GUARDBITS);
break;
}
/* Adjust exponent for rounding overflow. */
if (xm & DP_MBIT(DP_MBITS + DP_GUARDBITS + 1))
{
xm >>= 1;
xe++;
}
}
/* Strip grs bits. */
xm >>= DP_GUARDBITS;
if (UNLIKELY (xe > DP_EBIAS + DP_EMAX))
{
SETCX(IEEE754_OVERFLOW);
/* -O can be table indexed by (rmsn). */
switch (IEEE754_GET_RM ())
{
case IEEE754_RN:
return ieee754dp_inf (sn);
case IEEE754_RZ:
return ieee754dp_max(sn);
case IEEE754_RU: /* toward +Infinity */
if (sn == 0)
return ie
- 上一篇:CASS9.2完整版
- 下一篇:网络工程师教程 第五版 1-6章 高清PDF版
相关资源
- 计算机组成原理与接口技术:基于M
- 一个简单的MIPS模拟器
- MIPS sim模拟器
- MIPS CPU设计、理想指令流水线设计
- VC 开发的MIPS五级整数流水线模拟程序
- MIPS五级流水线CPU(verilog实现)
- mips处理器verilog代码实现AES功能
- mips gdbserver二进制文件
- 动态分支预测MIPS.rar
- MIPS汇编语言十进制转十六进制
- 自己动手写CPU第4阶段第一条指令ori的
- 开源处理器OpenMIPS模块连接关系图
- 用汇编编写的10个数的冒泡排序
- 31条指令CPU
- MIPS32位单周期CPU
- MIPS单/多周期CPU设计Verilog源码
- 龙芯2F硬件设计参考
- 模拟MIPS流水线处理器的verilog源代码
- 北航计组P2-汇编语言
- 基于MIPS32位的ALU设计
- MIPS的汇编器,将MIPS汇编程序生成二进
- 五级流水线MIPS微处理器部分指令实现
- 单周期CPUMIPS32位单周期CPU 32位MIPS单周
- Mips1.circ
- convert转换bin到coe
- 华中科技大学 MIPS_CPU 实现了动态分支
- vxworks_for_mips_architecture_supplement_6.1
- winmips64.zip
- 北邮计算机系统结构实验三-使用MIP
- MIPS 32位CPU中ALU的实现
评论
共有 条评论