Commit Graph

56 Commits

Author SHA1 Message Date
florian
637976e83f * patch by Marģers to unify internal error numbers, resolves #37888
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
florian
7c2c8581b7 * get rid of fpu_vfp_first/last hack
git-svn-id: trunk@44716 -
2020-04-13 17:27:46 +00:00
florian
38c32bcada * reorganized arm cpu flags
git-svn-id: trunk@44703 -
2020-04-12 14:24:56 +00:00
florian
3a1ecd4f16 * fix tarminlinenode.first_sqrt_real
git-svn-id: trunk@42685 -
2019-08-13 22:12:53 +00:00
florian
85edf1c1eb * reworked arm vfp capability handling to use fpu_capabilites
git-svn-id: trunk@42679 -
2019-08-13 18:41:15 +00:00
florian
46bac33a2d + fpu_capabilities for arm
* some code converted to use fpu_capabilities

git-svn-id: trunk@42536 -
2019-07-30 21:04:28 +00:00
florian
b3ed34592f + software handling of exceptions on arm
* reworked software handling of exceptions so they can be check lazily

git-svn-id: trunk@42525 -
2019-07-28 21:06:36 +00:00
Jonas Maebe
4686f61002 * keep track of the temp position separately from the offset in references,
so that they can still be freed after the reference has been changed
    (e.g. in case of array indexing or record field accesses) (mantis #33628)

git-svn-id: trunk@38814 -
2018-04-22 17:03:16 +00:00
Jonas Maebe
a25ebbba3e + added volatility information to all memory references
o separate information for reading and writing, because e.g. in a
     try-block, only the writes to local variables and parameters are
     volatile (they have to be committed immediately in case the next
     instruction causes an exception)
   o for now, only references to absolute memory addresses are marked
     as volatile
   o the volatily information is (should be) properly maintained throughout
     all code generators for all archictures with this patch
   o no optimizers or other compiler infrastructure uses the volatility
     information yet
   o this functionality is not (yet) exposed at the language level, it
     is only for internal code generator use right now

git-svn-id: trunk@34996 -
2016-11-27 18:17:37 +00:00
pierre
1e9491550d nutils.pas: Add new procedure:
procedure node_change_local_switch(p : tnode;cs : tlocalswitch;enable : boolean);
    to add/remove cs local switch from all p tnode tree localsettings.

    modify second_prefetch implementation in arm, ppcgen and x86 subdirectories
    to use node_change_local_settings to temporarily disabled
    checkpointer local switch, as prefetch is allowed even on unaccessible addresses.
    (previous code was buggy because I frogot that each node has it own localswitches).

git-svn-id: trunk@34576 -
2016-09-29 21:34:34 +00:00
pierre
fe4e2956c6 Disable checkpointer call when handling left of prefetch node
git-svn-id: trunk@34559 -
2016-09-24 07:34:10 +00:00
yury
3c6d4f1ee2 * Removed unused vars.
git-svn-id: trunk@33308 -
2016-03-21 09:21:24 +00:00
florian
1c067e96bf * fix VFPv4 support
git-svn-id: trunk@33182 -
2016-03-06 13:33:16 +00:00
florian
43746685a5 + fma support for arm
git-svn-id: trunk@33181 -
2016-03-06 13:33:14 +00:00
yury
432248cbf1 * Removed lot of unused vars.
git-svn-id: trunk@31732 -
2015-09-17 12:48:58 +00:00
Jonas Maebe
9079227c56 * don't give an internalerror when trying to prefetch a regvar or even
something without a location at all; it's a hint/optional operation,
    so if there's nothing to prefetch just don't do anything
    (mantis #27811)

git-svn-id: trunk@30502 -
2015-04-08 20:35:13 +00:00
Jeppe Johansen
60b3ea8038 Use proper syntax when emitting UAL VFP instructions for all postfix types.
Fixed postfix of VSQRT instruction.

git-svn-id: branches/laksen/armiw@29591 -
2015-02-01 09:38:45 +00:00
Jeppe Johansen
9e5979e8be Implemented UAL syntax support in the ARM assembler reader. Can be toggled with a field for now, but not implemented yet. Still using pre-UAL syntax for now.
Switched codegeneration of VFPv2 and VFPv3 to use UAL mnemonics and syntax.
Updated VFP code in RTL to use UAL syntax too.
Added preliminary ELF support for ARM.
Added support for linking of WinCE COFF files. Should work for with a standard ARMv4-I target.

git-svn-id: branches/laksen/armiw@29247 -
2014-12-10 20:44:34 +00:00
Jeppe Johansen
96b73b0076 Fixed generation of abs calls for thumb and thumb-2 targets.
git-svn-id: trunk@27926 -
2014-06-10 17:48:09 +00:00
sergei
68b97bee5a * ARM: Implemented floating-point negation and abs() for softfloat using integer instructions. Fixes webtbs/tw4534.pp, and also yields much faster code than existing implementation.
Background: these operations are defined as flipping or clearing the upper bit of number, respectively, and never result in precision loss or raise floating-point exceptions.

git-svn-id: trunk@27411 -
2014-03-31 15:03:15 +00:00
Jonas Maebe
4065483a50 * completed thlcgobj.location_force_fpureg(), use it everywhere and removed
ncgutil/thlcg2ll.location_force_fpureg()

git-svn-id: trunk@27071 -
2014-03-10 09:01:05 +00:00
Károly Balogh
2c49af3191 added missing closing parentheses
git-svn-id: trunk@25413 -
2013-09-04 14:56:53 +00:00
florian
7ef37b5d2a * PLD is not supported by thumb
git-svn-id: trunk@25407 -
2013-09-03 21:09:41 +00:00
Jonas Maebe
5051453806 + support for LOC_(C)MMREGISTER in hlcg
o migrated location_force_mmregister_scalar from ncgutil to hlcgobj

git-svn-id: trunk@24661 -
2013-05-31 12:05:14 +00:00
florian
47d43750e4 * remove unused units from uses statements
git-svn-id: trunk@23306 -
2013-01-03 23:07:09 +00:00
masta
e982f4789d Removed unused register allocation in tarminlinenode.second_abs_long
git-svn-id: trunk@23047 -
2012-11-22 19:20:39 +00:00
Jeppe Johansen
a8f9b0dac4 Added initial support for the Cortex-M4F FPv4_S16 FPU
git-svn-id: branches/laksen/arm-embedded@22597 -
2012-10-08 20:10:45 +00:00
florian
45383fd32d + a lot missing flag allocs/deallocs added
git-svn-id: trunk@22201 -
2012-08-23 08:54:52 +00:00
florian
354cac2bb6 + completed arm architectures
* ldrd/strd and pld collected under the edsp define

git-svn-id: trunk@22104 -
2012-08-17 10:37:27 +00:00
florian
7588896775 * make use of cpuflags in the arm compiler
* armv5te architecture

git-svn-id: trunk@22103 -
2012-08-17 10:37:17 +00:00
masta
59c726c829 Support ABS intrinsic on ARM
This code will generate the following sequence on arm:
r1=dst
r0=src

movs r1, r0
rsbmi r1, r0, #0

movs will set the N-flag when the MSB of r0 is set, if it is set, rsb
will calculate dst:=0-src;

git-svn-id: trunk@21678 -
2012-06-21 20:12:36 +00:00
Jonas Maebe
6ba8dc7146 + support for the ARM hard float EABI on Linux (patch by Peter Green):
o new eabihf (hard float) abi
   o vfpv3_d16 variant of VFP (default variant used by EABI assemblers: VFPv3
     with only 16 double registers instead of 32) and pass it to GNU as
   o make the odd numbered single precision floating point VFP registers
     available for explicit allocation for use by the calling convention
  * fixed copy/paste error in stdname of S30 register
  -> use -dFPC_ARMHF to create an ARM eabi hard float compiler
  (mantis #21554)

git-svn-id: trunk@20660 -
2012-03-29 20:50:09 +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
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
yury
b9431c876e * More complete fix for bug #10515. Thanks to Jonas for suggestion.
* Fixed warnings in tcnvint6.pp

git-svn-id: trunk@10765 -
2008-04-23 08:22:27 +00:00
yury
adaeb0fc73 * Strip result if inc/dec is performed in register on value less than 32-bit on ARM. (bug #10515)
* Updated tcnvint6 to test this issue.

git-svn-id: trunk@10753 -
2008-04-22 08:45:50 +00:00
peter
6b8aed593f * remove registers{int/mmx/fpu} from firstpass
* small cleanups of unused variables in firstpass
  * node_resources_fpu() created to get an approximation of the
    required fpu registers
  * for the moment use node_complexity in the CG until the
    node_resource_int() is created

git-svn-id: trunk@8655 -
2007-09-26 21:12:01 +00:00
yury
09fa6b5893 * Fixed Abs and Sqrt in hardfloat mode on arm.
git-svn-id: trunk@7980 -
2007-07-08 08:17:32 +00:00
florian
ffd79553a0 + prefetch support for arm
git-svn-id: trunk@6561 -
2007-02-19 17:27:07 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
3078a1927f * remove ttype
* rename old ttype variables *type to *def
  * rename resulttypepass to pass_typecheck
  * rename pass_2 to pass_generate_code

git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +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
florian
a8f2d702a7 * fixed code generation for sqrt and sqr in softfloat mode
git-svn-id: trunk@1038 -
2005-09-02 12:31:50 +00:00
florian
adb193497d + softfloat support for wince
* more units are build for wince

git-svn-id: trunk@959 -
2005-08-28 12:40:43 +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
c85ed49700 * arctan, sin and cos are done in software on the arm 2005-01-06 12:11:03 +00:00
florian
73c30d6579 * fixed arm compilation with cgutils
* ...
2004-11-01 17:41:28 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00