Commit Graph

34 Commits

Author SHA1 Message Date
florian
21b94f675f + add for MLA the same register interferences as for MUL
* register interferences for MUL/MLA are only needed for less than ARMv6

git-svn-id: trunk@21385 -
2012-05-24 19:14:58 +00:00
florian
d6ad7721e6 * patch by Jeppe Johansen to avoid corruption of frame/stack pointer by pre/post indexed operations, resolves #19679
git-svn-id: trunk@18234 -
2011-08-16 22:43:30 +00:00
Jonas Maebe
780e75bfac o patch by Jeppe Johansen to fix mantis #17472:
* generate add.w instead of add for thumb-2 in case one of the registers
      is > r8
    * add register interferences for the "add" instruction so the register
      allocator can detect invalid instruction forms (even for assembler code)
    * fixed error in thumb2.inc detected by the previous change

git-svn-id: trunk@16633 -
2010-12-24 15:54:39 +00:00
Jonas Maebe
f302fcdc98 + TSubRegisterSet definition forgotten to commit in r15952
* fixed compilation on non-x86 platforms after r15952

git-svn-id: trunk@15956 -
2010-09-09 08:48:02 +00:00
Jonas Maebe
d1538ab023 o added ARM VPFv2/VFPv3 support:
+ RTL support:
      o VFP exceptions are disabled by default on Darwin,
        because they cause kernel panics on iPhoneOS 2.2.1 at least
      o all denormals are truncated to 0 on Darwin, because disabling
        that also causes kernel panics on iPhoneOS 2.2.1 (probably
        because otherwise denormals can also cause exceptions)
    * set softfloat rounding mode correctly for non-wince/darwin/vfp
      targets
    + compiler support: only half the number of single precision
      registers is available due to limitations of the register
      allocator
    + added a number of comments about why the stackframe on ARM is
      set up the way it is by the compiler
    + added regtype and subregtype info to regsets, because they're
      also used for VFP registers (+ support in assembler reader)
    + various generic support routines for dealing with floating point
      values located in integer registers that have to be transferred to
      mm registers (needed for VFP)
    * renamed use_sse() to use_vectorfpu() and also use it for
      ARM/vfp support
    o only superficially tested for Linux (compiler compiled with -Cpvfpv6
      -Cfvfpv2 works on a Cortex-A8, no testsuite run performed -- at least
      the fpu exception handler still needs to be implemented), Darwin has
      been tested more thoroughly
  + added ARMv6 cpu type and made it default for Darwin/ARM
  + ARMv6+ implementations of atomic operations using ldrex/strex
  * don't use r9 on Darwin/ARM, as it's reserved under certain
    circumstances (don't know yet which ones)
  * changed C-test object files for ARM/Darwin to ARMv6 versions
  * check in assembler reader that regsets are not empty, because
    instructions with a regset operand have undefined behaviour in that
    case
  * fixed resultdef of tarmtypeconvnode.first_int_to_real in case of
    int64->single type conversion
  * fixed constant pool locations in case 64 bit constants are generated,
    and/or when vfp instructions with limited reach are present

  WARNING: when using VFP on an ARMv6 or later cpu, you *must* compile all
    code with -Cparmv6 (or higher), or you will get crashes. The reason is
    that storing/restoring multiple VFP registers must happen using
    different instructions on pre/post-ARMv6.

git-svn-id: trunk@14317 -
2009-12-03 22:46:30 +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
Jonas Maebe
7d459cf12a * the compiler now explicitly keeps track of the minimally guaranteed
alignment for each memory reference (mantis #12137, and
    test/packages/fcl-registry/tregistry1.pp on sparc). This also
    enables better code generation for packed records in many cases.
  o several changes were made to the compiler to minimise the chances
    of accidentally forgetting to set the alignment of memory references
    in the future:
    - reference_reset*() now has an extra alignment parameter
    - location_reset() can now only be used for non LOC_(C)REFERENCE,
      use location_reset_ref() for those (split the tloc enum so the
      compiler can catch errors using range checking)

git-svn-id: trunk@12719 -
2009-02-08 13:00:24 +00:00
florian
a800b2a3d3 * fixed interference generation for top_local
git-svn-id: trunk@6343 -
2007-02-04 20:43:31 +00:00
florian
b16b9d5251 * don't load a spilled register between mov lr,pc mov pc,<reg>
git-svn-id: trunk@6273 -
2007-01-30 21:34:26 +00:00
yury
496e19c9c2 * fixed ARM register allocation problem when additional register is used for spilling.
git-svn-id: trunk@5659 -
2006-12-21 14:18:03 +00:00
yury
96bfb7ce97 * don't destroy both r11 and r13 when copying data.
git-svn-id: trunk@5485 -
2006-11-26 13:18:27 +00:00
florian
b77a5016ca * don't destroy r13 when copying data
git-svn-id: trunk@5470 -
2006-11-24 21:55:23 +00:00
florian
964a98edca * fixed spilling with large offsets
git-svn-id: trunk@5463 -
2006-11-23 19:49:27 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
a3ab2053c9 * support multiple asmlabel types, renamed getlabel to
getjumplabel and added type para to getlabel for specific types
  * moved lineinfo generation from assemble and aggas to dbgstabs

git-svn-id: trunk@1120 -
2005-09-18 21:16:10 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
22d9294ab3 + overflow checking for the arm 2005-02-13 18:55:19 +00:00
florian
73c30d6579 * fixed arm compilation with cgutils
* ...
2004-11-01 17:41:28 +00:00
florian
60f0434585 * fixed compilation of arm compiler 2004-10-24 07:54:25 +00:00
florian
5062c04096 * fixed problem with cpu interferences 2004-07-03 19:29:14 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
florian
16366a944c * spilling problem fixed
* handling of floating point memory references fixed
2004-03-14 16:15:39 +00:00
florian
10e765329d * fixed arm compilation
* cleaned up code generation for exported linux procedures
2004-03-06 20:35:19 +00:00
florian
1e9e0b0e35 * fixed compilation problem 2004-02-08 23:06:59 +00:00
florian
de4fa4e7e7 * fixed another couple of arm bugs 2004-01-28 15:36:46 +00:00
florian
35110d8ef5 * fixed several arm issues 2004-01-26 19:05:56 +00:00
florian
a9d9a15e20 * fixed ARM for new reg. allocation scheme 2003-11-02 14:30:03 +00:00
florian
8f66389b46 * improved arm code generation
* move some protected and private field around
  * the temp. register for register parameters/arguments are now released
    before the move to the parameter register is done. This improves
    the code in a lot of cases.
2003-09-11 11:54:59 +00:00
florian
0d3832776f * first bunch of adaptions of arm compiler for new register type 2003-09-04 00:15:28 +00:00
florian
f3266351dc + started to implement FPU support for the ARM
* fixed a lot of other things
2003-08-25 23:20:38 +00:00
florian
2b83637905 * several arm related stuff fixed 2003-08-16 13:23:01 +00:00