Rosetta & endianness

Discussion in 'Apple' started by Per Rønne, Apr 9, 2006.

  1. Per Rønne

    Per Rønne Guest

    Does anybody know how Apple has solved the endianness problem in
    Rosetta?

    <http://en.wikipedia.org/wiki/Endianness>

    Because the G4 processor can be used as both a big-endian and a
    little-endian processor, and the G5 only as a big-endian, VirtualPC
    emulating the little-ending Intel-processor runs slower on the G5 than
    on the G4.

    But this should mean that Rosetta running non-Universal MacOS X programs
    would have to emulate big-endianness on a little-endian processor -
    giving the same problems as known from VirtualPC 7 on G5.

    When I google on it I see that some people think that the MacOS X API
    calls are done natively, and that this should make the differenc. But
    does anybody know how Rosetta works?
     
    Per Rønne, Apr 9, 2006
    #1
    1. Advertisements

  2. Per Rønne

    Hans Aberg Guest

    Apparently, it reverses the PPC big endian into the Intel little endian.
     
    Hans Aberg, Apr 9, 2006
    #2
    1. Advertisements

  3. Per Rønne

    Per Rønne Guest

    Does that mean that it changes the stored code, or that it interpretes
    it just like VirtualPC for Mac?
     
    Per Rønne, Apr 9, 2006
    #3
  4. Per Rønne

    Hans Aberg Guest

    I think Rosetta (though I do not know for sure) is an emulator that does
    it on the fly (i.e., it interprets). But an emulator can of course become
    more efficient by caching the converted stuff. So the original interpreted
    code should be unchanged on the disk. Anything else would be risky, asking
    for trouble.
     
    Hans Aberg, Apr 9, 2006
    #4
  5. Per Rønne

    Per Rønne Guest

    Yes, though system calls might be run natively.
     
    Per Rønne, Apr 9, 2006
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.