On 10/4/23 01:49, Xianmiao Qu wrote:
From: quxm <xianmiao....@alibaba-inc.com>

When generating CFI directives for the store-pair instruction,
if we add two parallel REG_FRAME_RELATED_EXPR expr_lists like
   (expr_list:REG_FRAME_RELATED_EXPR (set (mem/c:DI (plus:DI (reg/f:DI 2 sp)
     (const_int 8 [0x8])) [1  S8 A64])
     (reg:DI 1 ra))
   (expr_list:REG_FRAME_RELATED_EXPR (set (mem/c:DI (reg/f:DI 2 sp) [1  S8 A64])
     (reg:DI 8 s0))
only the first expr_list will be recognized by dwarf2out_frame_debug
funciton. So, here we generate a SEQUENCE expression of REG_FRAME_RELATED_EXPR,
which includes two sub-expressions of RTX_FRAME_RELATED_P. Then the
dwarf2out_frame_debug_expr function will iterate through all the sub-expressions
and generate the corresponding CFI directives.

gcc/
        * config/riscv/thead.cc (th_mempair_save_regs): Fix missing CFI
        directives for store-pair instruction.

gcc/testsuite/
        * gcc.target/riscv/xtheadmempair-4.c: New test.
THanks.  I pushed this to the trunk.
jeff

Reply via email to