摘要: MIPS 指令集(共31条)助记符指令格式示例示例含义操作及其解释Bit #31..2625..2120..1615..1110..65..0R-typeoprsrtrdshamtfuncadd000000rsrtrd00000100000add $1,$2,$3$1=$2+$3rd <- rs + rt;其中rs=$2,rt=$3, rd=$1addu000000rsrtrd00000100001addu $1,$2,$3$1=$2+$3rd <- rs + rt;其中rs=$2,rt=$3, rd=$1,无符号数sub000000rsrtrd00000100010sub $1, 阅读全文
posted @ 2013-03-22 21:00 mipscpu 阅读(1632) 评论(0) 推荐(1) 编辑
摘要: http://www.360doc.com/content/10/0817/09/2415113_46631439.shtml 阅读全文
posted @ 2013-03-22 11:23 mipscpu 阅读(3014) 评论(0) 推荐(0) 编辑
摘要: 浮点数的范围,很容易搞清楚,比如 IEEE754范围就是 ± 1.0000 0000 0000 0000 0000 000*2^(-126) ± 1.1111 1111 1111 1111 1111 111*2^(127)但是精度,有点小绕比如比1.1111 1111 1111 1111 1111 111*2^(127) 小的数(离她最近的数) 是1.1111 1111 1111 1111 1111 110*2^(127)所以当 指数是127的时候,精度就是0.0000 0000 0000 0000 0000 001*2^(127)所以, 指数不一样的时候,精度是不一样的。 阅读全文
posted @ 2013-03-21 21:01 mipscpu 阅读(514) 评论(0) 推荐(0) 编辑
摘要: 作者: jillzhang联系方式:jillzhang@126.com 本文为原创,转载请保留出处以及作者, 谢谢 C语言和C#语言中,对于浮点类型的数据采用单精度类型(float)和双精度类型(double)来存储,float数据占用32bit,double数据占用64bit,我们在声明一个变量float f= 2.25f的时候,是如何分配内存的呢?如果胡乱分配,那世界岂不是乱套了么,其实不论是float还是double在存储方式上都是遵从IEEE的规范的,float遵从的是IEEE R32.24 ,而double 遵从的是R64.53。 无论是单精度还是双精度在存储中都分为三个部分:符号位 阅读全文
posted @ 2013-03-21 20:04 mipscpu 阅读(757) 评论(0) 推荐(0) 编辑
摘要: http://wenku.baidu.com/view/82200b8c8762caaedd33d4b6.html 阅读全文
posted @ 2013-03-20 15:07 mipscpu 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 用mips编译器出elf文件之后,由readelf objdump等命令 可以分析elf文件bootldr_elf: $(AS_MIPS) -o boot.o boot.asm $(GCC_MIPS) bootldr.c $(GCC_MIPS) no_os.c $(GCC_MIPS) -DDLL_DISABLE ddr_init.c $(LD_MIPS) -Ttext 0 -eentry -Map test.map -s -N -o test.axf \ boot.o bootldr.o no_os.o ddr_init.o @$(DUMP_M... 阅读全文
posted @ 2013-03-15 21:18 mipscpu 阅读(1048) 评论(0) 推荐(0) 编辑
摘要: ifeq ($(LANG),)# Customize for Windows# The MIPS gcc compiler must use the cygwin1.dll that came with the compiler.CC_X86 = cl /O1 /nologoCP = copyRM = delDWIN32 = -DWIN32BIN_MIPS = ..\gccmips_elfVHDL_DIR = ..\vhdlLINUX_PWD =GCC_MIPS = $(BIN_MIPS)\gcc $(CFLAGS)AS_MIPS = $(BIN_MIPS)\asLD_MIPS = ... 阅读全文
posted @ 2013-03-15 15:36 mipscpu 阅读(2502) 评论(0) 推荐(0) 编辑
摘要: objdump -D -b binary -m mips -EB test.bin>test1.txt和正常编译器件产生的 .lst 文件相同vim查看二进制文件 命令 :%!xxd 阅读全文
posted @ 2013-03-14 19:31 mipscpu 阅读(2320) 评论(0) 推荐(0) 编辑