< prev index next >

src/cpu/aarch64/vm/vm_version_aarch64.cpp

Print this page
rev 9944 : 8145336: PPC64: fix string intrinsics after CompactStrings change


 104 
 105     return start;
 106   }
 107 };
 108 
 109 
 110 void VM_Version::get_processor_features() {
 111   _supports_cx8 = true;
 112   _supports_atomic_getset4 = true;
 113   _supports_atomic_getadd4 = true;
 114   _supports_atomic_getset8 = true;
 115   _supports_atomic_getadd8 = true;
 116 
 117   if (FLAG_IS_DEFAULT(AllocatePrefetchDistance))
 118     FLAG_SET_DEFAULT(AllocatePrefetchDistance, 256);
 119   if (FLAG_IS_DEFAULT(AllocatePrefetchStepSize))
 120     FLAG_SET_DEFAULT(AllocatePrefetchStepSize, 64);
 121   FLAG_SET_DEFAULT(PrefetchScanIntervalInBytes, 256);
 122   FLAG_SET_DEFAULT(PrefetchFieldsAhead, 256);
 123   FLAG_SET_DEFAULT(PrefetchCopyIntervalInBytes, 256);
 124   FLAG_SET_DEFAULT(UseSSE42Intrinsics, true);
 125 
 126   unsigned long auxv = getauxval(AT_HWCAP);
 127 
 128   char buf[512];
 129 
 130   _features = auxv;
 131 
 132   int cpu_lines = 0;
 133   if (FILE *f = fopen("/proc/cpuinfo", "r")) {
 134     char buf[128], *p;
 135     while (fgets(buf, sizeof (buf), f) != NULL) {
 136       if (p = strchr(buf, ':')) {
 137         long v = strtol(p+1, NULL, 0);
 138         if (strncmp(buf, "CPU implementer", sizeof "CPU implementer" - 1) == 0) {
 139           _cpu = v;
 140           cpu_lines++;
 141         } else if (strncmp(buf, "CPU variant", sizeof "CPU variant" - 1) == 0) {
 142           _variant = v;
 143         } else if (strncmp(buf, "CPU part", sizeof "CPU part" - 1) == 0) {
 144           if (_model != v)  _model2 = _model;




 104 
 105     return start;
 106   }
 107 };
 108 
 109 
 110 void VM_Version::get_processor_features() {
 111   _supports_cx8 = true;
 112   _supports_atomic_getset4 = true;
 113   _supports_atomic_getadd4 = true;
 114   _supports_atomic_getset8 = true;
 115   _supports_atomic_getadd8 = true;
 116 
 117   if (FLAG_IS_DEFAULT(AllocatePrefetchDistance))
 118     FLAG_SET_DEFAULT(AllocatePrefetchDistance, 256);
 119   if (FLAG_IS_DEFAULT(AllocatePrefetchStepSize))
 120     FLAG_SET_DEFAULT(AllocatePrefetchStepSize, 64);
 121   FLAG_SET_DEFAULT(PrefetchScanIntervalInBytes, 256);
 122   FLAG_SET_DEFAULT(PrefetchFieldsAhead, 256);
 123   FLAG_SET_DEFAULT(PrefetchCopyIntervalInBytes, 256);

 124 
 125   unsigned long auxv = getauxval(AT_HWCAP);
 126 
 127   char buf[512];
 128 
 129   _features = auxv;
 130 
 131   int cpu_lines = 0;
 132   if (FILE *f = fopen("/proc/cpuinfo", "r")) {
 133     char buf[128], *p;
 134     while (fgets(buf, sizeof (buf), f) != NULL) {
 135       if (p = strchr(buf, ':')) {
 136         long v = strtol(p+1, NULL, 0);
 137         if (strncmp(buf, "CPU implementer", sizeof "CPU implementer" - 1) == 0) {
 138           _cpu = v;
 139           cpu_lines++;
 140         } else if (strncmp(buf, "CPU variant", sizeof "CPU variant" - 1) == 0) {
 141           _variant = v;
 142         } else if (strncmp(buf, "CPU part", sizeof "CPU part" - 1) == 0) {
 143           if (_model != v)  _model2 = _model;


< prev index next >