https://sourceware.org/bugzilla/show_bug.cgi?id=32879
Jens Remus <jremus at linux dot ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jremus at linux dot ibm.com --- Comment #1 from Jens Remus <jremus at linux dot ibm.com> --- >From a s390x perspective there are a few issues with the tentative patch: 1. On s390x the initial CFA offset at function entry is 160 instead of 0. Assuming a value of 0 is therefore wrong. 2. Using the register 6 as CFA base register in the test does not work for all architectures. At least on s390x this is none of SP and FP and therefore the test fails with: Warning: skipping SFrame FDE; non-SP/FP register 6 in .cfi_def_cfa_register A solution for the first issue may be to use the CFA offset of the current FRE, if there is no last FRE (= previous FRE?): > diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c > @@ -1024,6 +1024,7 @@ sframe_xlate_do_def_cfa_register (struct > sframe_xlate_ctx *xlate_ctx, > struct sframe_row_entry *last_fre = xlate_ctx->last_fre; > /* Get the scratchpad FRE. This FRE will eventually get linked in. */ > struct sframe_row_entry *cur_fre = xlate_ctx->cur_fre; > + offsetT cfa_offset = 0; offsetT cfa_offset; > > gas_assert (cur_fre); > /* Define the current CFA rule to use the provided register (but to > @@ -1038,7 +1039,9 @@ sframe_xlate_do_def_cfa_register (struct > sframe_xlate_ctx *xlate_ctx, > return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented. */ > } > sframe_fre_set_cfa_base_reg (cur_fre, cfi_insn->u.r); > - sframe_fre_set_cfa_offset (cur_fre, last_fre->cfa_offset); > + if (last_fre) > + cfa_offset = last_fre->cfa_offset; else cfa_offset = cur_fre->cfa_offset; > + sframe_fre_set_cfa_offset (cur_fre, cfa_offset); > cur_fre->merge_candidate = false; > > return SFRAME_XLATE_OK; At least that causes the correct initial CFA offset of 160 to be picked up on s390x. But maybe cur_fre->merge_candidate needs to be factored in as well, if both last_fre and curr_fre exist? -- You are receiving this mail because: You are on the CC list for the bug.