用于教育目的的小型C编译器 [英] small c compiler for educational purpose
本文介绍了用于教育目的的小型C编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有任何遵循ansi c扩展的小型c编译器,但它的LOC仍然少于10,000.基本上,我们正在尝试将这种小型编译器移植到称为xv6的此类教育性OS内核之一.谢谢.
Is there any small c compiler which follows ansi c extensions and still it has less than 10,000 LOC. Basically 'm trying to port such small compiler to one of such educational OS kernel known as xv6. Thanks.
推荐答案
事实证明,xv6迫切需要进行一些改进,以承载一个不错的C编译器,或者只是一个汇编器和一个链接器:
It turns out xv6 badly needs several improvements in order to host a decent C compiler or just an assembler and a linker:
- 最大文件大小更大(当前上限为64KB)
- lseek
- 在上下文切换器上保存/恢复FPU状态
可能还需要一些其他小的改进.
A few other minor improvements may be needed.
链接:
- Increasing the filesystem block size in the xv6 OS
- system calls & toolchains
这篇关于用于教育目的的小型C编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文