https://sourceware.org/bugzilla/show_bug.cgi?id=34026

--- Comment #8 from Jens Remus <jremus at linux dot ibm.com> ---
Reviewing the code I come to the conclusion that Indu or I need to fix the
following in SFrame generation.  Not sure what the correct approach is for the
individual cases though.

1)
.cfi_startproc simple
.cfi_def_cfa_register <register>

=> If SP/FP or flexible FDE, create a FRE and store CFA base register. 
Otherwise ignore.  Unsure what to do about the missing CFA offset.  Initialize
to 0?

2)
.cfi_startproc simple
.cfi_def_cfa_offset <offset>

=> Create a FRE and store CFA offset.  Unsure what to do about the missing CFA
base register.  Initialize to 0?

3)
.cfi_startproc simple
.cfi_adjust_cfa_offset <offset>

=> Initially I thought to warn with ".cfi_adjust_cfa_offset without prior CFA
offset", but .eh_frame generation does handle this as if the CFA offset was 0
and emits "DW_CFA_def_cfa_offset: <offset>".  Therefore this should be treated
likewise.  Same as for case 2 I am unsure what to do about the missing CFA base
register.  Initialize to 0?  Both cases should be handled the same for
consistency.

4)
.cfi_startproc simple
.cfi_offset <register>, <offset>

=> Initially I thought to warn with ".cfi_offset without prior CFA definition",
but .eh_frame generation does emit "DW_CFA_offset: <register> at cfa+<offset>".
 Not sure if that is valid .eh_frame, as there is no CFA definition.  Given
.sframe generation does not handle .cfi_startproc simple; .cfi_remember_state,
it should be fine to warn?

5)
.cfi_startproc
.cfi_restore_state

=> .sframe generation can either silently return NOTREPRESENTED or warn with
".cfi_restore_state without prior .cfi_remember_state".  The CFI directive
processing already errors with "CFI state restore without previous remember".

6)
.cfi_startproc simple
.cfi_restore <register>

=> .eh_frame emits "DW_CFA_restore: <register>.  If FP/RA warn with "{FP|RA}
register <register> in .cfi_restore without prior SFrame FRE state"?

7) 
.cfi_startproc simple
.cfi_undefined <register>

=> For SP/FP there is already a warning.  For RA warn with "RA register
<register> in .cfi_undefined without prior SFrame FRE state"?

8)
.cfi_startproc simple
.cfi_negate_ra_state

=> Warn with ".cfi_negate_ra_state without prior SFrame FRE state"?

9)
.cfi_startproc simple
.cfi_escape with DW_CFA_def_cfa_expression

10)
.cfi_startproc simple
.cfi_escape with DW_CFA_expression

11)
.cfi_startproc simple
.cfi_escape with DW_CFA_GNU_args_size

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to