Commit Graph

46779 Commits

Author SHA1 Message Date
Jonas Maebe
06fc6ac491 * fixed threadvar support on linux/i386 and android/i386 after r31639
(mantis #28672)

git-svn-id: trunk@31660 -
2015-09-13 07:46:31 +00:00
Jonas Maebe
75012405fa * add some llvm function flags
o in particular, mark fpc_setjmp as "returns_twice" so calls to it are
     never converted into tail calls

git-svn-id: trunk@31659 -
2015-09-12 23:34:04 +00:00
Jonas Maebe
faf4a9cb38 * moved the generation of the "main" stub for libc-based platforms from
hlcgobj to pmodules/symcreat/ngenutil, so that it also works for llvm

git-svn-id: trunk@31658 -
2015-09-12 23:34:01 +00:00
Jonas Maebe
6909523b70 * handle atan, sqrt, ln, sin and cos in the x86 RTL for llvm
o there are llvm intrinsics for all of these except for atan,
      but these obey "the same rules as the equivalent libc functions"
      and I first have to investigate whether these libc functions
      behave the same as our FPC implementations

git-svn-id: trunk@31657 -
2015-09-12 23:33:57 +00:00
Jonas Maebe
616dbead35 + handle abs(real) internally for LLVM, as the generic code calls a helper
that is not implemented for some architectures

git-svn-id: trunk@31656 -
2015-09-12 23:33:53 +00:00
Jonas Maebe
8ff5371a6c + support mmregisters in the generic unaryminus code for floats
git-svn-id: trunk@31655 -
2015-09-12 23:33:50 +00:00
Jonas Maebe
2741b37f28 * only specify the "unnamed_addr" flag for initialised data if its symbol is
a tasmlabel, since otherwise the address needs to remain unique

git-svn-id: trunk@31654 -
2015-09-12 23:33:46 +00:00
Jonas Maebe
7a08319d2e * converted taillvmdecl properties to a set
git-svn-id: trunk@31653 -
2015-09-12 23:33:42 +00:00
Jonas Maebe
4b92083006 * converted tnodeutils.InsertRuntimeInitsTablesTable to the high level typed
const builder
   o enabled the routines that use this one for LLVM

git-svn-id: trunk@31652 -
2015-09-12 23:33:38 +00:00
Jonas Maebe
a4ee982269 * converted tnodeutils.InsertInitFinalTable to the high level typed const
builder and enabled it for LLVM

git-svn-id: trunk@31651 -
2015-09-12 23:33:35 +00:00
Jonas Maebe
f7948ff25f * removed outdated comment
git-svn-id: trunk@31650 -
2015-09-12 23:33:31 +00:00
Jonas Maebe
a1c676cc51 * converted tnodeutils.InsertThreadvarTablesTable to the high level typed
constant builder

git-svn-id: trunk@31649 -
2015-09-12 23:33:28 +00:00
Jonas Maebe
5a2217f645 + support for emitting simple placeholder elements in the high level
typed const builder, for use when e.g. emitting a table preceded by
    the number of elements in case that number is only known afterwards

git-svn-id: trunk@31648 -
2015-09-12 23:33:24 +00:00
Jonas Maebe
f49d6e5f26 * converted tnodeutils.InsertThreadvars to the high level typed constant
builder

git-svn-id: trunk@31647 -
2015-09-12 23:33:21 +00:00
Jonas Maebe
7def77dcc9 * we only support resourcestrings in ttai_typedconstbuilder.queue_emit_const()
right now, so give an internalerror if something else is passed
  * use the correct type when emitting a resourcestring like that (it will store
    the address of the resource string -> pointer to an ansistring)

git-svn-id: trunk@31646 -
2015-09-12 23:33:17 +00:00
Jonas Maebe
c813e024ee * support non-section-based threadvars on the LLVM target
git-svn-id: trunk@31645 -
2015-09-12 23:33:14 +00:00
Jonas Maebe
19882aea7e * converted threadvar loading to high level code generator and updated/added
comments

git-svn-id: trunk@31644 -
2015-09-12 23:33:10 +00:00
Jonas Maebe
83ae160057 + get_threadvar_record() to get a recorddef representing a threadvar (index
and data in case of single threaded)

git-svn-id: trunk@31643 -
2015-09-12 23:33:07 +00:00
Jonas Maebe
4da34a6046 + llvm implementation of g_set_addr_nonbitpacked_record_field_ref
git-svn-id: trunk@31642 -
2015-09-12 23:33:03 +00:00
Jonas Maebe
9ee2a0f71c + g_set_addr_nonbitpacked_record_field_ref() thlcgobj method to make a
reference pointing to the base address of a record point to a field
    of that same record

git-svn-id: trunk@31641 -
2015-09-12 23:33:00 +00:00
Jonas Maebe
5a50d05e50 * fixed skipping if intermediate fields in llvm shadow symtable
git-svn-id: trunk@31640 -
2015-09-12 23:32:56 +00:00
Jonas Maebe
3c6aa91a96 * factored out the loading of threadvars in its own method, and put the
x86-specific part in nx86ld

git-svn-id: trunk@31639 -
2015-09-12 23:32:53 +00:00
Jonas Maebe
54642f5f09 * return the added symbol from trecorddef.add_field_by_def()
git-svn-id: trunk@31638 -
2015-09-12 23:32:49 +00:00
Jonas Maebe
54172d7de4 * fixed alignment of subscripts if the variant part of a record starts at a
non-zero offset from the reference field in the llvm version of the record

git-svn-id: trunk@31637 -
2015-09-12 23:32:46 +00:00
Jonas Maebe
c7a418829b * support for implementing interface method wrappers at the node tree
level, used by LLVM

git-svn-id: trunk@31636 -
2015-09-12 23:32:42 +00:00
Jonas Maebe
be2ec5be59 * write full/init rtti and VMTs separately instead of at the same time
o this allows us to write the VMTs earlier (before the synthetic method
     implementations are generated), which means we can create new synthetic
     methods while generating the VMTs (for interface trampolines)

git-svn-id: trunk@31635 -
2015-09-12 23:32:38 +00:00
Jonas Maebe
cabb16efdb - removed the no longer used generation of uninitialised results for
pure assembler routines

git-svn-id: trunk@31634 -
2015-09-12 23:32:35 +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
5c69d57674 + TLLVMModuleInlineAssemblyDecorator to decorate inline module-level
assembly

git-svn-id: trunk@31632 -
2015-09-12 23:32:28 +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
6dd06a1aae * put the code for pure assembler routines in a separate asmlist, so
we can easily use a different assembler writer for them on the
    llvm target

git-svn-id: trunk@31630 -
2015-09-12 23:32:21 +00:00
Jonas Maebe
c80fb6a20e * explicitly specify whether an llvm specification is a definition (= locally
defined) or a declaration (external symbol), instead of deriving it from
    from the bind of the tasmsymbol. The reason is that with module-level
    inline assembly, some locally implemented functions (in pure assembler)
    won't have an LLVM IR body

git-svn-id: trunk@31629 -
2015-09-12 23:32:17 +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
Jonas Maebe
6ffd8f0201 * finalize managed data passed to untyped "out" parameters after r31328
(mantis #2863)

git-svn-id: trunk@31624 -
2015-09-12 23:31:57 +00:00
Jonas Maebe
6be050b729 * fixed finalization of open array out parameters after r31328
git-svn-id: trunk@31623 -
2015-09-12 23:31:53 +00:00
Jonas Maebe
2205549316 * changed fix for webtbs/tw20075 so that we don't check the need for
parameter/local finalization at all in pure assembler routines;
    the routines that check this also set pi_needs_got, which should
    not be set either for pure assembler routines (fixes tw20075 on
    Darwin/i386, where PIC code is enabled by default)

git-svn-id: trunk@31622 -
2015-09-12 23:31:50 +00:00
nickysn
e5153db532 + added the win16api drawing functions
git-svn-id: trunk@31621 -
2015-09-12 15:47:23 +00:00
nickysn
48a28c1256 + added the win16api clipping support functions
git-svn-id: trunk@31620 -
2015-09-12 14:33:27 +00:00
nickysn
5900db62ce + added the win16api palette functions
git-svn-id: trunk@31619 -
2015-09-12 14:05:38 +00:00
nickysn
df0ae96738 + added the win16api gdi region support functions
git-svn-id: trunk@31618 -
2015-09-12 13:13:07 +00:00
nickysn
5738869120 + added the win16api brush gdi functions
git-svn-id: trunk@31617 -
2015-09-12 12:46:45 +00:00
nickysn
c0a63ea0ab + added the win16api pen support functions
git-svn-id: trunk@31616 -
2015-09-12 12:27:54 +00:00
nickysn
1181eb0ddb * fixed compilation of the compiler with -dEXTDEBUG after r31588
git-svn-id: trunk@31615 -
2015-09-12 11:55:54 +00:00
nickysn
3a8acd3f33 + initial implementation of win16 file support, based on the msdos rtl
git-svn-id: trunk@31614 -
2015-09-12 00:17:11 +00:00
nickysn
d579c45656 * pass the option "dosseg" to wlink when compiling for win16 to ensure the
proper segment ordering

git-svn-id: trunk@31613 -
2015-09-12 00:08:23 +00:00
nickysn
04cb0cf615 + check for LFN support at startup on win16
git-svn-id: trunk@31612 -
2015-09-11 22:03:50 +00:00
nickysn
181ee0b4d2 + init exceptions and the unicode string manager in the win16 system unit startup
git-svn-id: trunk@31611 -
2015-09-11 21:54:40 +00:00