Author: marius
Date: Tue Dec 21 22:03:12 2010
New Revision: 216628
URL: http://svn.freebsd.org/changeset/base/216628

Log:
  Extend the hack of r182730 to trick GAS/GCC into compiling access to
  STICK/STICK_COMPARE independently of the selected instruction set by
  TICK_COMPARE so tick.c as of r214358 once again can be compiled with
  gcc -mcpu=v9 for reference purposes.

Modified:
  head/sys/sparc64/include/cpufunc.h
  head/sys/sparc64/sparc64/tick.c

Modified: head/sys/sparc64/include/cpufunc.h
==============================================================================
--- head/sys/sparc64/include/cpufunc.h  Tue Dec 21 22:01:26 2010        
(r216627)
+++ head/sys/sparc64/include/cpufunc.h  Tue Dec 21 22:03:12 2010        
(r216628)
@@ -174,11 +174,13 @@ int fasword32(u_long asi, void *addr, ui
 } while (0)
 
 /*
- * Trick GAS/GCC into compiling access to STICK/STICK_COMPARE independently
+ * Trick GAS/GCC into compiling access to TICK/(S)TICK_COMPARE independently
  * of the selected instruction set.
  */
+#define        rdtickcmpr()            rd(asr23)
 #define        rdstick()               rd(asr24)
 #define        rdstickcmpr()           rd(asr25)
+#define        wrtickcmpr(val, xor)    wr(asr23, (val), (xor))
 #define        wrstick(val, xor)       wr(asr24, (val), (xor))
 #define        wrstickcmpr(val, xor)   wr(asr25, (val), (xor))
 
@@ -191,7 +193,7 @@ int fasword32(u_long asi, void *addr, ui
  * aligned to a quadword boundary in order to ensure that I$ misses won't
  * split them up.
  */
-#define        wrtickcmpr(val, xor) ({                                         
\
+#define        wrtickcmpr_bbwar(val, xor) ({                                   
\
        __asm __volatile(                                               \
        "       ba,pt   %%xcc, 1f ;             "                       \
        "        nop     ;                      "                       \

Modified: head/sys/sparc64/sparc64/tick.c
==============================================================================
--- head/sys/sparc64/sparc64/tick.c     Tue Dec 21 22:01:26 2010        
(r216627)
+++ head/sys/sparc64/sparc64/tick.c     Tue Dec 21 22:03:12 2010        
(r216628)
@@ -132,14 +132,14 @@ static void
 tick_wr_cmpr(uint64_t tick_cmpr)
 {
 
-       wr(tick_cmpr, tick_cmpr, 0);
+       wrtickcmpr(tick_cmpr, 0);
 }
 
 static void
 tick_wr_cmpr_bbwar(uint64_t tick_cmpr)
 {
 
-       wrtickcmpr(tick_cmpr, 0);
+       wrtickcmpr_bbwar(tick_cmpr, 0);
 }
 
 static uint64_t
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to