From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3e1162e60711160821p5a17966s72808ca60df21c65@mail.gmail.com> Date: Fri, 16 Nov 2007 08:21:06 -0800 From: "David Leimbach" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] Current status of amd64 port? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3e1162e60711160733p152bbbd5qbf29e1d52de650f4@mail.gmail.com> Topicbox-Message-UUID: fd58696a-ead2-11e9-9d60-3106f5b1d025 On Nov 16, 2007 7:53 AM, Charles Forsyth wrote: > > 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. Yep, that's how OS X pretty much works. Kernel is 32bit, they have this DART chip on the motherboard to help with the mappings. > 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. > The G5 I was using had 128bit cache lines and basically behaved poorly if you don't move through memory linearly. (if it was in cache, things were pretty good, out of cache, you may as well forget about it). Kind of blows data structures that we're used to using into the "poorly performing" category. People often saw a 10% performance degradation moving from 32bit to 64bit mode on G5. Dave