From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27069 invoked by alias); 9 Mar 2005 02:11:37 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 26830 invoked from network); 9 Mar 2005 02:11:23 -0000 Received: from unknown (HELO modra.org) (144.136.221.26) by sourceware.org with SMTP; 9 Mar 2005 02:11:23 -0000 Received: by bubble.modra.org (Postfix, from userid 500) id C2DEF172F1C; Wed, 9 Mar 2005 12:41:18 +1030 (CST) Date: Wed, 09 Mar 2005 02:11:00 -0000 From: Alan Modra To: Jeff Baker Cc: binutils@sourceware.org Subject: Re: [PATCH] Handle mtsprg and mfsprg properly for BookE Message-ID: <20050309021118.GJ15642@bubble.modra.org> Mail-Followup-To: Jeff Baker , binutils@sourceware.org References: <20050308235119.GG15642@bubble.modra.org> <422E4F55.2060904@qnx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <422E4F55.2060904@qnx.com> User-Agent: Mutt/1.4i X-SW-Source: 2005-03/txt/msg00253.txt.bz2 On Tue, Mar 08, 2005 at 08:20:21PM -0500, Jeff Baker wrote: > Would it be correct to change the generic PPC_OPCODE_BOOKE case to > always use user mode sprg2+ and then override it to be sprg3+ for > PPC_OPCODE_403 and PPC_OPCODE_440? Should there be a version of mtsprg3 > for e500 and MPC8560 that encodes 259 instead of 275? That's what _you_ need to research. If you can decide on the correct mapping of sprg number to spr number for a given processor, and defend your mapping against potential criticism, I'm more than happy to help correct an implementation. Hmm, looking over your patch again, I suppose you could simply say that your mapping of sprg number to spr number matches the existing gas opcodes. ie. "mfsprg 0,4" generates the same as "mfsprg4 0" and so on. Enumerate all the possibilities in an addition to the testsuite, and you've made that obvious. If you fix the formatting, correct the error messages, and extend the testsuite this way I'll accept the patch. I'll also still be worried that gas isn't generating the right opcodes, but I suppose that's another issue.. -- Alan Modra IBM OzLabs - Linux Technology Centre