Skip to content

Commit e72b0ac

Browse files
committed
8296429: Remove os::supports_sse
Reviewed-by: stuefe
1 parent 813b223 commit e72b0ac

File tree

6 files changed

+0
-37
lines changed

6 files changed

+0
-37
lines changed

src/hotspot/cpu/x86/vm_version_x86.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -854,9 +854,6 @@ void VM_Version::get_processor_features() {
854854
_data_cache_line_flush_size = _cpuid_info.std_cpuid1_ebx.bits.clflush_size * 8;
855855
}
856856
#endif
857-
// If the OS doesn't support SSE, we can't use this feature even if the HW does
858-
if (!os::supports_sse())
859-
_features &= ~(CPU_SSE|CPU_SSE2|CPU_SSE3|CPU_SSSE3|CPU_SSE4A|CPU_SSE4_1|CPU_SSE4_2);
860857

861858
if (UseSSE < 4) {
862859
_features &= ~CPU_SSE4_1;

src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -636,13 +636,6 @@ void os::Bsd::init_thread_fpu_state(void) {
636636
#endif // !AMD64
637637
}
638638

639-
640-
// Check that the bsd kernel version is 2.4 or higher since earlier
641-
// versions do not support SSE without patches.
642-
bool os::supports_sse() {
643-
return true;
644-
}
645-
646639
juint os::cpu_microcode_revision() {
647640
juint result = 0;
648641
char data[8];

src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -443,24 +443,6 @@ void os::Linux::set_fpu_control_word(int fpu_control) {
443443
#endif // !AMD64
444444
}
445445

446-
// Check that the linux kernel version is 2.4 or higher since earlier
447-
// versions do not support SSE without patches.
448-
bool os::supports_sse() {
449-
#ifdef AMD64
450-
return true;
451-
#else
452-
struct utsname uts;
453-
if( uname(&uts) != 0 ) return false; // uname fails?
454-
char *minor_string;
455-
int major = strtol(uts.release,&minor_string,10);
456-
int minor = strtol(minor_string+1,NULL,10);
457-
bool result = (major > 2 || (major==2 && minor >= 4));
458-
log_info(os)("OS version is %d.%d, which %s support SSE/SSE2",
459-
major,minor, result ? "DOES" : "does NOT");
460-
return result;
461-
#endif // AMD64
462-
}
463-
464446
juint os::cpu_microcode_revision() {
465447
// Note: this code runs on startup, and therefore should not be slow,
466448
// see JDK-8283200.

src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,6 @@ void os::print_register_info(outputStream *st, const void *context) {
275275
void os::setup_fpu() {
276276
}
277277

278-
bool os::supports_sse() {
279-
return true;
280-
}
281-
282278
#ifndef PRODUCT
283279
void os::verify_stack_alignment() {
284280
assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment");

src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,3 @@ int os::extra_bang_size_in_bytes() {
565565
// JDK-8050147 requires the full cache line bang for x86.
566566
return VM_Version::L1_line_size();
567567
}
568-
569-
bool os::supports_sse() {
570-
return true;
571-
}

src/hotspot/share/runtime/os.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,6 @@ class os: AllStatic {
947947
inline static bool zero_page_read_protected();
948948

949949
static void setup_fpu();
950-
static bool supports_sse();
951950
static juint cpu_microcode_revision();
952951

953952
static inline jlong rdtsc();

0 commit comments

Comments
 (0)