GCC modification for ARM

Thomas Rauscher trauscher at loytec.com
Sat Feb 22 11:38:03 UTC 2003


On Fri, 21 Feb 2003, Joel Sherrill wrote:

>
>
> Charles Steaderman wrote:
> >
> > I am trying to port RTEMS to an ARM7 CPU. Unfortunately, the chip
> > manufacturer has a bug in which data corruption can occur when using DMA
> > when a SWP instruction is executed. I know that RTEMS uses patched
> > compilers and libraries and I was wondering if anyone is familiar enough
> > with GCC to direct me where to make a change to replace the SWP
> > instruction with LDR and STR instructions.
>
> The source for this has to be in gcc-XXX/gcc/config/arm and is probably
> in
> arm.md.  grep there and you might already find an option to switch the
> behavior.
>

Grepping in gcc-3.2/gcc/config/arm indicates that gcc doesn't emit
'swp' or 'swpb' instructions. You'll have to check this for your gcc
version.

For a safe bet also check your executables, like

arm-rtems-elf-objdump -d exefile | grep swp

Thomas.

--
Dipl.-Ing. Thomas Rauscher                 Tel.:   ++43 1 402 08 05 15
                                           Fax:    ++43 1 402 08 05 99
LOYTEC electronics GmbH                    E-mail: trauscher at loytec.com
Stolzenthalergasse 24/3, A-1080 Wien       Web:    http://www.loytec.com




More information about the users mailing list