Hacker News new | past | comments | ask | show | jobs | submit login

> Currently it generates 16-bit and 32-bit 80386+ assembly code for NASM that can then be assembled and linked into DOS, Windows and Linux programs.

I wonder why not 64Bit? Hardly anyone uses 32bit processors anymore, and even in the Windows world 64Bit systems are slowly taking over, so it would seem more logical to me to compile for modern processors, instead of 16bit architecture.




The x86_64 instruction set is a lot more complicated than the x86 one.


That is so but the subset of x86_64 that you'd use for code generation is pretty much the same as the subset of x86 that you'd use for code generation.


What do you have in mind here? What x86 code generated by a C compiler is not readily translatable to x86-64 code?


The additional registers would be useful. Even if sticking to the x32 ABI.


Going 64-bit is quite a bit of work:

- additional 64-bit types will need additional code for type checks and conversions, switch, etc

- new or improved code generator is needed (ideally, 64-bit non-pointer types should also be supported in 32-bit programs, possibly as register pairs)

- new object and executable formats to handle

- possibly new ABIs to support (pushing arguments onto the stack and never bothering to align the stack pointer onto a multiple of 8 or 16 boundary is kinda easy, it's pretty much free)

And the above work hasn't been done.


> Hardly anyone uses 32bit processors anymore,

On the contrary, nearly everyone has a processor that can run 32 bit programs now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: