# HG changeset patch # User bpittore # Date 1379703983 14400 # Node ID 586fa1919a89a4a9bede04dd35cd42a84b4a6351 # Parent 10efeefa6485a96138450d3c53bc7126780ea644 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 diff -r 10efeefa6485 -r 586fa1919a89 src/share/vm/runtime/vm_version.hpp --- a/src/share/vm/runtime/vm_version.hpp Fri Sep 13 21:36:27 2013 -0400 +++ b/src/share/vm/runtime/vm_version.hpp Fri Sep 20 15:06:23 2013 -0400 @@ -78,7 +78,13 @@ 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;}