This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for 991213-3.c in new arm backend
- To: Nick Clifton <nickc at cygnus dot com>
- Subject: Re: Fix for 991213-3.c in new arm backend
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Thu, 09 Mar 2000 11:31:10 +0000
- Cc: gcc-patches at gcc dot gnu dot org
- Cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
> Hi Guys,
>
> I am about to apply the following patch to fix the failure of gcc
> testcase compile/991213-3.c in the new arm backend. The testcase
> looks like this:
>
> int jump () { goto * (int (*) ()) 0xbabebec0; }
>
> and the expand for the ARM was failing to force the address into a
> register.
I think it would be far better to restrict the indirect_jump expander's
predicate to just s_register_operand (a subset of register_operand). The
cse/combine patches can then generate the extended forms of indirect jump
(eg from an address in memory) that are supported in ARM mode.
ergo:
;; Basic form supported by both targets.
(define_expand "indirect_jump"
[(set (pc)
(match_operand:SI 0 "s_register_operand" ""))]
"TARGET_EITHER"
""
)
R.