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]

PATCH, nds32] Committed: Fix wrong data flow when building nds32 target with --enable-checking=yes.


Hi, all,

The nds32 target has two kinds of instructions for returning to the caller.
One is normal 'ret' instruction which takes $lp as return address;
and the other is 'pop25' instruction which perform registers pop and use $lp
as return address in a single step.

However, the current design of 'pop25' on trunk is incomplete.
We lost "return" rtx semantic in the pattern so that gcc will get wrong
data flow across pop25 if we configure it with --enable-checking=yes.

To fix this issue, we have dummy pattern 'pop25return' to tell gcc that
there is a return behavior after pop25 instruction.

This patch was committed last week before stage 4:
  https://gcc.gnu.org/r219710

gcc/ChangeLog


2015-01-16 Chung-Ju Wu <jasonwucj@gmail.com>

        * config/nds32/constants.md (UNSPEC_VOLATILE_POP25_RETURN): New.
        * config/nds32/nds32.md (pop25return): New.
        * config/nds32/nds32.c (nds32_expand_epilogue_v3pop): Emit
        pop25return pattern.


Best regards,
jasonwucj

Attachment: 0007-Add-dummy-pattern-pop25return-to-tell-gcc-there-is-a.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]