Commit Graph

7 Commits

Author SHA1 Message Date
tom_at_work
f252fd369e Tried to reorganize the ARM define mess in rtl/arm/arm.inc. Instead of requiring to enumerate all possible ARM variants each time a CPU feature is used, add a define of the format CPUARM_HAS_XXX and use that. Note that a better solution would be to properly implement the compiler cpuinfo infrastructure, however that is much more work.
+ CPUARM_HAS_BX is defined if the CPU supports the BX* instruction
  + CPUARM_HAS_REV is defined if the CPU supports the REV instruction. Note that you still have to check for compiler versions > 2.6.0 since the assembler reader of 2.6.0 does not understand that instruction.
  + CPUARM_HAS_IDIV is defined if the CPU supports the sdiv, udiv instructions. Use of this fixes a bug where previously these instruction were only used for armv7-m, while cortex3m cpus also support it.
  + CPUARM_HAS_LDREX is defined if the CPU supports the ldrex/strex instructions. Use of this fixes a bug with armv7(-a) cpus where this path has not been used.
  + SYSTEM_HAS_KUSER_CMPXCHG is defined if the system (mainly OS) support the kuser_cmpxchg functions. Use of this fixes a bug where ARMHF systems did not use it for synchronization (although ARMHF is armv7+ only, i.e. the LDREX path is used anyway)

git-svn-id: trunk@22081 -
2012-08-14 19:45:03 +00:00
masta
c5fbe3bb3b Use bx lr in ARM-RTL for armv5
ARMv5 supports the BX instruction.
BX usually is better supported by Branch Prediction Units than mov pc,lr.

git-svn-id: trunk@21649 -
2012-06-18 16:59:39 +00:00
florian
5fa184c952 + patch by Jeppe Johansen to make use of the div/udiv instruction on arm7m, resolves #20022
* explicitly make symbol addressing PC relative

git-svn-id: trunk@19221 -
2011-09-24 21:41:01 +00:00
Jonas Maebe
fbebd87593 * use BLX instead of "mov r14, r15; mov r15, reg" for a_call_reg on ARMv6
and above, so this also works when calling thumb code (should actually
    also be done for ARMv5T, but we don't have a monicker for that yet)
  * use BX instead of "mov r15, r14" for simple returns from subroutines
    on ARMv6+ to support returning to thumb code from ARM code (idem)

git-svn-id: trunk@14332 -
2009-12-04 22:38:50 +00:00
florian
515774b864 * merged armthum branch
-- Zusammenführen der Unterschiede zwischen Projektarchiv-URLs in ».«:
U    rtl/arm/setjump.inc
A    rtl/arm/thumb2.inc
U    rtl/arm/divide.inc
A    rtl/embedded/arm/stm32f103.pp
U    rtl/inc/system.inc
U    compiler/alpha/cgcpu.pas
U    compiler/sparc/cgcpu.pas
U    compiler/i386/cgcpu.pas
U    compiler/ncgld.pas
U    compiler/powerpc/cgcpu.pas
U    compiler/avr/cgcpu.pas
U    compiler/aggas.pas
U    compiler/powerpc64/cgcpu.pas
U    compiler/x86_64/cgcpu.pas
U    compiler/cgobj.pas
U    compiler/psystem.pas
U    compiler/aasmtai.pas
U    compiler/m68k/cgcpu.pas
U    compiler/ncgutil.pas
U    compiler/rautils.pas
U    compiler/arm/raarmgas.pas
U    compiler/arm/armatts.inc
U    compiler/arm/cgcpu.pas
U    compiler/arm/armins.dat
U    compiler/arm/rgcpu.pas
U    compiler/arm/cpubase.pas
U    compiler/arm/agarmgas.pas
U    compiler/arm/cpuinfo.pas
U    compiler/arm/armop.inc
U    compiler/arm/narmadd.pas
U    compiler/arm/aoptcpu.pas
U    compiler/arm/armatt.inc
U    compiler/arm/aasmcpu.pas
U    compiler/systems/t_embed.pas
U    compiler/psub.pas
U    compiler/options.pas

git-svn-id: trunk@13801 -
2009-10-04 09:03:44 +00:00
florian
6dcdf5bdf4 * tabs/spaces fixed
git-svn-id: trunk@12015 -
2008-11-02 09:41:30 +00:00
daniel
68731ae067 + Assembler implementation of mod/div.
Improves amount of divides from about 230000/s to about 2400000/s on
    ARM920T, 200MHz.

git-svn-id: trunk@9543 -
2007-12-27 17:59:45 +00:00