The University of Queensland Homepage
School of ITEE ITEE Main Website

 Rosetta Secrets Revealed
1 April 2006
by Philip Machanick
Contributing Columnist

One of the big puzzles of the Intel transition is how Intel has managed to produce a processor as fast as a PowerPC G5 at the same clock speed while Apple has managed to, in a relatively short time, produce a software translator which is able to produce surprisingly good results, given the vast difference between the two architectures.

To recap, many knowledgeable commentators previously thought that a PowerPC translator for Intel would be very hard, because the Intel processor has many fewer registers than the PowerPC, and uses the opposite byte ordering. The Intel uses little-endian byte ordering, whereas PowerPC uses big-endian byte ordering, which means a large fraction of data which is processed is in the wrong order in emulation mode.

Today, as a result of some indiscretions of Intel engineers and managers at a conference (or rather drinks after the conference), I can reveal how this extraordinary accomplishment was possible. I won’t reveal exactly how I found this all out, so I can do it again. But (sorry guys) I will have to name names to make this credible. If you don’t want to get fired, you shouldn’t drink so much.

Anyway, here’s the scoop.

The big, dirty secret is that the new Core Duo and Solo Intels actually run the PowerPC instruction set at the low level.

You heard me right.

As followers of computer architecture will know, earlier Intel designs cracked instructions into simpler instructions, easier for the hardware to process.

An Intel engineer, R. Underdunk Terwilliger, suddenly realized that “simpler instructions, easier for the hardware to process” was what the RISC movement was about. So he experimented with what he called “sideshow technology”, in which these “simpler instructions, easier for the hardware to process” were – wait for it – PowerPC instructions with one small modification – everything was in little endian mode, to make things simpler for hardware conversion between the formats. That had surprisingly good results, to the extent that Intel management was sold on the idea. At that point, of course, the obvious thing to do would have been to change some details so as not to violate IBM’s rights. But Intel executive C.M. Burns had a brilliant inspiration. What if Apple adopted this Intel architecture? As an interim step, they could do a few simple transformations to PowerPC code, with hardware support, to swap byte ordering. The beauty of the approach is that IBM would not dare expose Intel because that would mean admitting that Intel could make a much faster PowerPC core than they could. You should have heard this guy saying “excellent” after every sentence when he told his story to a large cognac.

Over, then to chief Apple Liaison engineer, H. Jay Simpson, whose task it was to create a fake software layer (code-named “nuclear safety”), which would trigger the necessary byte swapping and enabling of secret modes to execute PowerPC instructions, complete with an obfuscation layer making it look to anyone running a debugger as if Intel instructions were being executed. Simpson’s main job was to slow down the Rosetta layer enough so it would look credible. This I could believe seeing this guy putting his beers away.

How long did Intel think they could get away with this? Probably not long. But they wouldn’t have to. As each generation became faster than old PowerPC Macs, the Rosetta layer could increasingly become what it was supposed to be, and the “simpler instructions, easier for the hardware to process” could be made increasingly different from the PowerPC instruction set.

Over his third Manhattan, Burns’s assistant Waylon Smithers was heard to say, “You’ve outdone yourself this time.” I saw Simpson leaning blearily over him. Smithers slapped him away. “Not you! Mr Burns.”

Whose job was it to cover all this up? Intel sleight of hand man Herschel Krustofski, aided by Intel Chief Council Lionel Hutz. That’s where the wheels started to come off. I’m not sure what Hutz was drinking, but whatever it was, it had interesting effects. He offered to repair my shoes, with nails sticking out of his mouth to prove he could do it, before going off on an incoherent tirade about “law stuff”. And: “How do these clowns expect me to do anything against those real lawyers?” That’s when I started paying attention to what the others were saying. And sneaked into the inner circle without being noticed.

You should have seen the lot of them sober up when they realized they had company.

I had to join some costume-party secret society of theirs called the Stonecutters because I was in on the big secret. Lucky I’m not superstitious. So here is the whole story. I’ll sell the outfit on eBay.