comparison src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 73b1030c6253
children 52b4284cb496
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
73 73
74 // Check 64-bit architecture. 74 // Check 64-bit architecture.
75 do_sysinfo(SI_ARCHITECTURE_64, "sparcv9", &features, generic_v9_m); 75 do_sysinfo(SI_ARCHITECTURE_64, "sparcv9", &features, generic_v9_m);
76 76
77 // Extract valid instruction set extensions. 77 // Extract valid instruction set extensions.
78 uint_t avs[2]; 78 uint_t av;
79 uint_t avn = os::Solaris::getisax(avs, 2); 79 uint_t avn = os::Solaris::getisax(&av, 1);
80 assert(avn <= 2, "should return two or less av's"); 80 assert(avn == 1, "should only return one av");
81 uint_t av = avs[0]; 81
82 82 #ifndef PRODUCT
83 #ifndef PRODUCT 83 if (PrintMiscellaneous && Verbose)
84 if (PrintMiscellaneous && Verbose) { 84 tty->print_cr("getisax(2) returned: " PTR32_FORMAT, av);
85 tty->print("getisax(2) returned: " PTR32_FORMAT, av);
86 if (avn > 1) {
87 tty->print(", " PTR32_FORMAT, avs[1]);
88 }
89 tty->cr();
90 }
91 #endif 85 #endif
92 86
93 if (av & AV_SPARC_MUL32) features |= hardware_mul32_m; 87 if (av & AV_SPARC_MUL32) features |= hardware_mul32_m;
94 if (av & AV_SPARC_DIV32) features |= hardware_div32_m; 88 if (av & AV_SPARC_DIV32) features |= hardware_div32_m;
95 if (av & AV_SPARC_FSMULD) features |= hardware_fsmuld_m; 89 if (av & AV_SPARC_FSMULD) features |= hardware_fsmuld_m;
96 if (av & AV_SPARC_V8PLUS) features |= v9_instructions_m; 90 if (av & AV_SPARC_V8PLUS) features |= v9_instructions_m;
97 if (av & AV_SPARC_POPC) features |= hardware_popc_m; 91 if (av & AV_SPARC_POPC) features |= hardware_popc_m;
98 if (av & AV_SPARC_VIS) features |= vis1_instructions_m; 92 if (av & AV_SPARC_VIS) features |= vis1_instructions_m;
99 if (av & AV_SPARC_VIS2) features |= vis2_instructions_m; 93 if (av & AV_SPARC_VIS2) features |= vis2_instructions_m;
100 if (avn > 1) {
101 uint_t av2 = avs[1];
102 #ifndef AV2_SPARC_SPARC5
103 #define AV2_SPARC_SPARC5 0x00000008 /* The 29 new fp and sub instructions */
104 #endif
105 if (av2 & AV2_SPARC_SPARC5) features |= sparc5_instructions_m;
106 }
107 94
108 // Next values are not defined before Solaris 10 95 // Next values are not defined before Solaris 10
109 // but Solaris 8 is used for jdk6 update builds. 96 // but Solaris 8 is used for jdk6 update builds.
110 #ifndef AV_SPARC_ASI_BLK_INIT 97 #ifndef AV_SPARC_ASI_BLK_INIT
111 #define AV_SPARC_ASI_BLK_INIT 0x0080 /* ASI_BLK_INIT_xxx ASI */ 98 #define AV_SPARC_ASI_BLK_INIT 0x0080 /* ASI_BLK_INIT_xxx ASI */
129 116
130 #ifndef AV_SPARC_CBCOND 117 #ifndef AV_SPARC_CBCOND
131 #define AV_SPARC_CBCOND 0x10000000 /* compare and branch instrs supported */ 118 #define AV_SPARC_CBCOND 0x10000000 /* compare and branch instrs supported */
132 #endif 119 #endif
133 if (av & AV_SPARC_CBCOND) features |= cbcond_instructions_m; 120 if (av & AV_SPARC_CBCOND) features |= cbcond_instructions_m;
134
135 #ifndef AV_SPARC_AES
136 #define AV_SPARC_AES 0x00020000 /* aes instrs supported */
137 #endif
138 if (av & AV_SPARC_AES) features |= aes_instructions_m;
139 121
140 } else { 122 } else {
141 // getisax(2) failed, use the old legacy code. 123 // getisax(2) failed, use the old legacy code.
142 #ifndef PRODUCT 124 #ifndef PRODUCT
143 if (PrintMiscellaneous && Verbose) 125 if (PrintMiscellaneous && Verbose)