Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: 32-64 bit switches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 32-64 bit switches



On Sunday, Jun 29, 2003, at 11:01 US/Eastern, Brian Barnes wrote:

Just a quick question that's been on my mind ... for a while we'll probably be dealing with 32-bit libraries in our shiny new 64-bit apps. Is there any kind of context switch in software or is it all handled transparently on the chip (not sure how that would work if it would be possible.)

The only switch is a bit in the MSR (machine state register), Read the PPC documentation for more info on this switch.
The main thing is that the registers are always 64bit (even in 32 bit mode). Only a few instructions are changed by this switch:
From PEM for 32bit PPC by Mot.:
8.1.4 Computation Modes
64-bit implementations
The mode controls how the effective address is interpreted, how condition bits are set,
and how the count register (CTR) is test by branch conditional instructions.

So all of the dot instructions are changed (but only for setting the condition bits)
and the instructions that set the carry bit are changed also (but only for changing the carry bit).
So these instructions are just ignore the top 32 and assume that the register is 32 bit wide when
setting either the carry bit or the condition bits.

I assume it's something very small (no where near going into a 68K emulator :) ) but just curious if any engineer wants to reveal this.

It is just a matter of going to supervisor mode and switching the bit.

Unlike most other 64/32 bit processors out there is no penalty for being in 32bit mode (unlike ia64).



Thanks,
Andrew Pinski
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.

References: 
 >32-64 bit switches (From: Brian Barnes <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.