Saturday, December 06, 2008

Compiling Java for the Propeller

My spare time is pretty limited these days -- work takes up a lot of it. On the up-side, I got promoted.

Over the past few months, some of my spare time has been spent designing a Java compiler that targets the Parallax Propeller. A few hand-coded mockups have convinced me that it's feasible -- the only thing between that and making it a reality are the past 50 years of compiler research, which I never learned. :-)

So, I've spent time surfing Citeseer and gathering data. Between what I've learned and my Propeller experience, I've set some parameters for the first version: it will compile to Large Memory Model code rather than a custom interpreter, and will consume Java class files.

As of this evening I've got a prototype working, and have compiled/assembled/uploaded my first binary. The bullet points are as follows:

Performs register allocation in SSA form, using a crippled-but-developing version of Pereira's algorithm. I've modified it to deal more gracefully with the Propeller's CISC-like two-address architecture.

The "call #prim_foo" instructions are calls to LMM kernel traps; plenty of other people have explained Propeller LMM in detail elsewhere, I won't repeat it. My code generator inlines LMM primitives in some cases, as it's done with jump here.

Some details of the calling conventions are apparent in the output: incoming arguments start at r0, and the returned value comes back in r0. These registers are real-live Propeller registers inside the LMM kernel, and I suspect I'll have room for a lot of them -- 32 or more -- so I'm using a RISC-like register calling convention, with link register.

Some details of the business conventions area unit apparent within the output: incoming arguments begin at r0, and also the came back price comes back in r0. These registers area unit real-live propellor registers within the LMM kernel, and that i suspect i will have space for loads of them Best executive search firms.

All the latest updates from the Python Automationminds team. Python Automationminds lets you program in Python, in your browser. No need to install any software, just start coding straight away. There's a fully-functional web-based console and a programmer's text-editorPhyton training in Chennai

About

A blog for my tech rants. My rants, suggestions, ideas, and general pedantry here are representative solely of this geek-at-arms, and not my employer, affiliated civic service organizations, deceased ancestors, or people whose names rhyme with my own.

About Me

Name:Cliff Biffle

Location:Mountain View, California, United States

I'm a Java developer for a large unspecified company, aficionado of programming languages, and general Mac bigot.
Contrary to what you may have read on the intarweb, I am not, in fact, a "Linux stalwart."