Dominik Vogt wrote: > On Mon, Dec 14, 2015 at 04:08:32PM +0100, Ulrich Weigand wrote: > > I don't think that r1 is actually safe here. Note that it may be used > > (unconditionally) as temp register in s390_emit_prologue in certain cases; > > the upcoming split-stack code will also need to use r1 in some cases. > > How about the attached patch? It also allows to use r0 as the > temp register if possible (needs more testing).
This doesn't look safe either. In particular: - you use cfun_save_high_fprs_p at a place where its value might not yet have been determined (when calling s390_get_prologue_temp_regno from s390_init_frame_layout *before* the s390_register_info/s390_frame_info calls) - r0 might hold the incoming static chain value, in which case it cannot be used as temp register > If that's too > much effort, I'm fine with limiting the original patch to r4 to > r2. That seems preferable to me. > > r2 through r4 should be fine. [ Not sure if there will be many (any?) cases > > where one of those is unused but r5 isn't, however. ] > > This can happen if the function only uses register pairs > (__int128). Actually I'm not sure whether r2 and r4 are valid > candidates. Huh? Why not? Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain ulrich.weig...@de.ibm.com