1.1 --- a/src/share/vm/utilities/taskqueue.hpp Tue Jul 24 13:22:11 2018 +0800 1.2 +++ b/src/share/vm/utilities/taskqueue.hpp Tue Jul 24 14:29:09 2018 +0800 1.3 @@ -111,13 +111,13 @@ 1.4 // Internal type for indexing the queue; also used for the tag. 1.5 typedef NOT_LP64(uint16_t) LP64_ONLY(uint32_t) idx_t; 1.6 1.7 -#ifdef MIPS64 1.8 +#ifdef MIPS 1.9 private: 1.10 #endif 1.11 // The first free element after the last one pushed (mod N). 1.12 volatile uint _bottom; 1.13 1.14 -#ifdef MIPS64 1.15 +#ifdef MIPS 1.16 protected: 1.17 inline uint get_bottom() const { 1.18 return OrderAccess::load_acquire((volatile juint*)&_bottom); 1.19 @@ -136,7 +136,7 @@ 1.20 Age(const Age& age) { _data = age._data; } 1.21 Age(idx_t top, idx_t tag) { _fields._top = top; _fields._tag = tag; } 1.22 1.23 -#ifndef MIPS64 1.24 +#ifndef MIPS 1.25 Age get() const volatile { return _data; } 1.26 void set(Age age) volatile { _data = age._data; } 1.27 1.28 @@ -219,7 +219,7 @@ 1.29 1.30 // Return true if the TaskQueue contains/does not contain any tasks. 1.31 bool peek() const { 1.32 -#ifdef MIPS64 1.33 +#ifdef MIPS 1.34 return get_bottom() != _age.top(); 1.35 #else 1.36 return _bottom != _age.top(); 1.37 @@ -231,7 +231,7 @@ 1.38 // The "careful" version admits the possibility of pop_local/pop_global 1.39 // races. 1.40 uint size() const { 1.41 -#ifdef MIPS64 1.42 +#ifdef MIPS 1.43 return size(get_bottom(), _age.top()); 1.44 #else 1.45 return size(_bottom, _age.top()); 1.46 @@ -239,7 +239,7 @@ 1.47 } 1.48 1.49 uint dirty_size() const { 1.50 -#ifdef MIPS64 1.51 +#ifdef MIPS 1.52 return dirty_size(get_bottom(), _age.top()); 1.53 #else 1.54 return dirty_size(_bottom, _age.top()); 1.55 @@ -247,7 +247,7 @@ 1.56 } 1.57 1.58 void set_empty() { 1.59 -#ifdef MIPS64 1.60 +#ifdef MIPS 1.61 set_bottom(0); 1.62 #else 1.63 _bottom = 0; 1.64 @@ -303,7 +303,7 @@ 1.65 typedef typename TaskQueueSuper<N, F>::Age Age; 1.66 typedef typename TaskQueueSuper<N, F>::idx_t idx_t; 1.67 1.68 -#ifndef MIPS64 1.69 +#ifndef MIPS 1.70 using TaskQueueSuper<N, F>::_bottom; 1.71 #endif 1.72 using TaskQueueSuper<N, F>::_age; 1.73 @@ -369,7 +369,7 @@ 1.74 void GenericTaskQueue<E, F, N>::oops_do(OopClosure* f) { 1.75 // tty->print_cr("START OopTaskQueue::oops_do"); 1.76 uint iters = size(); 1.77 -#ifdef MIPS64 1.78 +#ifdef MIPS 1.79 uint index = this->get_bottom(); 1.80 #else 1.81 uint index = _bottom; 1.82 @@ -390,7 +390,7 @@ 1.83 bool GenericTaskQueue<E, F, N>::push_slow(E t, uint dirty_n_elems) { 1.84 if (dirty_n_elems == N - 1) { 1.85 // Actually means 0, so do the push. 1.86 -#ifdef MIPS64 1.87 +#ifdef MIPS 1.88 uint localBot = this->get_bottom(); 1.89 #else 1.90 uint localBot = _bottom; 1.91 @@ -401,7 +401,7 @@ 1.92 // assignment. However, casting to E& means that we trigger an 1.93 // unused-value warning. So, we cast the E& to void. 1.94 (void)const_cast<E&>(_elems[localBot] = t); 1.95 -#ifdef MIPS64 1.96 +#ifdef MIPS 1.97 this->set_bottom(increment_index(localBot)); 1.98 #else 1.99 OrderAccess::release_store(&_bottom, increment_index(localBot)); 1.100 @@ -460,7 +460,7 @@ 1.101 #if !(defined SPARC || defined IA32 || defined AMD64) 1.102 OrderAccess::fence(); 1.103 #endif 1.104 -#ifdef MIPS64 1.105 +#ifdef MIPS 1.106 uint localBot = this->get_bottom(); 1.107 #else 1.108 uint localBot = OrderAccess::load_acquire((volatile juint*)&_bottom); 1.109 @@ -719,7 +719,7 @@ 1.110 1.111 template<class E, MEMFLAGS F, unsigned int N> inline bool 1.112 GenericTaskQueue<E, F, N>::push(E t) { 1.113 -#ifdef MIPS64 1.114 +#ifdef MIPS 1.115 uint localBot = this->get_bottom(); 1.116 #else 1.117 uint localBot = _bottom; 1.118 @@ -735,7 +735,7 @@ 1.119 // assignment. However, casting to E& means that we trigger an 1.120 // unused-value warning. So, we cast the E& to void. 1.121 (void) const_cast<E&>(_elems[localBot] = t); 1.122 -#ifdef MIPS64 1.123 +#ifdef MIPS 1.124 this->set_bottom(increment_index(localBot)); 1.125 #else 1.126 OrderAccess::release_store(&_bottom, increment_index(localBot)); 1.127 @@ -749,7 +749,7 @@ 1.128 1.129 template<class E, MEMFLAGS F, unsigned int N> inline bool 1.130 GenericTaskQueue<E, F, N>::pop_local(volatile E& t) { 1.131 -#ifdef MIPS64 1.132 +#ifdef MIPS 1.133 uint localBot = this->get_bottom(); 1.134 #else 1.135 uint localBot = _bottom; 1.136 @@ -762,7 +762,7 @@ 1.137 assert(dirty_n_elems != N - 1, "Shouldn't be possible..."); 1.138 if (dirty_n_elems == 0) return false; 1.139 localBot = decrement_index(localBot); 1.140 -#ifdef MIPS64 1.141 +#ifdef MIPS 1.142 this->set_bottom(localBot); 1.143 #else 1.144 _bottom = localBot;