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: arm-pe: Do not generate type 2 LDM instructions with writeback


> 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?



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