This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: arm-pe: Do not generate type 2 LDM instructions with writeback
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Thu, 13 Mar 2003 12:14:47 +0000
- Subject: Re: arm-pe: Do not generate type 2 LDM instructions with writeback
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Hi Guys,
>
> Whilst looking over the arm-pe port I found that it was generating
> LDM instructions using writeback "sp!" and CPSR update "^" which is
> UNPREDICTABLE if the PC is not one of the registers being loaded.
> The following patch takes care of this problem and fixes quite a few
> unexpected failures in the gcc testsuite. (There are still lots
> more that need to be looked at though - maybe one day).
>
GCC should never be generating a forced user-bank accessing instruction (^
on non-pc loading) -- at least, it won't ever be doing so via these
functions -- so I think the test for write-back is redundant. That is,
emit ^ if PC is in the list and !apcs-32, but not otherwise.
> Cheers
> Nick
>
> PS. Sorry Richard - this patch adds more code :-(
So not quite as much new code :-)
R.
PS. Is the pe port using apcs-26? If so, why?