Mercurial > hg > graal-compiler
comparison src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp @ 14312:73b1030c6253
8031290: Adjust call to getisax() for additional words returned
Reviewed-by: kvn, iveresov, twisti
author | jmasa |
---|---|
date | Wed, 15 Jan 2014 07:20:04 -0800 |
parents | 00f5eff62d18 |
children | 4ca6dc0799b6 b20a35eae442 |
comparison
equal
deleted
inserted
replaced
14311:e9fc29d2e8ae | 14312:73b1030c6253 |
---|---|
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 av; | 78 uint_t avs[2]; |
79 uint_t avn = os::Solaris::getisax(&av, 1); | 79 uint_t avn = os::Solaris::getisax(avs, 2); |
80 assert(avn == 1, "should only return one av"); | 80 assert(avn <= 2, "should return two or less av's"); |
81 | 81 uint_t av = avs[0]; |
82 #ifndef PRODUCT | 82 |
83 if (PrintMiscellaneous && Verbose) | 83 #ifndef PRODUCT |
84 tty->print_cr("getisax(2) returned: " PTR32_FORMAT, av); | 84 if (PrintMiscellaneous && Verbose) { |
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 } | |
85 #endif | 91 #endif |
86 | 92 |
87 if (av & AV_SPARC_MUL32) features |= hardware_mul32_m; | 93 if (av & AV_SPARC_MUL32) features |= hardware_mul32_m; |
88 if (av & AV_SPARC_DIV32) features |= hardware_div32_m; | 94 if (av & AV_SPARC_DIV32) features |= hardware_div32_m; |
89 if (av & AV_SPARC_FSMULD) features |= hardware_fsmuld_m; | 95 if (av & AV_SPARC_FSMULD) features |= hardware_fsmuld_m; |
90 if (av & AV_SPARC_V8PLUS) features |= v9_instructions_m; | 96 if (av & AV_SPARC_V8PLUS) features |= v9_instructions_m; |
91 if (av & AV_SPARC_POPC) features |= hardware_popc_m; | 97 if (av & AV_SPARC_POPC) features |= hardware_popc_m; |
92 if (av & AV_SPARC_VIS) features |= vis1_instructions_m; | 98 if (av & AV_SPARC_VIS) features |= vis1_instructions_m; |
93 if (av & AV_SPARC_VIS2) features |= vis2_instructions_m; | 99 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 } | |
94 | 107 |
95 // Next values are not defined before Solaris 10 | 108 // Next values are not defined before Solaris 10 |
96 // but Solaris 8 is used for jdk6 update builds. | 109 // but Solaris 8 is used for jdk6 update builds. |
97 #ifndef AV_SPARC_ASI_BLK_INIT | 110 #ifndef AV_SPARC_ASI_BLK_INIT |
98 #define AV_SPARC_ASI_BLK_INIT 0x0080 /* ASI_BLK_INIT_xxx ASI */ | 111 #define AV_SPARC_ASI_BLK_INIT 0x0080 /* ASI_BLK_INIT_xxx ASI */ |