Jump to content
  • Advertisement
  • entries
  • comments
  • views

Epoch 64-bit compiler progress

Sign in to follow this  


Just a short while ago, the first working 64-bit compiler for Epoch was produced!

Well, "working" might be a minor stretch; it launches, prints a simple text banner message, and then exits cleanly. But that represents a lot of operational code by itself.

  • The 32-bit compiler is able to lex, parse, type-check, and code-gen the entirety of the 64-bit compileraEUR(TM)s source code.

  • The 32-bit linker can emit 64-bit binaries, assisted by LLVMaEUR(TM)s machine code generation facilities.

  • The 64-bit compiler binary is a completely functional Windows executable image.

  • This executable can run to completion on 64-bit Windows versions.

  • Inside the compiled binary is a table of string constants.

  • 64-bit Epoch code can load those strings and route them out to the command-line console.

  • A number of support DLL calls are involved in this process, including loading garbage collection metadata and stack tracing for identifying GC roots.

All told there are hundreds of thousands of lines of code involved. Building the 64-bit compiler takes about 164 seconds (just over two and a half minutes) when using debug versions of LLVM. (For comparison, the 32-bit compiler can self-host in under 20 seconds, but thataEUR(TM)s an unfair comparison because that build process uses optimized Release versions of LLVM.)

IaEUR(TM)m pretty pleased with this progress. There are still many things left to get working, though.

  • 64-bit globals do not work correctly; all of them are currently stuffed into a single random address which may or may not crash when dereferenced.

  • More support DLL calls need to be implemented or eliminated.

  • Certain code constructs do not work correctly yet; this is worked around for the time being by not using them in the compiler, but they will be good to get working as soon as is practical.

  • A large number of hacks and temporary shims exist in the linker. This will need to be cleaned up substantially before self-hosting is really practical.

  • Debug metadata and symbols are not generated correctly yet.

  • Visual Studio integration has a number of bugs, ranging from the pesky to the outright unusable.

  • It is exceedingly likely that there will be bugs in the compiler, meaning that 64-bit self-hosting is still a ways out even if the basics are operational.

Making the highly optimisic presumption that this will all happen soon, I think itaEUR(TM)s fair to say that once all of the above is addressed (and 64-bit self-hosting is complete) it will be time to cut another release of Epoch.

In all probability, though, IaEUR(TM)ll course-correct sometime between now and then, but it never hurts to have objectives!


Sign in to follow this  

1 Comment

Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!