Commit Graph

12 Commits

Author SHA1 Message Date
Jonas Maebe
b0ff41406a * grouped all tai_real* types into a single tai_realconst type,
to free up space for more ait_* types in taitype (can't have
    more than 32 because they have to fit in a small set)
   o factored out writing of floating point numbers as an array of
     byte in the external assemblers

git-svn-id: branches/hlcgllvm@28105 -
2014-07-01 16:29:58 +00:00
Jonas Maebe
0fd172ddf6 * ignore global labels with a comment for now, they're generated for
function symbol aliases

git-svn-id: branches/hlcgllvm@27014 -
2014-03-06 21:42:17 +00:00
Jonas Maebe
6dcfd73d21 + support for a_call_name() on the llvm target:
o make use of the fact that callparanodes always first load everything
     in temporary parameters (allocated via paramanager.createtempparaloc)
     -> we pass those temporary paralocs to the llvm call nodes and ignore
     the "real" locations with physical registers
   o all function results are forced to memory before handing them back
     to the generic code generator to avoid having to deal with special
     result locations and llvm<->pascal type differences (llvm removes
     the extra temp stores/loads while optimising)
   o ideally, the llvm code generator should share the common code with
      the generic code generator for a_load_ref_cgpara() at some point in
      the future

git-svn-id: branches/hlcgllvm@27013 -
2014-03-06 21:42:14 +00:00
Jonas Maebe
b82053ef40 * reworked handling of defined/declared symbols in llvm: we now automatically
generate declarations when external symbols are referred in a taillvm
    instruction
  * added "declared" field to tasmsymbol for llvm to make avoid declaring a
    symbol multiple times (harmless, but unnecessary)
  * all kinds of declarations/definitions are now handled using the new
    taillvmdecl, the old separate types have been removed

git-svn-id: branches/hlcgllvm@27010 -
2014-03-06 21:42:03 +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
dad45d63b1 * improved symbol alias handling (pass in old sym instead of name, add
pointer add end of aliased procdef)

git-svn-id: branches/hlcgllvm@27008 -
2014-03-06 21:41:56 +00:00
Jonas Maebe
358b346bbc * fixed writing of constant operands outside the longint range
git-svn-id: branches/hlcgllvm@27005 -
2014-03-06 21:41:46 +00:00
Jonas Maebe
227ff0ea48 * llvm requires that single precision constants are exactly representable
using single precision -> convert them to single precision in the code
    generator

git-svn-id: branches/hlcgllvm@27001 -
2014-03-06 21:41:32 +00:00
Jonas Maebe
9902864cce * don't output alignments for reference operands to bitcast & co
git-svn-id: branches/hlcgllvm@26984 -
2014-03-06 21:40:29 +00:00
Jonas Maebe
9c674ff444 * made internalerror unique
git-svn-id: branches/hlcgllvm@26982 -
2014-03-06 21:40:21 +00:00
Jonas Maebe
0cc581825f * enabled darwin/ppc64 for the llvm target
git-svn-id: branches/hlcgllvm@26072 -
2013-11-12 19:22:50 +00:00
Jonas Maebe
5409d4321e + basic llvm bitcode (textual format) writer:
o no support yet for many ait_* types, although eventually most of them
     shouldn't be generated at all for the llvm target
   o no support yet for calling "opt" (which optimises llvm bitcode) before
     calling llc (which translates llvm bitcode into native code) -- compile
     with -s and manually call "opt" with -std-compile-opts, -O1, -O2 or -O3
     if you want to experiment
   o override the assembler writer with the llvm one when compiling an llvm-
     targeting compiler
   o override the assembler file extension with .ll when compiling an llvm-
     targeting compiler

git-svn-id: branches/hlcgllvm@26054 -
2013-11-11 11:16:25 +00:00