Branch: Tag:

2014-01-05

2014-01-05 12:48:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

[sparc] Fixed bug introduced by the svalue renumbering.

The svalue type fields were set from a dirty register when pushing
the zero integer.

Fixes the fatal "Invalid type 120 in svalue at xxxxxxxx.", and similar.

477:    SPARC_STX(reg, SPARC_REG_PIKE_SP,    sparc_pike_sp_bias + OFFSETOF(svalue, u.integer), 1);    } -  if (x != type_word) { +  if (!type_word) { +  reg = SPARC_REG_G0; +  } else if (x != type_word) {    SET_REG(SPARC_REG_I1, type_word); -  +  reg = SPARC_REG_I1;    } -  /* This is safe since type_word is never zero. */ -  /* stw %i1, [ %pike_sp ] */ -  SPARC_STW(SPARC_REG_I1, SPARC_REG_PIKE_SP, sparc_pike_sp_bias, 1); +  /* stw %reg, [ %pike_sp ] */ +  SPARC_STW(reg, SPARC_REG_PIKE_SP, sparc_pike_sp_bias, 1);    sparc_pike_sp_bias += sizeof(struct svalue);    sparc_codegen_state |= SPARC_CODEGEN_SP_NEEDS_STORE;   }