Commit Graph

335 Commits

Author SHA1 Message Date
florian
245b58c249 + support for arm attributes
* abi notes fixed

git-svn-id: trunk@43157 -
2019-10-09 17:45:40 +00:00
florian
8ecdb2e9ca + dwarf support for tls threadvars
git-svn-id: trunk@43134 -
2019-10-05 20:48:31 +00:00
florian
16163b74ec + support for the gnu2 general-dynamic tls model on arm, use it instead of the gnu one as the gnu2 one can be relaxed (access optimizations by the linker)
+ support pic relocations in the internal assembler writer

git-svn-id: trunk@43128 -
2019-10-05 20:48:26 +00:00
florian
03dfc615dc + new relocations for arm tls
git-svn-id: trunk@43123 -
2019-10-05 20:48:21 +00:00
pierre
eb3a470f45 * assemble.pas (TInternalAssembler.TreePass0): Avoid range/overflow check error.
(TInternalAssembler.TreePass2): Check that objsymend and objsym are in same section
    and avoid range/overflow check error.

git-svn-id: trunk@43028 -
2019-09-17 21:06:18 +00:00
Jonas Maebe
7ef3d39d93 * one more disable location of DoPipe in case not on a Unix platform
(mantis #35743)

git-svn-id: trunk@42302 -
2019-06-27 19:20:45 +00:00
florian
1ed0000ae8 + Encode(U/S)leb128 take now a third parameter to force that the constant has a certain minimum size
+ tai_const has a new field fixed_size which is used to fix the size of an s/uleb128. This is needed to ensure convergence during assembling when calculating offsets

git-svn-id: branches/debug_eh@42255 -
2019-06-20 17:13:28 +00:00
Jonas Maebe
1b6425176b * synchronised with trunk till r42049
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
fc60ec2ea4 + support for LLVM LTO: compile units with -CLflto -> when compiling a main
program/library also with -Clflto, all units compiled with that option
    will be linked using their bitcode files and LTO
   o compiling with -CLflto will compile all units twice: once for normal
     (static or smart) linking, and once for LTO. So the result can be
     used both with and without LTO.

git-svn-id: branches/debug_eh@41910 -
2019-04-20 18:56:11 +00:00
Jeppe Johansen
2b78a8fd3d - Add support for .option directive in riscv assembler.
- Use addiw when adjusting U32 to S32

git-svn-id: trunk@41870 -
2019-04-14 20:51:29 +00:00
florian
a092da723a + new fields for more precise control of alignment
+ support of new alignment control values for GNU AS writer
+ support of new alignment control values for binary writer
* better alignment settings on i386-win32
* improved inserted align directives for if nodes

git-svn-id: trunk@40159 -
2018-11-01 20:49:17 +00:00
florian
68eb921d46 * broken compilation after r39347 fixed
git-svn-id: trunk@39349 -
2018-06-30 12:30:25 +00:00
nickysn
3d6d020fca + implemented the actual writing of LINNUM OMF records
git-svn-id: trunk@39008 -
2018-05-16 17:37:28 +00:00
nickysn
61e6d2afec + introduce asd_omf_linnum_line directives; they will be used for writing LINNUM
entries in the OMF object format

git-svn-id: trunk@39007 -
2018-05-16 17:05:02 +00:00
florian
2be94d3c78 * fix building on win64 with FPC_SOFT_FPUX80 defined, resolves #32502
git-svn-id: trunk@37621 -
2017-11-26 15:16:37 +00:00
Károly Balogh
e6aed467b5 renamed script unit to cscript to avoid namespace conflict with univint package on Darwin. this makes it possible to build the textmode IDE on Darwin
git-svn-id: trunk@37598 -
2017-11-17 11:27:19 +00:00
pierre
8614a38ad3 Fix cross-compiler with soft 80bit with external assembler
git-svn-id: trunk@37306 -
2017-09-23 20:52:57 +00:00
pierre
b14feadfe1 Fix cycle failure after last commit
git-svn-id: trunk@37298 -
2017-09-21 15:47:49 +00:00
pierre
735f9363d8 Add code for writing 80-bit data with soft 80-bit extended when FPC_SOFT_FPUX80 is defined
git-svn-id: trunk@37297 -
2017-09-21 14:40:23 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
svenbarth
ca11a4baaa * only generate a big obj COFF file if the high bound of the sections is larger than $7fff (it could be that the final count is smaller again as sections that have the same name are combined)
git-svn-id: trunk@35409 -
2017-02-10 14:40:23 +00:00
svenbarth
a9888eba70 * also generate Big Obj COFF files with the GNU utilities (needs 2.25 or newer), at least as long as the new option -a5 isn't given, which disables this
Note 1: using an older AS might fail anyway if the amount of sections is too high (like in packages\odata\src\sharepoint.pp)
Note 2: it might be an idea to keep track of the created sections in the asmlists and only enable the option if *really* necessary (like with the internal COFF output generator), though this might lead to false positives due to multiple sections with the same name (since I'd prefer to use the KISS principle only a counter would be used)

git-svn-id: trunk@35381 -
2017-02-03 22:45:32 +00:00
marco
d2fe24ae20 * fix some more occured->occured
git-svn-id: trunk@35120 -
2016-12-13 12:55:32 +00:00
Jonas Maebe
646385e966 * support for overriding the line ending character in external assembler
writer decorators (for LLVM function-level inline assembly: there
    newline has to be replaced by the character sequence '\0A')

git-svn-id: trunk@34854 -
2016-11-09 19:51:27 +00:00
Jonas Maebe
20a152d4e9 * simplified TExternalAssemblerOutputFile.AsmLn
git-svn-id: trunk@34853 -
2016-11-09 19:51:24 +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
nickysn
5576caada6 * handle the asd_cpu asd_cpu directive and keep track of the currently selected
CPU in the internal assembler

git-svn-id: trunk@33123 -
2016-02-27 00:50:01 +00:00
florian
4ccc75e2e8 + be able to specify endianess in the assembler command line
+ pass endianess to the powerpc assembler (GNU only), so an unified be/le GNU assembler can used to build powerpc64le

git-svn-id: trunk@32894 -
2016-01-09 14:28:25 +00:00
Jonas Maebe
110a5642c0 - removed ait_weak/tai_weak, and replaced it with the previously existing
asd_weak_reference/asd_weak_definition directives

git-svn-id: trunk@32879 -
2016-01-07 22:05:38 +00:00
florian
37cb35d780 + support for the .code directive in arm inline assembler
git-svn-id: trunk@32840 -
2016-01-03 22:08:25 +00:00
nickysn
995ca4fb12 + implemented the 'SEG @DATA' inline assembler directive for i8086
git-svn-id: trunk@32280 -
2015-11-10 17:26:21 +00:00
nickysn
bb47eb4a2a + support aitconst_seg in the i8086 internal assembler as well
git-svn-id: trunk@32252 -
2015-11-05 16:38:04 +00:00
pierre
90ff332b49 Add -Aas-sol to use native Solaris assembler
git-svn-id: trunk@32188 -
2015-10-29 15:10:27 +00:00
Jonas Maebe
0ebee6a825 * enabled assembling via a pipe for clang
git-svn-id: trunk@31879 -
2015-09-28 22:14:50 +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
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
ff4847f685 * also write out the assembler invocation when using pipes
git-svn-id: trunk@31803 -
2015-09-23 20:38:11 +00:00
yury
432248cbf1 * Removed lot of unused vars.
git-svn-id: trunk@31732 -
2015-09-17 12:48:58 +00:00
Jonas Maebe
839482751d * when generating code for a pure assembler routine with LLVM, instantiate
a code and temp generator for the architectural target instead of for LLVM
  * write the code for pure assembler routines using a GNU-style external
    assembler writer for the target, with a decorator to wrap it in
    LLVM module-level assembly statements

git-svn-id: trunk@31633 -
2015-09-12 23:32:31 +00:00
Jonas Maebe
55e84df094 + GetExternalAssemblerWithAsmInfoWriter() to get a GNU-style external
assembler writer that is compatible with the current architecture,
    for use by the LLVM assembler writer to write inline assembly

git-svn-id: trunk@31631 -
2015-09-12 23:32:24 +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
4bb82b0a3f - removed unused OnlyAsm procedure
git-svn-id: trunk@31627 -
2015-09-12 23:32:09 +00:00
Jonas Maebe
e1f78cb774 * added decorator support to the external assembler writers so the LLVM
assembler writer can postprocess their output

git-svn-id: trunk@31626 -
2015-09-12 23:32:05 +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
nickysn
4a855b140a + support mixing initialized and bss data in the same object section (only in
case the section options contain the new option 'oso_sparse_data') in the
  internal object writer (needed for the huge memory model)

git-svn-id: trunk@31503 -
2015-09-04 13:16:45 +00:00
nickysn
046a4e4114 * allow using a TObjSymbol subclass via using a "class of" type
git-svn-id: trunk@31424 -
2015-08-25 14:32:08 +00:00
nickysn
d204aaab72 * refactored "ar" object writer creation in the internal assembler to allow
having different implementations of an internal "ar" writer

git-svn-id: trunk@30667 -
2015-04-19 16:35:16 +00:00
nickysn
cebd3de630 + added unit owomflib (empty for now), which is going to contain the internal
.lib writer for i8086-msdos

git-svn-id: trunk@30643 -
2015-04-18 09:49:38 +00:00