Commit Graph

22 Commits

Author SHA1 Message Date
florian
835375e7e0 * properly fix #41161 2025-04-14 22:41:18 +02:00
florian
9355e703d7 * change some getglobaldatalabel into getlocaldatalabel to simplify code if pic is used 2025-01-13 22:34:31 +01:00
J. Gareth "Curious Kit" Moreton
6f24c8b4ef * x86: Code generation fixes where FLAGS
register is not properly allocated.
2022-04-27 20:46:32 +00:00
florian
a8b387a166 + make use of avx-512 instructions vcvtuis2s* if possible
git-svn-id: trunk@47078 -
2020-10-10 21:08:13 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +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
Jonas Maebe
687bb15299 * renamed getdatalabel() to getglobaldatalabel
git-svn-id: branches/hlcgllvm@30336 -
2015-03-27 21:25:34 +00:00
Jonas Maebe
edd42aa42a * moved subsetref/reg and bit_set/test support from cgobj to hlcgobj for
future use by high level code generator targets
   o this in turn required that all a_load*_loc* methods are called via
     hlcg rather than via cg, since a location can be a subsetref/reg and
     and those are no longer handled in tcg
   o that then required moving several force_location_* routines into
     thlcg because they use a_load_loc*, but did not take tdef size
     parameters (which are required by the thlcg a_load_loc* routines)
   o the only practical consequence is that from now on, you have to
     use hlcg.location_force_mem/reg() (fpureg not yet) and
     hlcg.gen_load_loc_cgpara() instead of the removed versions from ncgutil,
     and hlcg.a_load*loc*() instead of cg.a_load*loc* if a subsetref/reg
     might be involved

git-svn-id: trunk@21287 -
2012-05-13 12:33:10 +00:00
sergei
7d99f95c45 * Always create a section before emitting data to current_asmdata.asmlists[al_typedconsts]. Without it, such data ends up in sections created elsewhere, creating very non-obvious dependencies on other parts of compiler.
git-svn-id: trunk@17816 -
2011-06-24 02:05:56 +00:00
Jonas Maebe
f8369032da * same fixes as in r16255 for x86_64 (fixes webtbs/tw17714 on Darwin/x86_64)
git-svn-id: trunk@16508 -
2010-12-05 16:45:31 +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
Jonas Maebe
974c240266 * also use sse2 instructions to convert int to real on i386
for (types convertable to) longint
  * fixed expectloc for x86_64 int_to_real if result is in mmreg

git-svn-id: trunk@9423 -
2007-12-09 18:10:23 +00:00
florian
1cb5d2a603 * some missing make_simple_ref calls added, resolves #8948
git-svn-id: trunk@8904 -
2007-10-21 20:19:04 +00:00
peter
ad944fd198 * move x86_64 specific int_to_real conversion to nx64cnv
* fix x86_64 code for none loc_register/loc_reference location

git-svn-id: trunk@8844 -
2007-10-18 20:46:44 +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
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
465aa5851b * several fixes to compile x86-64 system 2004-02-05 01:24:08 +00:00
florian
f84979f02d * x86-64 compilation fixed 2003-12-24 00:33:10 +00:00
florian
91bbc7bea3 * error when address of an abstract method is taken
* fixed some x86-64 problems
  * merged some more x86-64 and i386 code
2003-04-30 20:53:32 +00:00