From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NF9YX-0004WF-Cj for qemu-devel@nongnu.org; Mon, 30 Nov 2009 11:56:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NF9YR-0004UK-3d for qemu-devel@nongnu.org; Mon, 30 Nov 2009 11:56:56 -0500 Received: from [199.232.76.173] (port=47107 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF9YP-0004UC-G6 for qemu-devel@nongnu.org; Mon, 30 Nov 2009 11:56:49 -0500 Received: from mail-yx0-f188.google.com ([209.85.210.188]:51394) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NF9YP-0000Hc-0h for qemu-devel@nongnu.org; Mon, 30 Nov 2009 11:56:49 -0500 Received: by yxe26 with SMTP id 26so3195312yxe.4 for ; Mon, 30 Nov 2009 08:56:48 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <05379AA9-7848-4BFE-BA2D-D2B4799A0099@web.de> <31AD0DD4-C9DD-4E2D-B170-DD5509F856B3@web.de> From: Blue Swirl Date: Mon, 30 Nov 2009 18:56:17 +0200 Message-ID: Subject: Re: [Qemu-devel] PATCH: Building qemu on OpenSolaris 2009.06 (SPARC) host Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Palle Lyckegaard Cc: =?UTF-8?Q?Andreas_F=C3=A4rber?= , qemu-devel@nongnu.org On Sun, Nov 29, 2009 at 10:09 PM, Palle Lyckegaard wr= ote: > On Sun, 29 Nov 2009, Andreas F=C3=A4rber wrote: > >> I.e. if unavoidable, instead of #define PSR_XXX 123 one might need to >> #define TARGET_PSR_XXX 123 and change *all* uses of PSR_XXX to >> TARGET_PSR_XXX, so that Sun's and QEMU's definitions can live side by si= de. >> If your approach or #undef works correctly, that would seem less intrusi= ve, >> therefore my question. >> > > So far I've located only the definitions FSR_FCC1 and FPSR_FEF as being > differently defined in qemu and OpenSolaris SPARC. > > In order to be as little intrusive as possible I will rework my patch for > the cpu.h file so > - where the definitions in qemu and Solaris are equal: guard with an "if > !defined(CONFIG_SOLARIS)" > - where the definitions in qemu and Solaris are not equal: add a TARGET_ > prefix to the definitions It's cleaner just to rename. PSR_* are also used for Sparc64 %xcc and %icc, so ICC_ or something similar would be better.