< prev index next >

src/cpu/sparc/vm/vm_version_sparc.cpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 283         if (UseAES || UseAESIntrinsics) {
 284           warning("SPARC AES intrinsics require VIS3 instruction support. Intrinsics will be disabled.");
 285           if (UseAES) {
 286             FLAG_SET_DEFAULT(UseAES, false);
 287           }
 288           if (UseAESIntrinsics) {
 289             FLAG_SET_DEFAULT(UseAESIntrinsics, false);
 290           }
 291         }
 292     }
 293   } else if (UseAES || UseAESIntrinsics) {
 294     warning("AES instructions are not available on this CPU");
 295     if (UseAES) {
 296       FLAG_SET_DEFAULT(UseAES, false);
 297     }
 298     if (UseAESIntrinsics) {
 299       FLAG_SET_DEFAULT(UseAESIntrinsics, false);
 300     }
 301   }
 302 














 303   // SHA1, SHA256, and SHA512 instructions were added to SPARC T-series at different times
 304   if (has_sha1() || has_sha256() || has_sha512()) {
 305     if (UseVIS > 0) { // SHA intrinsics use VIS1 instructions
 306       if (FLAG_IS_DEFAULT(UseSHA)) {
 307         FLAG_SET_DEFAULT(UseSHA, true);
 308       }
 309     } else {
 310       if (UseSHA) {
 311         warning("SPARC SHA intrinsics require VIS1 instruction support. Intrinsics will be disabled.");
 312         FLAG_SET_DEFAULT(UseSHA, false);
 313       }
 314     }
 315   } else if (UseSHA) {
 316     warning("SHA instructions are not available on this CPU");
 317     FLAG_SET_DEFAULT(UseSHA, false);
 318   }
 319 
 320   if (!UseSHA) {
 321     FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
 322     FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);


   1 /*
   2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 283         if (UseAES || UseAESIntrinsics) {
 284           warning("SPARC AES intrinsics require VIS3 instruction support. Intrinsics will be disabled.");
 285           if (UseAES) {
 286             FLAG_SET_DEFAULT(UseAES, false);
 287           }
 288           if (UseAESIntrinsics) {
 289             FLAG_SET_DEFAULT(UseAESIntrinsics, false);
 290           }
 291         }
 292     }
 293   } else if (UseAES || UseAESIntrinsics) {
 294     warning("AES instructions are not available on this CPU");
 295     if (UseAES) {
 296       FLAG_SET_DEFAULT(UseAES, false);
 297     }
 298     if (UseAESIntrinsics) {
 299       FLAG_SET_DEFAULT(UseAESIntrinsics, false);
 300     }
 301   }
 302 
 303   // GHASH instrinsics
 304   if (has_vis3()) {
 305     if (UseVIS > 2) {
 306       if (FLAG_IS_DEFAULT(UseGHASHIntrinsics)) {
 307         FLAG_SET_DEFAULT(UseGHASHIntrinsics, true);
 308       } else if (!UseGHASHIntrinsics) {
 309         FLAG_SET_DEFAULT(UseGHASHIntrinsics, false);
 310       }
 311     } else if (UseGHASHIntrinsics) {
 312       warning("GHASH intrinsics require VIS3 insructions support.  Intriniscs will be disabled");
 313       FLAG_SET_DEFAULT(UseGHASHIntrinsics, false);
 314     }
 315   }
 316       
 317   // SHA1, SHA256, and SHA512 instructions were added to SPARC T-series at different times
 318   if (has_sha1() || has_sha256() || has_sha512()) {
 319     if (UseVIS > 0) { // SHA intrinsics use VIS1 instructions
 320       if (FLAG_IS_DEFAULT(UseSHA)) {
 321         FLAG_SET_DEFAULT(UseSHA, true);
 322       }
 323     } else {
 324       if (UseSHA) {
 325         warning("SPARC SHA intrinsics require VIS1 instruction support. Intrinsics will be disabled.");
 326         FLAG_SET_DEFAULT(UseSHA, false);
 327       }
 328     }
 329   } else if (UseSHA) {
 330     warning("SHA instructions are not available on this CPU");
 331     FLAG_SET_DEFAULT(UseSHA, false);
 332   }
 333 
 334   if (!UseSHA) {
 335     FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
 336     FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);


< prev index next >