在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3138|回复: 6

自制cpu中,如何处理未实现的指令(相对于某指令集)。

[复制链接]
发表于 2010-5-13 03:43:53 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
题目一行字,很难把问题描述清楚。

是这样。
假如我想自己攒一个简易的cpu,但如果里面有些指令实现起来过于复杂,我想规避掉,甚至只想做一套指令集的子集。但是对于编译器,想使用gcc。我想它会使用所有指令集中的指令。这时候出现了我未实现的指令应该怎么处理?

我能想到的是,先gcc出汇编,然后自己做个程序去处理汇编,把未实现的指令用已有指令组替换,类似伪指令。不过寄存器看起来需要谨慎的使用。

请问有什么其他方法去处理这种冲突吗?谢谢回复。
发表于 2010-6-9 11:21:20 | 显示全部楼层
不懂的人飘过
发表于 2010-6-13 22:45:01 | 显示全部楼层
高深问题,帮顶
发表于 2010-6-14 03:29:22 | 显示全部楼层
这个,劝你直接上汇编
发表于 2010-6-16 00:04:37 | 显示全部楼层
For example, OpenCores' Plasma CPU is a MIPS clone, but it doesn't implement MIPS's unaligned load/store instructions due to patent issue. Therefore, if this kind unsupported instructions are executed, an exception is raised, and then the CPU jumps to the exception handler to "emulate" the instructions (MIPS ISA defines an exception to handle unknown instructions).

However, if you want to avoid such exceptions, maybe you should modify the GCC toolchain.
发表于 2010-6-16 21:11:36 | 显示全部楼层
支持一下
发表于 2010-9-10 09:48:29 | 显示全部楼层
学习...
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-28 21:15 , Processed in 0.034088 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表