8188802: PPC64: Failure on assert(lrgmask.is_aligned_sets(RegMask::SlotsPerVecX))

Reviewed-by: mdoerr
This commit is contained in:
Michihiro Horie 2017-10-05 12:56:42 +02:00
parent b6bc02e70f
commit 36dec9793d
4 changed files with 30 additions and 27 deletions

View File

@ -103,6 +103,9 @@ define_pd_global(intx, InitArrayShortSize, 9*BytesPerLong);
"CPU Version: x for PowerX. Currently recognizes Power5 to " \
"Power8. Default is 0. Newer CPUs will be recognized as Power8.") \
\
product(bool, SuperwordUseVSX, false, \
"Use Power8 VSX instructions for superword optimization.") \
\
/* Reoptimize code-sequences of calls at runtime, e.g. replace an */ \
/* indirect call by a direct call. */ \
product(bool, ReoptimizeCallSequences, true, \

View File

@ -452,17 +452,6 @@ alloc_class chunk2 (
);
alloc_class chunk3 (
// special registers
// These registers are not allocated, but used for nodes generated by postalloc expand.
SR_XER,
SR_LR,
SR_CTR,
SR_VRSAVE,
SR_SPEFSCR,
SR_PPR
);
alloc_class chunk4 (
VSR0,
VSR1,
VSR2,
@ -529,6 +518,17 @@ alloc_class chunk4 (
VSR63
);
alloc_class chunk4 (
// special registers
// These registers are not allocated, but used for nodes generated by postalloc expand.
SR_XER,
SR_LR,
SR_CTR,
SR_VRSAVE,
SR_SPEFSCR,
SR_PPR
);
//-------Architecture Description Register Classes-----------------------
// Several register classes are automatically defined based upon
@ -1675,7 +1675,7 @@ static enum RC rc_class(OptoReg::Name reg) {
if (reg < 64+64) return rc_float;
// Between float regs & stack are the flags regs.
assert(OptoReg::is_stack(reg), "blow up if spilling flags");
assert(OptoReg::is_stack(reg) || reg < 64+64+64, "blow up if spilling flags");
return rc_stack;
}
@ -2221,7 +2221,7 @@ const bool Matcher::convL2FSupported(void) {
// Vector width in bytes.
const int Matcher::vector_width_in_bytes(BasicType bt) {
if (VM_Version::has_vsx()) {
if (SuperwordUseVSX) {
assert(MaxVectorSize == 16, "");
return 16;
} else {
@ -2232,7 +2232,7 @@ const int Matcher::vector_width_in_bytes(BasicType bt) {
// Vector ideal reg.
const uint Matcher::vector_ideal_reg(int size) {
if (VM_Version::has_vsx()) {
if (SuperwordUseVSX) {
assert(MaxVectorSize == 16 && size == 16, "");
return Op_VecX;
} else {
@ -2258,10 +2258,7 @@ const int Matcher::min_vector_size(const BasicType bt) {
// PPC doesn't support misaligned vectors store/load.
const bool Matcher::misaligned_vectors_ok() {
if (VM_Version::has_vsx())
return !AlignVector; // can be changed by flag
else
return false;
return !AlignVector; // can be changed by flag
}
// PPC AES support not yet implemented

View File

@ -480,11 +480,7 @@ void RegisterSaver::restore_result_registers(MacroAssembler* masm, int frame_siz
// Is vector's size (in bytes) bigger than a size saved by default?
bool SharedRuntime::is_wide_vector(int size) {
// Note, MaxVectorSize == 8/16 on PPC64.
if (VM_Version::has_vsx()) {
assert(size <= 16, "%d bytes vectors are not supported", size);
} else {
assert(size <= 8, "%d bytes vectors are not supported", size);
}
assert(size <= (SuperwordUseVSX ? 16 : 8), "%d bytes vectors are not supported", size);
return size > 8;
}

View File

@ -107,10 +107,17 @@ void VM_Version::initialize() {
// TODO: PPC port PdScheduling::power6SectorSize = 0x20;
}
if (VM_Version::has_vsx())
MaxVectorSize = 16;
else
MaxVectorSize = 8;
if (PowerArchitecturePPC64 >= 8) {
if (FLAG_IS_DEFAULT(SuperwordUseVSX)) {
FLAG_SET_ERGO(bool, SuperwordUseVSX, true);
}
} else {
if (SuperwordUseVSX) {
warning("SuperwordUseVSX specified, but needs at least Power8.");
FLAG_SET_DEFAULT(SuperwordUseVSX, false);
}
}
MaxVectorSize = SuperwordUseVSX ? 16 : 8;
#endif
// Create and print feature-string.