1 /*
   2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
   4  * Copyright (c) 2015, Linaro Ltd. All rights reserved.
   5  * Copyright (c) 2015-2018, Azul Systems, Inc. All rights reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  23  * or visit www.oracle.com if you need additional information or have any
  24  * questions.
  25  *
  26  */
  27 
  28 #ifndef CPU_AARCH32_VM_GLOBALS_AARCH32_HPP
  29 #define CPU_AARCH32_VM_GLOBALS_AARCH32_HPP
  30 
  31 #include "utilities/globalDefinitions.hpp"
  32 #include "utilities/macros.hpp"
  33 
  34 // Sets the default values for platform dependent flags used by the runtime system.
  35 // (see globals.hpp)
  36 
  37 define_pd_global(bool, ShareVtableStubs,         true);
  38 define_pd_global(bool, NeedsDeoptSuspend,       false); // only register window machines need this
  39 
  40 define_pd_global(bool, ImplicitNullChecks,       true);  // Generate code for implicit null checks
  41 define_pd_global(bool, TrapBasedNullChecks,     false);
  42 define_pd_global(bool, UncommonNullCast,         true);  // Uncommon-trap NULLs past to check cast
  43 
  44 //TODO: update if 32 bit platforms need different sizes
  45 define_pd_global(uintx, CodeCacheSegmentSize,    64 TIERED_ONLY(+64)); // Tiered compilation has large code-entry alignment.
  46 define_pd_global(intx, CodeEntryAlignment,       32);
  47 define_pd_global(intx, OptoLoopAlignment,        16);
  48 define_pd_global(intx, InlineFrequencyCount,     100);
  49 
  50 #define DEFAULT_STACK_YELLOW_PAGES (2)
  51 #define DEFAULT_STACK_RED_PAGES (1)
  52 #define DEFAULT_STACK_SHADOW_PAGES (5 DEBUG_ONLY(+1))
  53 #define DEFAULT_STACK_RESERVED_PAGES (1)
  54 
  55 #define MIN_STACK_YELLOW_PAGES DEFAULT_STACK_YELLOW_PAGES
  56 #define MIN_STACK_RED_PAGES    DEFAULT_STACK_RED_PAGES
  57 #define MIN_STACK_SHADOW_PAGES DEFAULT_STACK_SHADOW_PAGES
  58 #define MIN_STACK_RESERVED_PAGES (0)
  59 
  60 define_pd_global(intx, StackYellowPages, DEFAULT_STACK_YELLOW_PAGES);
  61 define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
  62 define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
  63 define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
  64 
  65 define_pd_global(bool, RewriteBytecodes,     true);
  66 define_pd_global(bool, RewriteFrequentPairs, true);
  67 
  68 define_pd_global(bool, PreserveFramePointer, false);
  69 
  70 // GC Ergo Flags
  71 define_pd_global(uintx, CMSYoungGenPerWorker, 64*M);  // default max size of CMS young gen, per GC worker thread
  72 
  73 define_pd_global(uintx, TypeProfileLevel, 111);
  74 
  75 define_pd_global(bool, CompactStrings, true);
  76 define_pd_global(intx, InitArrayShortSize, BytesPerLong);
  77 
  78 define_pd_global(bool, ThreadLocalHandshakes, false/*true*/);
  79 
  80 // FIXME this turned out to be needed for the core build too?
  81 //#if defined(COMPILER1) || defined(COMPILER2)
  82 define_pd_global(intx, InlineSmallCode,          1000);
  83 //#endif
  84 
  85 // Define it instead providing as option, inlining the constant significantly
  86 // improves perfromance. The option is disabled for AARCH32 in globals.hpp too.
  87 #define UseMembar true
  88 
  89 #define ARCH_FLAGS(develop, \
  90                    product, \
  91                    diagnostic, \
  92                    experimental, \
  93                    notproduct, \
  94                    range, \
  95                    constraint, \
  96                    writeable) \
  97                                                                                                         \
  98   product(bool, NearCpool, true,                                                                        \
  99          "constant pool is close to instructions")                                                      \
 100                                                                                                         \
 101   product(bool, UseBarriersForVolatile, false,                                                          \
 102           "Use memory barriers to implement volatile accesses")                                         \
 103   product(bool, TraceTraps, false, "Trace all traps the signal handler")                                \
 104   product(bool, UseSIMDForMemoryOps, false,                                                             \
 105       "Use SIMD instructions in generated memory move code")                                            \
 106   product(bool, UseNeon, false,                                                                         \
 107           "Use Neon for CRC32 computation")                                                             \
 108   product(bool, UseCRC32, false,                                                                        \
 109           "Use CRC32 instructions for CRC32 computation")                                               \
 110   product(bool, JNIFrameAPCS, false, "Assume APCS frame layout for JNI")                                \
 111   product(bool, FrameAPCS, false, "Use APCS frame layout")                                              \
 112   product(bool, VMFrameAPCS, false, "Force APCS frame layout for VM. "                                  \
 113       "Usually you don't need to set his flag, VM layout is autodetected")                              \
 114   product(bool, UseFPU, true, "Enable FPU utilization at floating point ops."                           \
 115     "Affects SoftFP mode only.")
 116 
 117 #endif // CPU_AARCH32_VM_GLOBALS_AARCH32_HPP