Commit Graph

23 Commits

Author SHA1 Message Date
Jonas Maebe
ab581c5c30 LLVM: override thlcgobj.g_undefined_ok
Uses the freeze instruction available in LLVM 10.0+. If we don't freeze undef/
poison values before using them in a calculation (even if that calculation is
something like "and 0", which masks the result completely), the result will
still be undef/poison and will keep propagating.
2023-01-20 21:07:18 +01:00
Jonas Maebe
eb7ba1690e * mark all external assemblers using an LLVM tool using af_llvm
+ added support for constructing target triplets
  * pass "-target triplet" when using an LLVM assembler
   o removed no longer needed $DARWINVERSION and $ARCH parameters
  * consistently use as_clang_gas when clang is used to assembler GAS-style
    assembly, and rename as_llcm_clang to as_clang_llvm (for consistency)
  * support pipe assembling when using clang on *nix in all cases

git-svn-id: trunk@45807 -
2020-07-19 14:30:35 +00:00
Jonas Maebe
e7d1a77f9a * rename the ARM/AArch64-Darwin targets to ARM/AArch64-iOS
* rename the m68k/PowerPC-MacOS targets to m68k/PowerPC-MacOSClassic
  * repurpose the AArch64/Darwin target for AArch64/macOS
   o make AArch64-Darwin default target for a hosted AArch64-Darwin compiler

git-svn-id: trunk@45758 -
2020-07-10 21:52:24 +00:00
marcus
589b2b956f Fixed LLVM compilation after r45143
git-svn-id: trunk@45155 -
2020-04-28 18:41:45 +00:00
Jonas Maebe
523ebb42cf * fix LLVM backend compilation (mantis #36833)
git-svn-id: trunk@44374 -
2020-03-27 21:26:39 +00:00
Jonas Maebe
08f9ec98e5 * use same Windows platform name as clang
git-svn-id: trunk@44063 -
2020-01-29 22:21:10 +00:00
Jonas Maebe
8eb07ed7b1 * add support for custom calling conventions to LLVM function declarations
git-svn-id: branches/debug_eh@41211 -
2019-02-03 21:09:58 +00:00
Jonas Maebe
9d07e4948f * fix compilation of ARM compiler for LLVM
git-svn-id: branches/debug_eh@41210 -
2019-02-03 21:09:54 +00:00
Jonas Maebe
85702dd263 + added support for clang as an assembler for llvm IR
* adapted string used for macOS/iOS version in triple in llvm IR files to
    what clang expects (always a single digit patch version)

git-svn-id: branches/debug_eh@40431 -
2018-12-01 20:30:24 +00:00
Jonas Maebe
ce7579bd50 + added "cleanup" landing pad opcode
git-svn-id: branches/debug_eh@40411 -
2018-11-29 21:31:18 +00:00
florian
c7a0022146 * fix building with LLVM=1, thanks to Karl-Michael Schindler for the hint
git-svn-id: trunk@39861 -
2018-10-05 20:56:56 +00:00
florian
94de872927 * fix compilation for llvm as proposed by Karl-Michael Schindler, resolves #31969
git-svn-id: trunk@37842 -
2017-12-28 14:57:35 +00:00
svenbarth
c16238e8dd * fix for Mantis #31464: add an entry for the WebAssembly CPU (this is already the target name that LLVM uses)
git-svn-id: trunk@35507 -
2017-03-03 16:14:52 +00:00
Jonas Maebe
4b9179636b + support for creating and writing LLVM landingpad instructions
git-svn-id: trunk@35161 -
2016-12-18 13:57:42 +00:00
Jonas Maebe
f3409b4c9d + new la_asm LLVM pseudo-instruction to represent function-level inline
assembly blocks

git-svn-id: trunk@34890 -
2016-11-13 16:06:26 +00:00
Jonas Maebe
1284032765 + llvm blockaddress() intrinsic (supported as of LLVM 3.5.1)
git-svn-id: trunk@32409 -
2015-11-21 12:36:55 +00:00
Jonas Maebe
765044aede * fixed a number of (mostly false) warnings regarding uninitialised
variables with -Oodfa

git-svn-id: branches/hlcgllvm@30244 -
2015-03-15 21:10:50 +00:00
Jonas Maebe
ea00e559f8 * fixed compilation after previous merge
git-svn-id: branches/hlcgllvm@30106 -
2015-03-05 22:20:45 +00:00
Jonas Maebe
a8b2b576ca + new llvmconvop() routine that determines the conversion operation to
convert one def to another, including information regarding whether
    it should be done via an intermediate integer typecast
  * use this routine in hlcgllvm

git-svn-id: branches/hlcgllvm@28116 -
2014-07-01 16:30:34 +00:00
Jonas Maebe
02ca215272 * reworked and fixed llvm procdef handling (except for variadic C functions):
o handle parameters and function results divided over multiple paralocs,
     including generating fake recorddefs that represent
   o fixed zero/sign extension handling
   o properly handle difference between procdefs as printed for the
    implementation, an alias declaration or a procvar definition

git-svn-id: branches/hlcgllvm@27009 -
2014-03-06 21:42:00 +00:00
Jonas Maebe
c5c16da787 * corrected some llvm architecture names
git-svn-id: branches/hlcgllvm@26071 -
2013-11-12 19:21:53 +00:00
Jonas Maebe
d245228ba6 + tcgllvm.a_label() and tcgllvm.a_jmp_always(). Special for llvm: every
basic block must end with a terminator instruciton (such as a branch) ->
    when emitting a label, check whether the previous instruction is a
    terminator instruction and if not, add an unconditional branch to the
    label we are adding.
   o Implemented at the tcg instead of at the thlcgobj level because
    a) these methods don't need any high level type information
    b) implementing them in thlcgobj would require making thlcg.a_label()
       virtual and ensuring that no-one ever calls cg.a_label() in any
       generic code

git-svn-id: branches/hlcgllvm@26038 -
2013-11-11 11:15:20 +00:00
Jonas Maebe
44b1996158 + base units for llvm:
o opcodes + string representation
   o llvm string representations of targets supported by fpc
   o supported fpc optimisations
   o list of supported LLVM versions (currently only targeting 3.3)

git-svn-id: branches/hlcgllvm@26035 -
2013-11-11 11:15:09 +00:00