On Sun, Nov 29, 2009 at 10:09 PM, Palle Lyckegaard <pa...@lyckegaard.dk> wrote: > On Sun, 29 Nov 2009, Andreas Färber 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 side. >> If your approach or #undef works correctly, that would seem less intrusive, >> 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.