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
Jonas Maebe
4acd43c643
* don't force simple function results in memory
...
o results in simpler code, and more importantly is required for some code
that expects a LOC_REGISTER after calling certain system unit helpers
(e.g. in ncgutil.new_exception)
git-svn-id: branches/hlcgllvm@28375 -
2014-08-10 19:40:26 +00:00
Jonas Maebe
ac4c455991
* handle non-integer/non-record memory destinations in gen_load_cgpara_loc()
...
git-svn-id: branches/hlcgllvm@28374 -
2014-08-10 19:40:24 +00:00
Jonas Maebe
50274f58b6
* ignore get/unget/alloc/dealloc of cpu registers when generating llvm code
...
o there are no cpu registers on the llvm target, but generic code may still
occasionally allocate them via the generic routines in case of e.g. a
hardcoded use of a function return register
git-svn-id: branches/hlcgllvm@28373 -
2014-08-10 19:40:21 +00:00
Jonas Maebe
0aab46b97f
+ tllvmtypeconvnode.second_int_to_bool() implementation
...
git-svn-id: branches/hlcgllvm@28370 -
2014-08-10 19:40:13 +00:00
Jonas Maebe
53e1d5c26f
* fixed optimised form of a_cmp_const_reg_label(): when inverting the branch, we still
...
have to emit the label we originally allocated for the fallthrough path (otherwise
the branch is not inverted at all, and moreover the caller will also emit the
original target label somewhere so it will be doubly defined)
git-svn-id: branches/hlcgllvm@28367 -
2014-08-10 19:40:06 +00:00
Jonas Maebe
6ab2c00ac6
* recognise LOC_CREFERENCE in tllvmsubscriptnode.handle_platform_subscript()
...
git-svn-id: branches/hlcgllvm@28364 -
2014-08-10 19:39:58 +00:00
Jonas Maebe
f70865fc1f
* moved tjvmnotnode implementation to generic ncghlmat unit, and also use it
...
for llvm
git-svn-id: branches/hlcgllvm@28363 -
2014-08-10 19:39:55 +00:00
Jonas Maebe
39fa81eaa0
* fixed passing of C-style varargs parameters
...
git-svn-id: branches/hlcgllvm@28357 -
2014-08-10 13:19:29 +00:00
Jonas Maebe
db54588afa
* when calling a procdef that either returns a procvardef or that accepts
...
(C-style) varargs, you have to specify the full function definition
rather than only its result
git-svn-id: branches/hlcgllvm@28356 -
2014-08-10 13:19:26 +00:00
Jonas Maebe
bae1f72896
* handle cdecl varargs parameters in llvm procdef string representations
...
git-svn-id: branches/hlcgllvm@28355 -
2014-08-10 13:19:24 +00:00
Jonas Maebe
9225d43ccf
* free temporary return parameter instance
...
git-svn-id: branches/hlcgllvm@28354 -
2014-08-10 13:19:10 +00:00