/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "vm_version_sparc.hpp"
# include <sys/auxv_SPARC.h>
# include <sys/systeminfo.h>
# include <kstat.h>
// We need to keep these here as long as we have to build on Solaris
// versions before 10.
#ifndef SI_ARCHITECTURE_32
#endif
#ifndef SI_ARCHITECTURE_64
#endif
char tmp;
// All SI defines used below must be supported.
return;
// Compare the string.
}
}
}
// getisax(2), SI_ARCHITECTURE_32, and SI_ARCHITECTURE_64 are
// supported on Solaris 10 and later.
// Check 32-bit architecture.
// Check 64-bit architecture.
// Extract valid instruction set extensions.
#ifndef PRODUCT
if (PrintMiscellaneous && Verbose)
#endif
// Next values are not defined before Solaris 10
// but Solaris 8 is used for jdk6 update builds.
#ifndef AV_SPARC_ASI_BLK_INIT
#endif
#ifndef AV_SPARC_FMAF
#endif
#ifndef AV_SPARC_FMAU
#endif
#ifndef AV_SPARC_VIS3
#endif
#ifndef AV_SPARC_CBCOND
#endif
} else {
// getisax(2) failed, use the old legacy code.
#ifndef PRODUCT
if (PrintMiscellaneous && Verbose)
#endif
char tmp;
// Figure out what kind of sparc we have
else features |= generic_v8_m;
}
}
// Check for visualization instructions
}
}
}
}
// Determine the machine type.
{
// Using kstat to determine the machine type.
#ifndef KSTAT_DATA_STRING
#endif
// VM is running on Solaris 8 which does not have value.str.
// VM is running on Solaris 10.
#ifndef KSTAT_NAMED_STR_PTR
// Solaris 8 was used to build VM, define the structure it misses.
struct str_t {
union {
} addr;
};
#endif
}
#ifndef PRODUCT
if (PrintMiscellaneous && Verbose) {
}
#endif
// Convert to UPPER case before compare.
for (int i = 0; impl[i] != 0; i++)
// M-series SPARC is based on T-series.
features |= T_family_m;
features |= T1_model_m;
}
} else {
#ifndef PRODUCT
// kstat on Solaris 8 virtual machines (branded zones)
// returns "(unsupported)" implementation.
#endif
implementation = "SPARC";
}
}
break;
}
} // for(
}
}
"unknown cpu info (changed kstat interface?)");
}
return features;
}