mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-14 20:35:09 +00:00
8031290: Adjust call to getisax() for additional words returned
Reviewed-by: kvn, iveresov, twisti
This commit is contained in:
parent
a23ee6de8d
commit
9d4f3dfd4f
@ -49,7 +49,8 @@ protected:
|
||||
M_family = 15,
|
||||
T_family = 16,
|
||||
T1_model = 17,
|
||||
aes_instructions = 18
|
||||
sparc5_instructions = 18,
|
||||
aes_instructions = 19
|
||||
};
|
||||
|
||||
enum Feature_Flag_Set {
|
||||
@ -74,6 +75,7 @@ protected:
|
||||
M_family_m = 1 << M_family,
|
||||
T_family_m = 1 << T_family,
|
||||
T1_model_m = 1 << T1_model,
|
||||
sparc5_instructions_m = 1 << sparc5_instructions,
|
||||
aes_instructions_m = 1 << aes_instructions,
|
||||
|
||||
generic_v8_m = v8_instructions_m | hardware_mul32_m | hardware_div32_m | hardware_fsmuld_m,
|
||||
@ -125,6 +127,7 @@ public:
|
||||
static bool has_vis3() { return (_features & vis3_instructions_m) != 0; }
|
||||
static bool has_blk_init() { return (_features & blk_init_instructions_m) != 0; }
|
||||
static bool has_cbcond() { return (_features & cbcond_instructions_m) != 0; }
|
||||
static bool has_sparc5_instr() { return (_features & sparc5_instructions_m) != 0; }
|
||||
static bool has_aes() { return (_features & aes_instructions_m) != 0; }
|
||||
|
||||
static bool supports_compare_and_exchange()
|
||||
@ -136,6 +139,7 @@ public:
|
||||
|
||||
static bool is_M_series() { return is_M_family(_features); }
|
||||
static bool is_T4() { return is_T_family(_features) && has_cbcond(); }
|
||||
static bool is_T7() { return is_T_family(_features) && has_sparc5_instr(); }
|
||||
|
||||
// Fujitsu SPARC64
|
||||
static bool is_sparc64() { return (_features & sparc64_family_m) != 0; }
|
||||
@ -155,7 +159,7 @@ public:
|
||||
static const char* cpu_features() { return _features_str; }
|
||||
|
||||
static intx prefetch_data_size() {
|
||||
return is_T4() ? 32 : 64; // default prefetch block size on sparc
|
||||
return is_T4() && !is_T7() ? 32 : 64; // default prefetch block size on sparc
|
||||
}
|
||||
|
||||
// Prefetch
|
||||
|
||||
@ -75,13 +75,19 @@ int VM_Version::platform_features(int features) {
|
||||
do_sysinfo(SI_ARCHITECTURE_64, "sparcv9", &features, generic_v9_m);
|
||||
|
||||
// Extract valid instruction set extensions.
|
||||
uint_t av;
|
||||
uint_t avn = os::Solaris::getisax(&av, 1);
|
||||
assert(avn == 1, "should only return one av");
|
||||
uint_t avs[2];
|
||||
uint_t avn = os::Solaris::getisax(avs, 2);
|
||||
assert(avn <= 2, "should return two or less av's");
|
||||
uint_t av = avs[0];
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (PrintMiscellaneous && Verbose)
|
||||
tty->print_cr("getisax(2) returned: " PTR32_FORMAT, av);
|
||||
if (PrintMiscellaneous && Verbose) {
|
||||
tty->print("getisax(2) returned: " PTR32_FORMAT, av);
|
||||
if (avn > 1) {
|
||||
tty->print(", " PTR32_FORMAT, avs[1]);
|
||||
}
|
||||
tty->cr();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (av & AV_SPARC_MUL32) features |= hardware_mul32_m;
|
||||
@ -91,6 +97,13 @@ int VM_Version::platform_features(int features) {
|
||||
if (av & AV_SPARC_POPC) features |= hardware_popc_m;
|
||||
if (av & AV_SPARC_VIS) features |= vis1_instructions_m;
|
||||
if (av & AV_SPARC_VIS2) features |= vis2_instructions_m;
|
||||
if (avn > 1) {
|
||||
uint_t av2 = avs[1];
|
||||
#ifndef AV2_SPARC_SPARC5
|
||||
#define AV2_SPARC_SPARC5 0x00000008 /* The 29 new fp and sub instructions */
|
||||
#endif
|
||||
if (av2 & AV2_SPARC_SPARC5) features |= sparc5_instructions_m;
|
||||
}
|
||||
|
||||
// Next values are not defined before Solaris 10
|
||||
// but Solaris 8 is used for jdk6 update builds.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user