On 09/12/2012 09:10 AM, Yufeng Zhang wrote: > aarch64_set_frame_expr (gen_rtx_SET > (Pmode, > stack_pointer_rtx, > - gen_rtx_PLUS (Pmode, stack_pointer_rtx, > + gen_rtx_PLUS (Pmode, cfa_reg, > GEN_INT (offset))));
We'd prefer to use plus_constant (Pmode, cfa_reg, offset) instead of the explicit call to gen_rtx_PLUS and GEN_INT. It would appear that the entire aarch64.c file ought to be audited for that. Also, use of the REG_CFA_* notes is strongly encouraged over use of REG_FRAME_RELATED_EXPR. There's all sorts of work involved in turning R_F_R_E into R_CFA_* notes, depending on a rather large state machine. This state machine was developed when only prologues were annotated for unwinding, and therefore one cannot expect it to work reliably for epilogues. A long-term goal is to convert all targets to use R_CFA_* exclusively, as that preserves much more information present in the structure of the code of the prologue generator. It means less work within the compiler, and eventually being able to remove a rather large hunk of state-machine code. r~