This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Thanks, Yufeng
* config/aarch64/aarch64.c (aarch64_expand_prologue): For the load-pair with writeback instruction, replace aarch64_set_frame_expr with add_reg_note (REG_CFA_ADJUST_CFA); add new local variable 'cfa_reg' and use it.
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~
Attachment:
gcc-epilogue-cfa-def-reg.patch.v2
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |