8221343: x86_32 crashes on startup with "_hwm out of range"

Reviewed-by: thartmann, kvn
This commit is contained in:
Claes Redestad 2019-03-25 20:57:07 +01:00
parent 975c61d4c9
commit 06656bd270

View File

@ -416,14 +416,20 @@ static RegMask *init_input_masks( uint size, RegMask &ret_adr, RegMask &fp ) {
return rms;
}
//---------------------------init_first_stack_mask-----------------------------
#define NOF_STACK_MASKS (3*6+5)
// Create the initial stack mask used by values spilling to the stack.
// Disallow any debug info in outgoing argument areas by setting the
// initial mask accordingly.
void Matcher::init_first_stack_mask() {
// Allocate storage for spill masks as masks for the appropriate load type.
RegMask *rms = (RegMask*)C->comp_arena()->Amalloc_D(sizeof(RegMask) * (3*6+5));
RegMask *rms = (RegMask*)C->comp_arena()->Amalloc_D(sizeof(RegMask) * NOF_STACK_MASKS);
// Initialize empty placeholder masks into the newly allocated arena
for (int i = 0; i < NOF_STACK_MASKS; i++) {
new (rms + i) RegMask();
}
idealreg2spillmask [Op_RegN] = &rms[0];
idealreg2spillmask [Op_RegI] = &rms[1];