Jonas Maebe
8fea7344c9
* added an extra parameter to ttai_typedconstbuilder.emit_pchar_const() to
...
indicate whether it should create a copy of the pchar or not
git-svn-id: trunk@34153 -
2016-07-19 14:30:36 +00:00
Jonas Maebe
8ca9ece66a
* fixed buffer overrun in tai_aggregatetypedconst.add_to_string()
...
git-svn-id: trunk@33988 -
2016-06-15 18:31:42 +00:00
nickysn
452d9b747b
* fixed code generation for initialized pointer variables, with the initial
...
value set to the address of an external variable in the i8086 medium and
compact memory models. Should fix Mantis #30107
git-svn-id: trunk@33981 -
2016-06-13 00:29:32 +00:00
Jonas Maebe
ccf011dbc5
* C-style blocks are implicit pointers -> don't parse such typed constants
...
as a record
git-svn-id: trunk@33924 -
2016-06-05 21:34:42 +00:00
Jonas Maebe
508038a691
+ emit_pchar_const() helper for high level typed const builder
...
git-svn-id: trunk@32899 -
2016-01-10 14:01:24 +00:00
Jonas Maebe
53bf43983a
+ support for emitting weak symbols with the high level typed constant builder
...
git-svn-id: trunk@32883 -
2016-01-07 22:06:06 +00:00
Jonas Maebe
1046c995a8
* ttai_typedconstbuilder.finalize_asmlist(): fixed handling of non-local
...
symbols that aren't AB_GLOBAL (e.g. AB_PRIVATE_EXTERN)
git-svn-id: trunk@32878 -
2016-01-07 22:05:28 +00:00
Jonas Maebe
926e62c886
+ tai_aggregatetypedconst.changetorecord() to change the type of an
...
aggregate to a (new) recorddef
o the size of the original type and that of the record must match
o will be used by the LLVM generator in case of a variant record, or
an array of variant records with constant data that does not match
our canonical LLVM definition
git-svn-id: trunk@32718 -
2015-12-25 21:05:40 +00:00
Jonas Maebe
f83f9168ee
* emit all resource strings and internal dynamic string data using the
...
def representing that string type, instead of using p(wide)char
o these string types are represented the same in llvm as p(wide)char,
but this way we can check whether the emitted data type matches the
expected one in the future
git-svn-id: trunk@32715 -
2015-12-25 21:05:26 +00:00
Jonas Maebe
5774238887
* always keep track of the field about to be emitted in curfield, as we
...
will need this for LLVM to determine whether the emitted data completely
matches the definition (if not, we have to create a def for the actual
data)
- removed no longer used fieldoffsets property
git-svn-id: trunk@32712 -
2015-12-25 21:05:12 +00:00
Jonas Maebe
ce40b2e449
* added/clarified some comments
...
* made internal method check_add_placeholder() protected
git-svn-id: trunk@32606 -
2015-12-07 09:17:11 +00:00
Jonas Maebe
ac743195b6
* fixup for r32534: don't define external symbols, only reference them
...
(mantis #29091 )
git-svn-id: trunk@32535 -
2015-11-26 07:56:50 +00:00
Jonas Maebe
ac18eb005f
* make the vectorized dead strip section symbol external for files that
...
don't define it
git-svn-id: trunk@32534 -
2015-11-25 22:25:54 +00:00
Jonas Maebe
f37576cf0f
* fixed type of resourcestrings in typed constants
...
git-svn-id: trunk@32467 -
2015-11-22 11:49:21 +00:00
Jonas Maebe
0bceb953e5
* fixed high level type of unicodestring records
...
git-svn-id: trunk@32466 -
2015-11-22 11:49:18 +00:00
Jonas Maebe
27219ae5ff
* actually assign the section name for end of the resourcestrings
...
git-svn-id: trunk@32430 -
2015-11-21 14:31:08 +00:00
florian
1142fdeccd
* initialize variables to avoid warnings
...
git-svn-id: trunk@32428 -
2015-11-21 14:14:30 +00:00
Jonas Maebe
f60a33f5af
* moved darwin/aix-specific code for resource string sections to
...
ttai_lowleveltypedconstbuilder (will have to be handled differently
for llvm)
git-svn-id: trunk@32427 -
2015-11-21 12:37:53 +00:00
Jonas Maebe
4974201d7f
+ provide way to specify a custom section name for vectorized dead strippable
...
sections
o does nothing by default, will be used by llvm
git-svn-id: trunk@32398 -
2015-11-21 12:36:20 +00:00
Jonas Maebe
91abc54314
* implemented emitting items in a vectorized dead strippable section to
...
high level typed constant builder
* converted resource string emission to this system
git-svn-id: trunk@32395 -
2015-11-21 12:36:10 +00:00
Jonas Maebe
96b529072a
* factored out generating the start and end of a vectorized dead strippable
...
section to the high level typed const builder, and use this functionality
for the resource strings (generating items: todo)
* fixed dead stripping unused resource strings (all string data was put in the
same section since r30342)
git-svn-id: trunk@32394 -
2015-11-21 12:36:06 +00:00
Jonas Maebe
964f8c9f9b
* factored out the creation of start/end symbols of vectorized dead strippable
...
sections such as the resourcestring data
git-svn-id: trunk@32391 -
2015-11-21 12:35:56 +00:00
Jonas Maebe
998cdbfe79
- removed useless ansistring pointer def creation from r32209
...
git-svn-id: trunk@32210 -
2015-10-30 20:56:34 +00:00
Jonas Maebe
0dee7cb4a0
* converted emitting resourcestring references to the high level typed
...
constant builder
git-svn-id: trunk@32209 -
2015-10-30 20:45:22 +00:00
yury
b26fa07f1a
* Fixed notes "var is assigned but not used".
...
git-svn-id: trunk@31734 -
2015-09-17 13:03:04 +00:00
Jonas Maebe
fa7ebba80d
+ new tcalo_no_dead_strip flag for the high level typed const builder to
...
indicate symbols that should never be removed by the linker
o TODO for llvm, needs support for the @llvm.used array (only used for
the compiler ident, so it's not that important
git-svn-id: trunk@31677 -
2015-09-14 16:10:51 +00:00
Jonas Maebe
f7948ff25f
* removed outdated comment
...
git-svn-id: trunk@31650 -
2015-09-12 23:33:31 +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
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
c946a85ae6
* give an internalerror if a typed const builder is finalised while there
...
is still an unfinished aggregate
git-svn-id: trunk@31254 -
2015-07-30 16:58:14 +00:00
Jonas Maebe
e93660c170
- removed ttai_lowleveltypedconstbuilder.queue_addrn(), as we are always
...
implicitly taking the address of a complex expression in a typed constant
(you cannot put the contents of another memory location in a typed
constant)
git-svn-id: trunk@31252 -
2015-07-30 16:58:07 +00:00
Jonas Maebe
0e42559047
* support for queueing an access to a series of fieldvarsyms by name in the
...
typed const builder
git-svn-id: trunk@31251 -
2015-07-30 16:58:04 +00:00
Jonas Maebe
6f4fe415e9
* support specifying the alignment of the start of an anonymous record
...
in the typed const builder (packrecords is not enough in case there are
only fields smaller than the desired alignment)
git-svn-id: trunk@31250 -
2015-07-30 16:58:01 +00:00
Jonas Maebe
6f5905684f
+ support for specifying the name of fields added to anonymous record
...
types that are constructed on the fly by the high level typed const
builder
git-svn-id: trunk@31249 -
2015-07-30 16:57:58 +00:00
Jonas Maebe
413680f593
* factored out getting a previously created internal type by name
...
git-svn-id: trunk@31247 -
2015-07-30 16:57:52 +00:00
Jonas Maebe
ddeab221c0
* when starting a queued expression, immediately emit any necessary padding
...
bytes,becayse if we emit them at the end then we may interpret the first
padding byte as the final component of the queued expression
git-svn-id: trunk@31246 -
2015-07-30 16:57:49 +00:00
Jonas Maebe
7a8b5fd6c5
* several fixes for emitting aggregate typed constants with C/ABI packing:
...
o don't emit explicit padding bytes (LLVM adds them)
o don't mark them in LLVM as packed either
git-svn-id: trunk@31187 -
2015-07-03 20:04:15 +00:00
Jonas Maebe
508828958c
* changed getprocaddressprocvar() into a tprocvardef.getreusableprocaddr()
...
class method
git-svn-id: trunk@31148 -
2015-06-23 21:23:22 +00:00
Jonas Maebe
f40ea04540
* changed getarraydef() into a tarraydef.getreusable() class method
...
git-svn-id: trunk@31147 -
2015-06-23 21:23:18 +00:00
Jonas Maebe
f402b0d7df
* changed getpointerdef() into a tpointerdef.getreusable() class method
...
o allows removing the ugly x86 hacks
git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
Jonas Maebe
8d0c5ecf5a
* added protected queue_is_active() function to determine whether the
...
complex typed constant expressions queue is currently active
git-svn-id: trunk@31058 -
2015-06-13 22:48:31 +00:00
Jonas Maebe
b5081d76c6
* since we insert the internal ansistring record types in the symtable of
...
the current module, also search it only there so that it doesn't depend
on the state of the symtablestack (hopefully fixes mantis #28109 )
git-svn-id: trunk@30879 -
2015-05-17 18:11:13 +00:00
Jonas Maebe
bd8079f896
* cache and reuse procvardefs internally created to get the address of a
...
procdef (halves the amount of memory needed to compile the googlapi
package using a build unit, as done by fpmake)
git-svn-id: trunk@30856 -
2015-05-14 15:36:20 +00:00
Jonas Maebe
65bcfdc42d
* support changing the tai field of a tai_simpletypedconst afterwards,
...
so we can insert type conversions in llvmtype if necessary
git-svn-id: trunk@30780 -
2015-05-03 16:50:58 +00:00
Jonas Maebe
3be51e1455
* fixed endless recursion in tabstractrecorddef.contains_float_field() in
...
case a record contains an internal typed constant of its own type
(which happened becuase such a typed constant is also fieldvarsym, solved
by checking for sp_static) (mantis #27880 )
* fixed several other similar cases in the compiler where we are only
interested in instance fields, but processed all fieldvarsyms
git-svn-id: trunk@30614 -
2015-04-16 21:25:22 +00:00
Jonas Maebe
a8db5e3dfb
* fixed alignment of widestring on win64 after llvm branch merge (should use
...
packrecords 4) (mantis #27806 )
git-svn-id: trunk@30501 -
2015-04-08 19:08:43 +00:00
Jonas Maebe
7b4bf9cc33
* fixed comment for emit_ansi/unicodestring_const() after changing those
...
class methods into instance methods
git-svn-id: trunk@30401 -
2015-04-01 15:43:07 +00:00
Jonas Maebe
a30f0bc289
* fixed -Oodfa warnings
...
git-svn-id: branches/hlcgllvm@30350 -
2015-03-28 12:28:21 +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
25e6eaf07f
* store the to be used recordalignmin and maxcrecordalign settings inside
...
(abstract)recordsymtables, so that these settings don't depend on the
current user settings when internally creating record definitions
git-svn-id: branches/hlcgllvm@30343 -
2015-03-27 21:25:56 +00:00