From f4463596a4fe4142d84a6d55969999e22f7fcfa5 Mon Sep 17 00:00:00 2001 From: bpittore Date: Fri, 20 Sep 2013 15:06:23 -0400 Subject: [PATCH] 8014911: Should use SUPPORTS_NATIVE_CX8 define to help C/C++ compiler elide blocks of code Summary: If SUPPORTS_NATIVE_CX8 true then supports_cx8() function hard coded to return 'true' Reviewed-by: kvn, twisti, dholmes --- src/share/vm/runtime/vm_version.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/share/vm/runtime/vm_version.hpp b/src/share/vm/runtime/vm_version.hpp index c901b260d..f03b77ca3 100644 --- a/src/share/vm/runtime/vm_version.hpp +++ b/src/share/vm/runtime/vm_version.hpp @@ -78,7 +78,13 @@ class Abstract_VM_Version: AllStatic { static const char* jre_release_version(); // does HW support an 8-byte compare-exchange operation? - static bool supports_cx8() {return _supports_cx8;} + static bool supports_cx8() { +#ifdef SUPPORTS_NATIVE_CX8 + return true; +#else + return _supports_cx8; +#endif + } // does HW support atomic get-and-set or atomic get-and-add? Used // to guide intrinsification decisions for Unsafe atomic ops static bool supports_atomic_getset4() {return _supports_atomic_getset4;} -- GitLab