Jonas Maebe
6391794958
* fixed -Oodfa warnings
...
git-svn-id: trunk@30500 -
2015-04-08 19:08:39 +00:00
Jonas Maebe
af61923dc3
* don't write parameter attributes in procvardefs
...
git-svn-id: trunk@30499 -
2015-04-08 19:08:36 +00:00
Jonas Maebe
a8cefa8fcd
- removed aggas.pas leftovers
...
git-svn-id: trunk@30498 -
2015-04-08 19:08:33 +00:00
Jonas Maebe
101fc3d4ec
* translate formaldef into "i8*", as intended, instead of "i8**" due to
...
the fact that this type is always passed by reference
git-svn-id: trunk@30486 -
2015-04-07 19:35:22 +00:00
Jonas Maebe
f94f9f44e4
* convert all arguments to integers in case of comparisons of pointers with
...
constants on llvm, as you can only compare with "null" in that case
* convert all arguments to integers in case of pointer subtractions,
as pointer subtractions are not supported by llvm
git-svn-id: trunk@30485 -
2015-04-07 19:35:08 +00:00
Jonas Maebe
94aadb23ab
+ implemented getintparaloc() for llvm
...
git-svn-id: trunk@30430 -
2015-04-04 14:29:19 +00:00
Jonas Maebe
2336d22985
* override instr_get_oper_spilling_info and substitute_spilled_registers for
...
llvm (add support for top_para)
git-svn-id: trunk@30428 -
2015-04-04 14:29:12 +00:00
Jonas Maebe
e12dff9a5e
* support top_para in trgllvm.get_spill_temp()
...
git-svn-id: trunk@30426 -
2015-04-04 14:29:06 +00:00
Jonas Maebe
ee7198aa57
* fixed memory leak in case one tai operand is replaced by another
...
git-svn-id: trunk@30424 -
2015-04-04 14:29:00 +00:00
Jonas Maebe
3279cc052a
* moved llvm-specific code from aasmtai to aasmllvm
...
* call add_reg_instruction_hook() for top_para parameters
git-svn-id: trunk@30423 -
2015-04-04 14:28:57 +00:00
Jonas Maebe
2ef753faae
* support llvm spilling_get_reg_type() for the destination of call/invoke
...
git-svn-id: trunk@30422 -
2015-04-04 14:28:54 +00:00
Jeppe Johansen
e2272c8a7e
Added aitconst_gs for AVR pointer references to Flash.
...
git-svn-id: trunk@30419 -
2015-04-04 10:29:11 +00:00
Jonas Maebe
f631430775
* made the allocation of labels for internal data in typed const builders
...
overridable, and implement those routines for llvm
git-svn-id: branches/hlcgllvm@30348 -
2015-03-28 11:34:04 +00:00
Jonas Maebe
e12bd99b59
* fixed compilation with -dllvm after r30343
...
git-svn-id: branches/hlcgllvm@30347 -
2015-03-28 11:34:02 +00:00
Jonas Maebe
5a2609933f
* fixed crash in r30244 (we only have to get a new elementdef if we didn't
...
already initialise the location, and we won't get a new elementdef if
the location is already assigned)
git-svn-id: branches/hlcgllvm@30346 -
2015-03-28 11:33:59 +00:00
Jonas Maebe
e924dbed90
* moved the specification of the options for a ttai_typedconstbuilder from
...
get_final_asmlist() to the constructor, in preparation of supporting the
creation of internal builders for local data that will ignore some of the
irrelevant flags (at creation time)
git-svn-id: branches/hlcgllvm@30334 -
2015-03-27 21:25:27 +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
bc7ba58798
* fixed compilation after removal of ait_set, ait_thumb_set and ait_symbol_pair
...
git-svn-id: branches/hlcgllvm@30243 -
2015-03-15 21:10:47 +00:00
Jonas Maebe
c1e7c9de02
* support for flushing a ttai_typedconstbuilder queue with an ordinal
...
constant at the end (in case of e.g. ordinal -> pointer type
conversions)
git-svn-id: branches/hlcgllvm@30128 -
2015-03-07 21:43:57 +00:00
Jonas Maebe
eba3f534de
* correctly handle empty ansistring constants for llvm
...
git-svn-id: branches/hlcgllvm@30127 -
2015-03-07 21:43:52 +00:00
Jonas Maebe
935c0c86aa
* write all ait_const's of value 0 as 'zeroinitializer' so they also work
...
for pointer constants
git-svn-id: branches/hlcgllvm@30126 -
2015-03-07 21:43:47 +00:00
Jonas Maebe
9c42437326
* moved tasmlisttypedconstbuilder.tc_emit_string_offset() to
...
ttai_typedconstbuilder.emit_string_offset() so it can also be used outside
the context of parsing a Pascal-level typed constant
git-svn-id: branches/hlcgllvm@30111 -
2015-03-06 19:45:04 +00:00
Jonas Maebe
511e878606
* fixed pointer plus/minus integer on llvm (since a_op_* only gets a single
...
def, we have to ensure that both arguments have in fact the same type)
git-svn-id: branches/hlcgllvm@30108 -
2015-03-05 22:45:32 +00:00
Jonas Maebe
f9ae2aadac
* fixed llvm unsigned greater/lower than condition mnemoniics
...
git-svn-id: branches/hlcgllvm@30107 -
2015-03-05 22:20: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
cc596225fa
+ thlcg.g_ptrtypecast_reg/ref() to typecast a pointer in a register, or the
...
pointer type describing a reference, to another pointer type
git-svn-id: branches/hlcgllvm@28781 -
2014-10-06 20:54:33 +00:00
Jonas Maebe
76e0ee7a41
* fixed adding padding bytes before anonymous records: the alignment of such
...
records is only known once we have completely parsed all of their data
(the alignment of a record depends on the alignment requirements of its
field with the largest alignment) -> only insert the padding bytes after
completely parsing them
git-svn-id: branches/hlcgllvm@28765 -
2014-10-06 20:53:51 +00:00
Jonas Maebe
5a9b931e5c
* renamed ttai_lowleveltypedconstbuilder to ttai_typedconstbuilder
...
git-svn-id: branches/hlcgllvm@28764 -
2014-10-06 20:53:49 +00:00
Jonas Maebe
d2b55b6f07
* moved the recording of aggregate type information during typed constant
...
parsing from nllvmtcon to aasmcnst
o added automatic insertion of padding bytes when fields need to be aligned,
so that once ncgvmt (and hopefully ncgrtti) are converted to the typed
constant builder class, we can get rid of all the explicit alignment
directives (only supported for non-bitpacked records for now)
git-svn-id: branches/hlcgllvm@28763 -
2014-10-06 20:53:46 +00:00
Jonas Maebe
bdb22772d9
* fixed whitespace
...
git-svn-id: branches/hlcgllvm@28756 -
2014-10-06 20:53:28 +00:00
Jonas Maebe
210b532832
* split up specifying the type of the section of a typed constant and whether
...
it should be put in a new section
git-svn-id: branches/hlcgllvm@28753 -
2014-10-06 20:53:20 +00:00
Jonas Maebe
6677e698cd
* record the alignment in taillvmdecl, as it can be different from the
...
default
git-svn-id: branches/hlcgllvm@28752 -
2014-10-06 20:53:17 +00:00
Jonas Maebe
37009c917b
* pass alignment to tnodeutils.insertbsssym()
...
git-svn-id: branches/hlcgllvm@28751 -
2014-10-06 20:53:14 +00:00
Jonas Maebe
864b36fbe5
* create the recorddef at the start when building an anonymous recorddef,
...
so that we can already refer to its def while we are sill parsing
individual elements
git-svn-id: branches/hlcgllvm@28750 -
2014-10-06 20:53:12 +00:00
Jonas Maebe
b710220a5e
* fixed calldef specified in case of calling a varargs C function
...
git-svn-id: branches/hlcgllvm@28494 -
2014-08-19 20:22:59 +00:00
Jonas Maebe
d09243c8c1
* correctly handle make_simple_ref() for voidpointers
...
git-svn-id: branches/hlcgllvm@28493 -
2014-08-19 20:22:56 +00:00
Jonas Maebe
33c277b3a7
+ temp_to_ref() implementation for llvm
...
git-svn-id: branches/hlcgllvm@28491 -
2014-08-19 20:22:50 +00:00
Jonas Maebe
0fbaa9e924
* record the alignment of temps, and set it when creating a reference based
...
on a temp instead of assuming it's always aligned to a multiple of
the stackpointer size
git-svn-id: branches/hlcgllvm@28490 -
2014-08-19 20:22:48 +00:00
Jonas Maebe
9880b53242
* changed all alignment parameters in the temp manager to shortint
...
git-svn-id: branches/hlcgllvm@28489 -
2014-08-19 20:22:45 +00:00
Jonas Maebe
dd733bd5b5
* changed all size parameters in the temp manager from longint to asizeint
...
git-svn-id: branches/hlcgllvm@28488 -
2014-08-19 20:22:42 +00:00
Jonas Maebe
344acef9b5
* separate tracking the def of a temp and whether or not it needs to be
...
finalised (for llvm, we always keep track of the def)
git-svn-id: branches/hlcgllvm@28485 -
2014-08-19 20:22:34 +00:00
Jonas Maebe
3b7f43ad77
* renamed (hl)gettemptyped() to (hl)gettempmanaged() to better indicate the
...
meaning
git-svn-id: branches/hlcgllvm@28484 -
2014-08-19 20:22:32 +00:00
Jonas Maebe
9d118567cd
+ support for a_call_reg() on the llvm target (can call simple procvars now)
...
git-svn-id: branches/hlcgllvm@28480 -
2014-08-19 20:22:21 +00:00
Jonas Maebe
bd3f0b3ada
* factored out the common calling code from a_call_name (to reuse in
...
a_call_reg()
git-svn-id: branches/hlcgllvm@28478 -
2014-08-19 20:22:16 +00:00
Jonas Maebe
b6fc2f1542
* don't emit the */pointer suffix for procdefs in llvmaddencodedtype_intern(),
...
so that if a_loadaddr_ref_reg() is used to load the address of a procdef
into a register, the getpointerdef(procdef) won't (wrongly) result in two
*'s
o the previous behaviour was necessary for the tck_simple_procvar2proc
special case that was removed in the previous commit
git-svn-id: branches/hlcgllvm@28477 -
2014-08-19 20:22:13 +00:00
Jonas Maebe
cc4482d6f8
- removed tck_simple_procvar2proc, instead use
...
procdef.getcopyas(procvardef,pc_address_only) as the def if we want to
specify that we're interested in the address of a procedure/procvar of
object
git-svn-id: branches/hlcgllvm@28476 -
2014-08-19 20:22:11 +00:00
Jonas Maebe
4e3f504caa
* don't try to check whether the last parameter of a cdecl function is a
...
varargs parameter if it doesn't have any parameters
git-svn-id: branches/hlcgllvm@28399 -
2014-08-12 23:17:43 +00:00
Jonas Maebe
6aafe209d0
+ llvm second_length() implementation (can't use generic one because of its
...
use of cg.makeregsize())
git-svn-id: branches/hlcgllvm@28389 -
2014-08-12 18:59:19 +00:00
Jonas Maebe
a2e0f729c6
* use the correct opcode when loading integer pointer constants (such as nil)
...
git-svn-id: branches/hlcgllvm@28386 -
2014-08-12 18:59:10 +00:00
Jonas Maebe
0867b6e4f8
* added missing {$i fpcdefs.inc}
...
git-svn-id: branches/hlcgllvm@28378 -
2014-08-10 19:40:34 +00:00