JDK-8031290 : Adjust call to getisax() for additional words returned
Type:Bug
Component:hotspot
Sub-Component:runtime
Affected Version:7
Priority:P3
Status:Closed
Resolution:Fixed
Submitted:2014-01-06
Updated:2017-03-04
Resolved:2014-02-26
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
The call to getisax() assumes only 1 word will be returned. Fix that and make use of additional
information as appropriate.
Comments
The execution of any debug VM with this fix will test for the additional word returned by getisax() with an assertion. The code to check for the additional architecture features will only have an affect on an unreleased version of Solaris (where the return from getisax() has been changed to return two words) and on unreleased sparc hardware (T7 hardware).
31-01-2014
Change code to expect 2 words returned by getisax() and use the contents of the second word to identify architectural features.
31-01-2014
Include this changes for AV2_SPARC_SPARC5.
#ifndef PRODUCT
- if (PrintMiscellaneous && Verbose)
+ if (PrintMiscellaneous && Verbose) {
tty->print("getisax(2) returned: " PTR32_FORMAT, av);
+ if (avn > 1) {
+ tty->print(", " PTR32_FORMAT, avs[1]);
+ }
+ }
#endif
+ 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;
+ }
And in vm_version_sparc.hpp
sparc5_instructions = 18
sparc5_instructions_m = 1 << sparc5_instructions,
static bool has_sparc5_instr() { return (_features & sparc5_instructions_m) != 0; }
static bool is_T7() { return is_T_family(_features) && has_sparc5_instr(); }
static intx prefetch_data_size() {
return is_T4() && !is_T7() ? 32 : 64; // default prefetch block size on sparc
}