From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] Current status of amd64 port? From: Charles Forsyth Date: Fri, 16 Nov 2007 15:53:22 +0000 In-Reply-To: <3e1162e60711160733p152bbbd5qbf29e1d52de650f4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: fd52ed6e-ead2-11e9-9d60-3106f5b1d025 > 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.