--- cvs-rw/xc/config/cf/sun.cf Thu Aug 19 09:28:42 2004 +++ s10sparc/xc/config/cf/sun.cf Sat Dec 18 01:26:54 2004 @@ -240,6 +240,9 @@ # endif # endif #else +# if HasSunC +# define CompilerServerExtraDefines $(XF86SRC)/os-support/sunos/sparcv8plus.il +# endif # define HasPlugin YES #endif --- cvs-rw/xc/programs/Xserver/hw/xfree86/os-support/sunos/Imakefile 2004-12-17 09:45:07.222245000 -0800 +++ s10sparc/xc/programs/Xserver/hw/xfree86/os-support/sunos/Imakefile 2004-12-18 01:24:48.640144000 -0800 @@ -32,16 +32,29 @@ #include -#if !HasGcc && defined(i386Architecture) -#if HasSunC -PROWORKS_INOUT_SRC = solaris-ia32.S -PROWORKS_INOUT_OBJ = solaris-ia32.o +#if !HasGcc +# if HasSunC +# ifdef i386Architecture +# define AsmArch ia32 +# define AsmFlags /**/ +# else +# define AsmArch sparcv8plus +# define AsmFlags -xarch=v8plus +# endif +PROWORKS_ASM_ARCH = AsmArch +PROWORKS_ASM_FLAGS = AsmFlags +PROWORKS_INOUT_SRC = solaris-$(PROWORKS_ASM_ARCH).S +PROWORKS_INOUT_OBJ = solaris-$(PROWORKS_ASM_ARCH).o + +all:: $(PROWORKS_ASM_ARCH).il +includes:: $(PROWORKS_ASM_ARCH).il -includes:: ia32.il +CppFileTarget($(PROWORKS_ASM_ARCH).il,solaris-$(PROWORKS_ASM_ARCH).S,-DINLINE_ASM,NullParameter) -CppFileTarget(ia32.il,solaris-ia32.S,-DINLINE_ASM,NullParameter) -ObjectFromAsmSource(solaris-ia32,NullParameter) -#else +$(PROWORKS_INOUT_OBJ): $(PROWORKS_INOUT_SRC) + $(AS) -P -o $@ $(PROWORKS_ASM_FLAGS) $(PROWORKS_INOUT_SRC) + +#elif defined(i386Architecture) PROWORKS_INOUT_SRC = sun_inout.s PROWORKS_INOUT_OBJ = sun_inout.o #endif --- cvs-rw/xc/programs/Xserver/hw/xfree86/os-support/sunos/solaris-sparcv8plus.S 1969-12-31 16:00:00.000000000 -0800 +++ s10sparc/xc/programs/Xserver/hw/xfree86/os-support/sunos/solaris-sparcv8plus.S 2004-12-18 01:19:20.744286000 -0800 @@ -0,0 +1,144 @@ +/* Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ + +#ifdef INLINE_ASM +#define FUNCTION_START(f,n) .inline f,n +#define FUNCTION_END(f) .end +#else +#define _ASM +#include +#define FUNCTION_START(f,n) ENTRY(f) +#define FUNCTION_END(f) SET_SIZE(f) +#endif + +/* Converted from common/compiler.h gcc inline format to Sun cc inline + * format by Kenjiro Tsuji + * + * The value 0x88 means ASI_PRIMARY_LITTLE. + * The store or load to/from the address space will be done + * as little-endian. In the original xrog code, the value + * is defined as the macro ASI_PL. + * + * In the original xorg code, "membar #StoreStore|#StoreLoad" + * is directly implemented as an instruction "0x8143e00a". + * + */ + + FUNCTION_START(outb, 0) + stba %o1, [%o0] 0x88 + membar #StoreStore|#StoreLoad + FUNCTION_END(outb) + + FUNCTION_START(outw, 0) + stha %o1, [%o0] 0x88 + membar #StoreStore|#StoreLoad + FUNCTION_END(outw) + + FUNCTION_START(outl, 0) + sta %o1, [%o0] 0x88 + membar #StoreStore|#StoreLoad + FUNCTION_END(outl) + + FUNCTION_START(inb, 0) + lduba [%o0] 0x88, %o0 + FUNCTION_END(inb) + + FUNCTION_START(inw, 0) + lduha [%o0] 0x88, %o0 + FUNCTION_END(inw) + + FUNCTION_START(inl, 0) + lda [%o0] 0x88, %o0 + FUNCTION_END(inl) + + FUNCTION_START(xf86ReadMmio8, 0) + lduba [%o0 + %o1] 0x88, %o0 + FUNCTION_END(xf86ReadMmio8) + + FUNCTION_START(xf86ReadMmio16Be, 0) + lduh [%o0 + %o1], %o0 + FUNCTION_END(xf86ReadMmio16Be) + + FUNCTION_START(xf86ReadMmio16Le, 0) + lduha [%o0 + %o1] 0x88, %o0 + FUNCTION_END(xf86ReadMmio16Le) + + FUNCTION_START(xf86ReadMmio32Be, 0) + ld [%o0 + %o1], %o0 + FUNCTION_END(xf86ReadMmio32Be) + + FUNCTION_START(xf86ReadMmio32Le, 0) + lda [%o0 + %o1] 0x88, %o0 + FUNCTION_END(xf86ReadMmio32Le) + + FUNCTION_START(xf86WriteMmio8, 0) + stba %o2, [%o0 + %o1] 0x88 + membar #StoreStore|#StoreLoad + FUNCTION_END(xf86WriteMmio8) + + FUNCTION_START(xf86WriteMmio16Be, 0) + sth %o2, [%o0 + %o1] + membar #StoreStore|#StoreLoad + FUNCTION_END(xf86WriteMmio16Be) + + FUNCTION_START(xf86WriteMmio16Le, 0) + stha %o2, [%o0 + %o1] 0x88 + membar #StoreStore|#StoreLoad + FUNCTION_END(xf86WriteMmio16Le) + + FUNCTION_START(xf86WriteMmio32Be, 0) + st %o2, [%o0 + %o1] + membar #StoreStore|#StoreLoad + FUNCTION_END(xf86WriteMmio32Be) + + FUNCTION_START(xf86WriteMmio32Le, 0) + sta %o2, [%o0 + %o1] 0x88 + membar #StoreStore|#StoreLoad + FUNCTION_END(xf86WriteMmio32Le) + + FUNCTION_START(xf86WriteMmio8NB, 0) + add %o0, %o1, %o0 + stba %o2, [%o0] 0x88 + FUNCTION_END(xf86WriteMmio8NB) + + FUNCTION_START(xf86WriteMmio16BeNB, 0) + sth %o2, [%o0 + %o1] + FUNCTION_END(xf86WriteMmio16BeNB) + + FUNCTION_START(xf86WriteMmio16LeNB, 0) + stha %o2, [%o0 + %o1] 0x88 + FUNCTION_END(xf86WriteMmio16LeNB) + + FUNCTION_START(xf86WriteMmio32BeNB, 0) + st %o2, [%o0 + %o1] + FUNCTION_END(xf86WriteMmio32BeNB) + + FUNCTION_START(xf86WriteMmio32LeNB, 0) + sta %o2, [%o0 + %o1] 0x88 + FUNCTION_END(xf86WriteMmio32LeNB) +