Tue, 26 Jul 2016 17:06:17 +0800
Add multiply word to GPR instruction (mul) in MIPS assembler.
1 /*
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2015, 2016, Loongson Technology. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
26 #ifndef CPU_MIPS_VM_GLOBALS_MIPS_HPP
27 #define CPU_MIPS_VM_GLOBALS_MIPS_HPP
29 #include "utilities/globalDefinitions.hpp"
30 #include "utilities/macros.hpp"
32 //
33 // Sets the default values for platform dependent flags used by the runtime system.
34 // (see globals.hpp)
35 //
36 #ifdef CORE
37 define_pd_global(bool, UseSSE, 0);
38 #endif /* CORE */
39 define_pd_global(bool, ConvertSleepToYield, true);
40 define_pd_global(bool, ShareVtableStubs, true);
41 define_pd_global(bool, CountInterpCalls, true);
43 define_pd_global(bool, ImplicitNullChecks, true); // Generate code for implicit null checks
44 define_pd_global(bool, TrapBasedNullChecks, false); // Not needed on x86.
45 define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap NULLs passed to check cast
46 define_pd_global(bool, NeedsDeoptSuspend, false); // only register window machines need this
48 // See 4827828 for this change. There is no globals_core_i486.hpp. I can't
49 // assign a different value for C2 without touching a number of files. Use
50 // #ifdef to minimize the change as it's late in Mantis. -- FIXME.
51 // c1 doesn't have this problem because the fix to 4858033 assures us
52 // the the vep is aligned at CodeEntryAlignment whereas c2 only aligns
53 // the uep and the vep doesn't get real alignment but just slops on by
54 // only assured that the entry instruction meets the 5 byte size requirement.
55 define_pd_global(intx, CodeEntryAlignment, 32);
56 define_pd_global(intx, OptoLoopAlignment, 16);
57 define_pd_global(intx, InlineFrequencyCount, 100);
58 define_pd_global(intx, InlineSmallCode, 4000); // 2016/5/11 Jin: MIPS generates 3x instructions than X86
60 define_pd_global(uintx, TLABSize, 0);
61 define_pd_global(uintx, NewSize, 1024 * K);
62 define_pd_global(intx, PreInflateSpin, 10);
64 define_pd_global(intx, PrefetchCopyIntervalInBytes, -1);
65 define_pd_global(intx, PrefetchScanIntervalInBytes, -1);
66 define_pd_global(intx, PrefetchFieldsAhead, -1);
68 define_pd_global(intx, StackYellowPages, 2);
69 define_pd_global(intx, StackRedPages, 1);
70 define_pd_global(intx, StackShadowPages, 3 DEBUG_ONLY(+1));
72 define_pd_global(bool, RewriteBytecodes, true);
73 define_pd_global(bool, RewriteFrequentPairs, true);
74 #ifdef _ALLBSD_SOURCE
75 define_pd_global(bool, UseMembar, true);
76 #else
77 define_pd_global(bool, UseMembar, false);
78 #endif
79 // GC Ergo Flags
80 define_pd_global(intx, CMSYoungGenPerWorker, 64*M); // default max size of CMS young gen, per GC worker thread
82 define_pd_global(uintx, TypeProfileLevel, 111);
84 // Only c2 cares about this at the moment
85 define_pd_global(intx, AllocatePrefetchStyle, 2);
86 define_pd_global(intx, AllocatePrefetchDistance, -1);
88 #define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct) \
89 \
90 develop(bool, IEEEPrecision, true, \
91 "Enables IEEE precision (for INTEL only)") \
92 \
93 product(intx, FenceInstruction, 0, \
94 "(Unsafe,Unstable) Experimental") \
95 \
96 product(intx, ReadPrefetchInstr, 0, \
97 "Prefetch instruction to prefetch ahead") \
98 \
99 product(bool, UseStoreImmI16, true, \
100 "Use store immediate 16-bits value instruction on x86") \
101 \
102 product(intx, UseAVX, 99, \
103 "Highest supported AVX instructions set on x86/x64") \
104 \
105 diagnostic(bool, UseIncDec, true, \
106 "Use INC, DEC instructions on x86") \
107 \
108 product(bool, UseNewLongLShift, false, \
109 "Use optimized bitwise shift left") \
110 \
111 product(bool, UseAddressNop, false, \
112 "Use '0F 1F [addr]' NOP instructions on x86 cpus") \
113 \
114 product(bool, UseXmmLoadAndClearUpper, true, \
115 "Load low part of XMM register and clear upper part") \
116 \
117 product(bool, UseXmmRegToRegMoveAll, false, \
118 "Copy all XMM register bits when moving value between registers") \
119 \
120 product(bool, UseXmmI2D, false, \
121 "Use SSE2 CVTDQ2PD instruction to convert Integer to Double") \
122 \
123 product(bool, UseXmmI2F, false, \
124 "Use SSE2 CVTDQ2PS instruction to convert Integer to Float") \
125 \
126 product(bool, UseUnalignedLoadStores, false, \
127 "Use SSE2 MOVDQU instruction for Arraycopy") \
128 \
129 /* assembler */ \
130 product(bool, Use486InstrsOnly, false, \
131 "Use 80486 Compliant instruction subset") \
132 \
133 product(bool, UseCountLeadingZerosInstruction, false, \
134 "Use count leading zeros instruction") \
135 \
136 /* 2014/04/22 Fu: Added to improve the startup performance */ \
137 product(intx, MaxCompileQueueSize, 64, \
138 "The maximum size of compile queue") \
139 \
140 /* 2014/07/07 Fu: Added to implement the size-and-speed scheduling */ \
141 product(intx, FactorOfSizeScheduling, 90, \
142 "The impact factor of size in the size-and-speed scheduling") \
143 \
144 product(intx, MinWatchTime, 800, \
145 "The min time to determine whether to remove a task in queue") \
146 \
147 product(intx, MinUpdateTime, 5, \
148 "The min time to update the speed of a method") \
149 \
150 /* Use Restricted Transactional Memory for lock eliding */ \
151 experimental(bool, UseRTMLocking, false, \
152 "Enable RTM lock eliding for inflated locks in compiled code") \
153 \
154 experimental(bool, UseRTMForStackLocks, false, \
155 "Enable RTM lock eliding for stack locks in compiled code") \
156 \
157 experimental(bool, UseRTMDeopt, false, \
158 "Perform deopt and recompilation based on RTM abort ratio") \
159 \
160 experimental(uintx, RTMRetryCount, 5, \
161 "Number of RTM retries on lock abort or busy") \
162 \
163 experimental(intx, RTMSpinLoopCount, 100, \
164 "Spin count for lock to become free before RTM retry") \
165 \
166 experimental(intx, RTMAbortThreshold, 1000, \
167 "Calculate abort ratio after this number of aborts") \
168 \
169 experimental(intx, RTMLockingThreshold, 10000, \
170 "Lock count at which to do RTM lock eliding without " \
171 "abort ratio calculation") \
172 \
173 experimental(intx, RTMAbortRatio, 50, \
174 "Lock abort ratio at which to stop use RTM lock eliding") \
175 \
176 experimental(intx, RTMTotalCountIncrRate, 64, \
177 "Increment total RTM attempted lock count once every n times") \
178 \
179 experimental(intx, RTMLockingCalculationDelay, 0, \
180 "Number of milliseconds to wait before start calculating aborts " \
181 "for RTM locking") \
182 \
183 experimental(bool, UseRTMXendForLockBusy, true, \
184 "Use RTM Xend instead of Xabort when lock busy") \
185 \
186 product(intx, MaxUpdateTime, 80, \
187 "The max time to update the speed of a method") \
188 \
189 product(intx, InvocationOldThreshold, 12000, \
190 "The invocation counter threshold for an old method") \
191 \
192 product(intx, LoopOldThreshold, 20000, \
193 "The backedge counter threshold for an old method") \
194 \
195 product(bool, UseCountTrailingZerosInstruction, false, \
196 "Use count trailing zeros instruction") \
197 \
198 product(bool, UseBMI1Instructions, false, \
199 "Use BMI instructions")
201 #endif // CPU_MIPS_VM_GLOBALS_MIPS_HPP