> PPC's a different animal, using 32bit instructions even when in a
> "64bit mode" (doesn't really have modes), some immediate memory loads
> can use up to 5 instructions in assembly... I didn't look much deeper
> than that.

there can be a 64-bit vs 32-bit mode on powerpc64, but it's a `bridge' mode
that is just there to be nice to lazy system writers, and might go away.

once 64-bit mode is on, most arithmetic operations become 64 bit (the same 
codes that were 32-bit in 32 bit mode).
there are a few exceptions (for instance, multiply and divide have both 64 and 
32-bit variants).
64-bit load and store are also available, and there are some new fancy 64-bit 
versions of rotate mask/insert.

the main difference with amd64 is that large constants (including large static 
addresses)
must be generated in-line by several instructions (typically 16 bits at a time),
or loaded from a literal pool (which might need an address calculation because 
the offsets are limited to +/-32k).
that's true even for 32-bit values in 32 bit mode, but because of the larger 
register size,
different instruction sequences are needed.

i think amd64 has a choice of putting a 32-bit value in-line with sign 
extension to
64 bits, or giving a full 64-bit value in-line.  i'm surprised that would make 
a big difference.
possibly the memory subsystem on amd64 is better than the ppc64 you were using.
ppc64 on a memory subsystem designed for ppc32 could be sad.

Reply via email to