--- old/src/cpu/sparc/vm/vm_version_sparc.cpp 2015-02-13 08:28:03.847565912 -0800 +++ new/src/cpu/sparc/vm/vm_version_sparc.cpp 2015-02-13 08:28:03.755566502 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -300,6 +300,20 @@ } } + // GHASH instrinsics + if (has_vis3()) { + if (UseVIS > 2) { + if (FLAG_IS_DEFAULT(UseGHASHIntrinsics)) { + FLAG_SET_DEFAULT(UseGHASHIntrinsics, true); + } else if (!UseGHASHIntrinsics) { + FLAG_SET_DEFAULT(UseGHASHIntrinsics, false); + } + } else if (UseGHASHIntrinsics) { + warning("GHASH intrinsics require VIS3 insructions support. Intriniscs will be disabled"); + FLAG_SET_DEFAULT(UseGHASHIntrinsics, false); + } + } + // SHA1, SHA256, and SHA512 instructions were added to SPARC T-series at different times if (has_sha1() || has_sha256() || has_sha512()) { if (UseVIS > 0) { // SHA intrinsics use VIS1 instructions