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]

Re: [PATCH] config/h8300/h8300.c: Regress part of the original commit for fixing issue


On 01/12/15 10:01, Jeff Law wrote:
This indicates a violation of the type safety invariants we're adding to
GCC.  Simply changing the code to use rtx rather than rtx_insn is
probably a step in the wrong direction.

Part of the problem here is that RTX_FRAME_RELATED_P is valid on both
rtx_insn and rtx objects.  That's something we'll have to fix as the
type safety work moves forward, assuming we continue towards the goal of
totally separating rtx and rtx_insn objects.

Returning to the code in h8300.c, we have "F" which assumes its argument
is an rtx_insn.  We should never be calling "F" will anything other than
an rtx_insn argument.  The calls from "Fpa" are the only violators of
that invariant.

Given that the vectors inside the PARALLEL will always be rtx objects
and that we always want to set RTX_FRAME_RELATED on those objects, it
seems that we could just replace the call to "F" in "Fpa" with

RTX_FRAME_RELATED_P (XVECEXP (par, 0, i)) = 1;


That simplifies the code and removes a bogus as_a cast.

Can you try that and report back to me?
Nevermind. I went ahead and made this change and verified that libgcc, libquadmath and newlib would build for the h8300-elf configuration.

Jeff


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