From 95aee81232e741c2b328a08d29bc223a197c1b83 Mon Sep 17 00:00:00 2001 From: kvn Date: Mon, 16 Mar 2009 15:06:33 -0700 Subject: [PATCH] 6816308: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003 Summary: Allow Hotspot builds with latest Windows SDK 6.1 on 64bit Windows 2003 Reviewed-by: ohair, tbell, jcoomes --- make/windows/get_msc_ver.sh | 1 + make/windows/makefiles/compile.make | 8 ++------ make/windows/makefiles/sa.make | 2 ++ make/windows/makefiles/sanity.make | 4 ++-- src/cpu/x86/vm/interpreterRT_x86_64.cpp | 4 ++-- src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp | 5 +++++ src/share/vm/adlc/adlc.hpp | 2 +- src/share/vm/gc_implementation/g1/concurrentMark.cpp | 2 +- src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp | 2 +- src/share/vm/memory/blockOffsetTable.hpp | 2 +- src/share/vm/runtime/vm_version.cpp | 6 ++++-- src/share/vm/utilities/globalDefinitions_visCPP.hpp | 2 +- 12 files changed, 23 insertions(+), 17 deletions(-) diff --git a/make/windows/get_msc_ver.sh b/make/windows/get_msc_ver.sh index 6bbbbef78..67df0d0dd 100644 --- a/make/windows/get_msc_ver.sh +++ b/make/windows/get_msc_ver.sh @@ -29,6 +29,7 @@ # cl version 13.10.3077 returns "MSC_VER=1310" # cl version 14.00.30701 returns "MSC_VER=1399" (OLD_MSSDK version) # cl version 14.00.40310.41 returns "MSC_VER=1400" +# cl version 15.00.21022.8 returns "MSC_VER=1500" # Note that we currently do not have a way to set HotSpotMksHome in # the batch build, but so far this has not seemed to be a problem. The diff --git a/make/windows/makefiles/compile.make b/make/windows/makefiles/compile.make index ddc9ea11a..5869d7cb8 100644 --- a/make/windows/makefiles/compile.make +++ b/make/windows/makefiles/compile.make @@ -170,11 +170,9 @@ LINK_FLAGS = /manifest $(LINK_FLAGS) $(BUFFEROVERFLOWLIB) # Manifest Tool - used in VS2005 and later to adjust manifests stored # as resources inside build artifacts. MT=mt.exe -!if "$(BUILDARCH)" == "i486" -# VS2005 on x86 restricts the use of certain libc functions without this +# VS2005 and later restricts the use of certain libc functions without this CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_DEPRECATE !endif -!endif !if "$(COMPILER_NAME)" == "VS2008" PRODUCT_OPT_OPTION = /O2 /Oy- @@ -185,11 +183,9 @@ LINK_FLAGS = /manifest $(LINK_FLAGS) # Manifest Tool - used in VS2005 and later to adjust manifests stored # as resources inside build artifacts. MT=mt.exe -!if "$(BUILDARCH)" == "i486" -# VS2005 on x86 restricts the use of certain libc functions without this +# VS2005 and later restricts the use of certain libc functions without this CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_DEPRECATE !endif -!endif # Compile for space above time. !if "$(Variant)" == "kernel" diff --git a/make/windows/makefiles/sa.make b/make/windows/makefiles/sa.make index c19560571..1970f116b 100644 --- a/make/windows/makefiles/sa.make +++ b/make/windows/makefiles/sa.make @@ -89,9 +89,11 @@ checkAndBuildSA:: $(SAWINDBG) SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 $(GX_OPTION) /Od /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c !elseif "$(BUILDARCH)" == "amd64" SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 $(GX_OPTION) /Od /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +!if "$(COMPILER_NAME)" == "VS2005" # On amd64, VS2005 compiler requires bufferoverflowU.lib on the link command line, # otherwise we get missing __security_check_cookie externals at link time. SA_LINK_FLAGS = bufferoverflowU.lib +!endif !else SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 /Gm $(GX_OPTION) /ZI /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c !endif diff --git a/make/windows/makefiles/sanity.make b/make/windows/makefiles/sanity.make index 5b4293d27..dd5c7499f 100644 --- a/make/windows/makefiles/sanity.make +++ b/make/windows/makefiles/sanity.make @@ -27,9 +27,9 @@ all: checkCL checkLink checkCL: - @ if "$(MSC_VER)" NEQ "1310" if "$(MSC_VER)" NEQ "1399" if "$(MSC_VER)" NEQ "1400" \ + @ if "$(MSC_VER)" NEQ "1310" if "$(MSC_VER)" NEQ "1399" if "$(MSC_VER)" NEQ "1400" if "$(MSC_VER)" NEQ "1500" \ echo *** WARNING *** unrecognized cl.exe version $(MSC_VER) ($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection. checkLink: - @ if "$(LINK_VER)" NEQ "710" if "$(LINK_VER)" NEQ "800" \ + @ if "$(LINK_VER)" NEQ "710" if "$(LINK_VER)" NEQ "800" if "$(LINK_VER)" NEQ "900" \ echo *** WARNING *** unrecognized link.exe version $(LINK_VER) ($(RAW_LINK_VER)). Use FORCE_LINK_VER to override automatic detection. diff --git a/src/cpu/x86/vm/interpreterRT_x86_64.cpp b/src/cpu/x86/vm/interpreterRT_x86_64.cpp index e3c8c6be9..04f87f3bb 100644 --- a/src/cpu/x86/vm/interpreterRT_x86_64.cpp +++ b/src/cpu/x86/vm/interpreterRT_x86_64.cpp @@ -349,7 +349,7 @@ class SlowSignatureHandler if (_num_args < Argument::n_float_register_parameters_c-1) { *_reg_args++ = from_obj; - *_fp_identifiers |= (0x01 << (_num_args*2)); // mark as float + *_fp_identifiers |= (intptr_t)(0x01 << (_num_args*2)); // mark as float _num_args++; } else { *_to++ = from_obj; @@ -364,7 +364,7 @@ class SlowSignatureHandler if (_num_args < Argument::n_float_register_parameters_c-1) { *_reg_args++ = from_obj; - *_fp_identifiers |= (0x3 << (_num_args*2)); // mark as double + *_fp_identifiers |= (intptr_t)(0x3 << (_num_args*2)); // mark as double _num_args++; } else { *_to++ = from_obj; diff --git a/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp b/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp index 1e8ed078d..5f8958567 100644 --- a/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp +++ b/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp @@ -68,6 +68,9 @@ typedef struct _DISPATCHER_CONTEXT { PVOID HandlerData; } DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; +#if MSC_VER < 1500 + +/* Not needed for VS2008 compiler, comes from winnt.h. */ typedef EXCEPTION_DISPOSITION (*PEXCEPTION_ROUTINE) ( IN PEXCEPTION_RECORD ExceptionRecord, IN ULONG64 EstablisherFrame, @@ -75,4 +78,6 @@ typedef EXCEPTION_DISPOSITION (*PEXCEPTION_ROUTINE) ( IN OUT PDISPATCHER_CONTEXT DispatcherContext ); +#endif + #endif // AMD64 diff --git a/src/share/vm/adlc/adlc.hpp b/src/share/vm/adlc/adlc.hpp index 3d59b539b..6b92dfd84 100644 --- a/src/share/vm/adlc/adlc.hpp +++ b/src/share/vm/adlc/adlc.hpp @@ -44,7 +44,7 @@ using namespace std; #error "Something is wrong with the detection of MSC_VER in the makefiles" #endif -#if _MSC_VER >= 1400 && !defined(_WIN64) +#if _MSC_VER >= 1400 #define strdup _strdup #endif diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm/gc_implementation/g1/concurrentMark.cpp index 5b01157e9..7a4f82892 100644 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -107,7 +107,7 @@ void CMBitMapRO::mostly_disjoint_range_union(BitMap* from_bitmap, #ifndef PRODUCT bool CMBitMapRO::covers(ReservedSpace rs) const { // assert(_bm.map() == _virtual_space.low(), "map inconsistency"); - assert(((size_t)_bm.size() * (1 << _shifter)) == _bmWordSize, + assert(((size_t)_bm.size() * (size_t)(1 << _shifter)) == _bmWordSize, "size inconsistency"); return _bmStartWord == (HeapWord*)(rs.base()) && _bmWordSize == rs.size()>>LogHeapWordSize; diff --git a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp index 5e54b0919..dce96d8df 100644 --- a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp +++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp @@ -508,7 +508,7 @@ OtherRegionsTable::OtherRegionsTable(HeapRegion* hr) : typedef PosParPRT* PosParPRTPtr; if (_max_fine_entries == 0) { assert(_mod_max_fine_entries_mask == 0, "Both or none."); - _max_fine_entries = (1 << G1LogRSRegionEntries); + _max_fine_entries = (size_t)(1 << G1LogRSRegionEntries); _mod_max_fine_entries_mask = _max_fine_entries - 1; #if SAMPLE_FOR_EVICTION assert(_fine_eviction_sample_size == 0 diff --git a/src/share/vm/memory/blockOffsetTable.hpp b/src/share/vm/memory/blockOffsetTable.hpp index 670dd86d7..b812a2431 100644 --- a/src/share/vm/memory/blockOffsetTable.hpp +++ b/src/share/vm/memory/blockOffsetTable.hpp @@ -235,7 +235,7 @@ class BlockOffsetArray: public BlockOffsetTable { }; static size_t power_to_cards_back(uint i) { - return 1 << (LogBase * i); + return (size_t)(1 << (LogBase * i)); } static size_t power_to_words_back(uint i) { return power_to_cards_back(i) * N_words; diff --git a/src/share/vm/runtime/vm_version.cpp b/src/share/vm/runtime/vm_version.cpp index 653309db0..3e7a7e6e0 100644 --- a/src/share/vm/runtime/vm_version.cpp +++ b/src/share/vm/runtime/vm_version.cpp @@ -163,9 +163,11 @@ const char* Abstract_VM_Version::internal_vm_info_string() { #elif _MSC_VER == 1200 #define HOTSPOT_BUILD_COMPILER "MS VC++ 6.0" #elif _MSC_VER == 1310 - #define HOTSPOT_BUILD_COMPILER "MS VC++ 7.1" + #define HOTSPOT_BUILD_COMPILER "MS VC++ 7.1 (VS2003)" #elif _MSC_VER == 1400 - #define HOTSPOT_BUILD_COMPILER "MS VC++ 8.0" + #define HOTSPOT_BUILD_COMPILER "MS VC++ 8.0 (VS2005)" + #elif _MSC_VER == 1500 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 9.0 (VS2008)" #else #define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER) #endif diff --git a/src/share/vm/utilities/globalDefinitions_visCPP.hpp b/src/share/vm/utilities/globalDefinitions_visCPP.hpp index 6b4804ec5..3e3c861df 100644 --- a/src/share/vm/utilities/globalDefinitions_visCPP.hpp +++ b/src/share/vm/utilities/globalDefinitions_visCPP.hpp @@ -162,7 +162,7 @@ inline int vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) { } // Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead -#if _MSC_VER >= 1400 && !defined(_WIN64) +#if _MSC_VER >= 1400 #define open _open #define close _close #define read _read -- GitLab