Linked by Thom Holwerda on Tue 8th Jan 2013 23:27 UTC
Windows So, a rudimentary jailbreak for Windows RT made its way onto the web these past few days. Open source applications were ported right away, and it was confirmed that Windows RT is the full Windows - it's exactly the same as regular Windows, except that it runs on ARM. Microsoft responded to the jailbreak as well.
Thread beginning with comment 548244
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[8]: x86
by viton on Thu 10th Jan 2013 22:11 UTC in reply to "RE[7]: x86"
viton
Member since:
2005-08-09

if I feel particularly hacky maybe even convert the x86 opcodes into C code and call the compiler that way.

It is safe to assume that code in question is already optimized.
So it should be enough to just move ARM instructions (according to target CPU issue possibilities) up to nearest branch entry point.
Modern OoO ARMs will do the rest for you.

Reply Parent Score: 2

RE[9]: x86
by Alfman on Thu 10th Jan 2013 23:34 in reply to "RE[8]: x86"
Alfman Member since:
2011-01-28

viton,

"It is safe to assume that code in question is already optimized."

It's optimized for x86, not necessarily for ARM.

"So it should be enough to just move ARM instructions (according to target CPU issue possibilities) up to nearest branch entry point. Modern OoO ARMs will do the rest for you."


If the instruction sets were 1:1 then the translation would be trivial. But the trouble is that x86 flags & registers are very unique to that architecture. Also ARM has conditional instructions, the optimal code path could be very dissimilar to x86's which needs alot more jumps. Even different processors in the x86 family can have different optimal code paths.

Maybe a direct translation is good enough for some applications, but it would be like compiling a binary with no optimization for the target processor.

Reply Parent Score: 3

RE[10]: x86
by viton on Fri 11th Jan 2013 03:15 in reply to "RE[9]: x86"
viton Member since:
2005-08-09

It's optimized for x86, not necessarily for ARM.

It hardly does matter for quick and dirty Jit translator.
Translation overhead is worse than small inefficiencies in code.

But the trouble is that x86 flags & registers are very unique to that architecture

That is not exposed to C or any language above asm.
Check some executables. Usually only basic flags are used.

Also ARM has conditional instructions, the optimal code path could be very dissimilar to x86's which needs alot more jumps.


Do not confuse modern OoO ARMs with old in-order ones.
Conditional execution is actually bad for OoO engine, as it is adding unwanted dependency between instructions. I heard some rumors that cortex-A9 replaces CE with branches internally.

Maybe a direct translation is good enough for some applications, but it would be like compiling a binary with no optimization for the target processor.


You don't get it. Nobody cares about such a small inefficiencies.
And It has already been done. There is an app that does static binary translation of Windows games for Android. (Winulator)

Reply Parent Score: 2