Commit Graph

155 Commits

Author SHA1 Message Date
pierre
1b1fe68f92 Fix aarch64 cycle after constant parser simplification change in rev 35229-35230
git-svn-id: trunk@35239 -
2017-01-05 13:41:44 +00:00
Jonas Maebe
880d438704 * renamed t<cpuname>procinfo to tcpuprocinfo for all targets, so we can
inherit from it for LLVM without a thousand ifdefs

git-svn-id: trunk@35141 -
2016-12-16 22:41:21 +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
86876ed114 * MaybeRecordOffset: initialise "mangledname" variable
git-svn-id: trunk@34857 -
2016-11-09 19:51:36 +00:00
Jonas Maebe
74a49b5f91 * restructured the the TExternalAssembler constructors so that the
hack for the Jasmin descendent is no longer needed

git-svn-id: trunk@34852 -
2016-11-09 19:51:20 +00:00
pierre
89c1b68b14 * Delete regvars unit.
This unit was empty unless OLDREGVARS macro was set,
    but this does not compile and no change has been made since 2011.

  * Remove regvars from all _USES clauses.

git-svn-id: trunk@34808 -
2016-11-06 14:01:39 +00:00
Jonas Maebe
f891788a86 * simplification of and fix for AArch64 cpupara.is_hfa_internal() (patch by
modulo7, mantis #30381)
   o check for array elements of size 0 does not make sense after we've
     established it's an array of floats
   o since the recursive call to is_hfa_internal() already checks for
     floats, we don't have to do it before calling it again for the
     elements of an array
   o set the result to "true" if the array is small enough to be a HFA

git-svn-id: trunk@34293 -
2016-08-12 16:53:02 +00:00
Jonas Maebe
aa1be3276f - removed default value of _typ parameter of TAsmData.(Weak)RefAsmSymbol():
it was AT_NONE, which is invalid and should never be used
  * explicitly pass the correct value for all calls to those methods elsewhere
    in the compiler

git-svn-id: trunk@34250 -
2016-08-05 07:09:16 +00:00
Jonas Maebe
a0efde8167 * automatically generate necessary indirect symbols when a new assembler
symbol is defined
   o removed all places where AB_INDIRECT symbols were explicitly generated
   o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
   o for some symbols an indirect symbol is always required (because they are
     dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type

git-svn-id: trunk@34165 -
2016-07-20 20:53:03 +00:00
Jonas Maebe
1cb8c0d00c * specify the def of assembler level symbols defined via
tasmdata.DefineAsmSymbol() and all routines that call it
   o will be used to automatically generate AB_INDIRECT sybols when
     necessary

git-svn-id: trunk@34164 -
2016-07-20 20:52:59 +00:00
Jonas Maebe
8d77de6b22 - removed InsertPData leftover from ARM copy of this file
git-svn-id: trunk@34162 -
2016-07-20 20:52:53 +00:00
Jonas Maebe
0ed6c3d80e * also use the last floating point parameter register on AArch64 in case of
a HFA type (which in practice also applies to plain floating point types)
    (patch by Alfred, mantis #30207)

git-svn-id: trunk@33922 -
2016-06-05 20:18:24 +00:00
Jonas Maebe
1feb062f7d * similar change as in r33393 but now for a_load_reg_ref_unaligned(), although
it's unlikely it would ever cause a problem there

git-svn-id: trunk@33594 -
2016-05-01 12:35:06 +00:00
Jonas Maebe
2a1f2b9fd9 * fixed a_load_regconst_subsetreg_intern() when loading a 32 bit register
to a non-zero bit offset in a subsetreg (mantis #29933)

git-svn-id: trunk@33498 -
2016-04-13 17:09:31 +00:00
Jonas Maebe
8c0d9b581c * don't write the destination register in a_load_ref_reg_unaligned() before
the reference has been used for the last time, as the destination
    register could be the base or index register of the reference

git-svn-id: trunk@33393 -
2016-03-30 20:04:31 +00:00
Jonas Maebe
322493c195 * fixed overflow checking on AArch64 for signed multiplications with zero
(mantis #29912)

git-svn-id: trunk@33380 -
2016-03-29 09:50:42 +00:00
Jonas Maebe
73a303c899 * no need to call maybeadjustresult() after performing a 64 bit operation
git-svn-id: trunk@33379 -
2016-03-29 09:50:39 +00:00
Jonas Maebe
fa3b0ca312 * support marking defs created via the getreusable*() class methods as
"don't free even if not registered"; use for defs that may not be written
    to a ppu file, but that must nevertheless survive the compilation of the
    current module
  * mark all defs created for para locations as "don't free even if not
    registered", because we don't discard and recalculate all para locations
    after a module has been compiled (since that's not needed)
   o solves issues if the paralocations for a routine in the interface of
     unit A are calculated while the implementation of unit B gets
     compiled, and a new reusable type is allocated at that point which
     is not used anywhere else (after r32160)

git-svn-id: trunk@32235 -
2015-11-04 20:46:18 +00:00
Jonas Maebe
7c594b0288 + added support for using Clang as an assembler, and make it the default
for all non-ppc(32/64) Darwin platforms
   o pass the macosx-version-min/iphoneos-version-min to clang as an assembler,
     so that it properly sets this information starting with Xcode 7 (solves
     errors when targeting the iOS simulator, and warnings about object files
     being compiled for a different OS X version when targeting (Mac) OS X)
   o the old assembler is still selectable via -Aas-darwin (required with
     Xcode 3.1.x and older)
   o since the first Xcode version that shipped with Clang is Xcode 3.2, which
     is available for Mac OS X 10.6, most users should not encounter any issues
     with the new default (in fact, it fixes some tests for x86 because Clang
     supports some instructions that "as" doesn't). Clang does not support
     Stabs however, so -gs does require the use of -Aas-darwin

git-svn-id: trunk@31830 -
2015-09-25 18:31:54 +00:00
Jonas Maebe
1131b08d6d * changed idtext of as_darwin to AS-DARWIN, so it can be explicitly
selected via -Aas-darwin (since it compares uppercased strings)

git-svn-id: trunk@31808 -
2015-09-24 06:49:29 +00:00
Jonas Maebe
8155d759dc - reverted r31806, it breaks building on non-Darwin (mantis #28716)
git-svn-id: trunk@31807 -
2015-09-24 06:44:12 +00:00
Jonas Maebe
c0b451e788 - removed as_darwin, since there is no difference with as_gas (there is no
GNU as from binutils for Darwin, and Apple's "as" is based on an old
    version of GNU as)
   o this will not cause any backward compatibility problems, as the
     previous identifier for as_darwin was "AS-Darwin" and the compiler
     compared the uppercase value of the -A parameter to the identifier,
     so it was not explicitly selectable earlier. The new name is "AS",
     so it is explicitly selectable via -Aas like on other platforms.

git-svn-id: trunk@31806 -
2015-09-23 21:25:38 +00:00
Jonas Maebe
392af652df * let de syntax for got/page offsets depend on the target OS rather than
on the assembler

git-svn-id: trunk@31802 -
2015-09-23 20:38:08 +00:00
Jonas Maebe
991e1f49bd * store a pointer to the used tasminfo record in every assembler writer, so
that we can use assembler writers with different conventions from the
    currently set target_asm (e.g. an x86 assembler writer for inline assembly
    in LLVM IR)

git-svn-id: trunk@31628 -
2015-09-12 23:32:13 +00:00
Jonas Maebe
b3d0197f98 * factored out the output file handling (mostly writing data) from the
external assembler writer, so we can reuse the archtecture-specific
    writers to write inline assembly in LLVM IR files

git-svn-id: trunk@31625 -
2015-09-12 23:32:01 +00:00
Jeppe Johansen
3cb9be73bc Moved tcontrollerdatatype out into cpuinfo.
Added cputype and fputype info to tcontrollerdatatype arrays.

git-svn-id: trunk@31574 -
2015-09-07 20:36:54 +00:00
Jonas Maebe
0fc1fd6ac1 * replaced current_procinfo.currtrue/falselabel with storing the true/false
labels of LOC_JUMP in the node's location. This generates some extra jumps
    for short circuit boolean and/or-expressions if optimizations are off, but
    with optimisations enabled the generated code is the same (except for JVM
    because the jump threading optimisation isn't enabled there yet).

git-svn-id: trunk@31431 -
2015-08-27 18:28:57 +00:00
Jonas Maebe
f402b0d7df * changed getpointerdef() into a tpointerdef.getreusable() class method
o allows removing the ugly x86 hacks

git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
Jonas Maebe
e02e742997 * removed OS check when loading the address of a symbol on AArch64, it's
probably the same everywhere

git-svn-id: trunk@30900 -
2015-05-24 16:50:13 +00:00
Jonas Maebe
8628d50aba + Linux/AArch64 compiler support (patch by Edmund Grimley Evans)
git-svn-id: trunk@30893 -
2015-05-22 09:25:05 +00:00
Jonas Maebe
585e4a9a14 * corrected cosmetic ARM/AArch64 copy/paste leftovers (patch by
Edmund Grimley Evans)

git-svn-id: trunk@30847 -
2015-05-14 14:42:12 +00:00
Jonas Maebe
7395058cf3 * recognise tb(n)z as branch opcode (patch by Edmund Grimley Evans)
git-svn-id: trunk@30846 -
2015-05-14 14:42:03 +00:00
florian
b222d0b663 * correctly handle LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF in second_int_to_bool, resolves issue #28007
git-svn-id: trunk@30765 -
2015-05-02 13:52:50 +00:00
florian
7dd1d6aa77 o fixes handling of iso i/o parameters/program parameters:
* explicit reset is needed
  * variable must be declared again

git-svn-id: trunk@30757 -
2015-05-01 20:58:31 +00:00
Jonas Maebe
49aef02ef2 * fixed register size of uxtb in case of a 64 bit scan operation
(mantis #27954)

git-svn-id: trunk@30724 -
2015-04-25 16:36:45 +00:00
Jonas Maebe
61e4a1b811 + added tasmlist parameter to getintparaloc() (needed for llvm)
git-svn-id: trunk@30429 -
2015-04-04 14:29:16 +00:00
Jonas Maebe
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Jonas Maebe
8334597476 * a homogeneous float aggregate can maximally contain 4 elements
(mantis #27665)

git-svn-id: trunk@30229 -
2015-03-14 21:46:45 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Jonas Maebe
b821e31442 * force constants into a registers in the 32x32->64 optimized case
git-svn-id: trunk@30034 -
2015-02-28 22:31:03 +00:00
Jonas Maebe
ada5060a34 * set pi_do_call for AArch64 mod/div nodes, as they call FPC_DIVBYZERO
git-svn-id: trunk@30032 -
2015-02-28 22:30:57 +00:00
Jonas Maebe
879afbb7be * removed -Oodfa warnings
git-svn-id: trunk@29986 -
2015-02-23 22:57:24 +00:00
Jonas Maebe
c41759a026 - removed a lot of unused copied internal assembler code
git-svn-id: trunk@29985 -
2015-02-23 22:57:21 +00:00
Jonas Maebe
2ab7f5c35d * moved x86-specific requirements from the generic bsr/bsf code to the
x86 code generator (register size constraints)

git-svn-id: trunk@29984 -
2015-02-23 22:57:18 +00:00
Jonas Maebe
a8d05b66e2 + AArch64 internal bsf/bsr support
git-svn-id: trunk@29979 -
2015-02-23 22:57:02 +00:00
Jonas Maebe
b40a4d1b5a + support for "xor mmreg,mmreg" for initialising global floating point
regvars

git-svn-id: trunk@29978 -
2015-02-23 22:56:59 +00:00
Jonas Maebe
07f31d560c + also perform sign/zero-extensions of the index in vecn using extended
registers in references

git-svn-id: trunk@29968 -
2015-02-23 22:56:03 +00:00
Jonas Maebe
d6de2c03cb * generic part of r26050 from the hlcgllvm branch: made tcgvecnode hlcg-safe
o in particular, add tdef size information to the update_reference*()
     methods, and factored out offset adjustments into its own method
   o also make sure the passed size to update_reference*() corresponds to the
     actual size of the index, as it's no longer guaranteed to be ptruint
     since the previous commit

git-svn-id: trunk@29967 -
2015-02-23 22:56:00 +00:00
Jonas Maebe
97df25cc29 + use reference/add "extended register" scale modes for vecnodes
git-svn-id: trunk@29966 -
2015-02-23 22:55:57 +00:00
Jonas Maebe
b5b7e0f338 * ensure that 64->32 bit truncations cannot be optimized away by the
register allocator on AArch64 + test (did not get caught by existing
    tests)

git-svn-id: trunk@29965 -
2015-02-23 22:55:54 +00:00