Commit Graph

47411 Commits

Author SHA1 Message Date
Jonas Maebe
554be0c301 * fixed hlcg type correctness when getting the address of a virtual method
o handle interfaces like classrefdef, since they also point to the vmt

git-svn-id: trunk@32414 -
2015-11-21 12:37:11 +00:00
Jonas Maebe
a3cdf466e3 * fixed type of proc address when loading a complex procvar
git-svn-id: trunk@32413 -
2015-11-21 12:37:08 +00:00
Jonas Maebe
9a0cb50a08 * converted the result of fullownerhierarchyname to tsymstr so it (and
contcatenations based on it) can be longer than 255 characters in
    case tsymstr=ansistring

git-svn-id: trunk@32412 -
2015-11-21 12:37:04 +00:00
Jonas Maebe
eaeb9d8351 * renamed thlcgobj.g_set_addr_nonbitpacked_record_field_ref() to
thlcgobj.g_set_addr_nonbitpacked_field_ref() and adjusted it so that
    it also works for objects/classes (if the incoming reference points
    to the start of the class contents)
   o factored out the related code from tllvmsubscriptnode

git-svn-id: trunk@32411 -
2015-11-21 12:37:01 +00:00
Jonas Maebe
c8a5994e2e * fixed size used for left in in_smallset (it's been forced in a register
of size opdef a few lines before)

git-svn-id: trunk@32410 -
2015-11-21 12:36:58 +00:00
Jonas Maebe
1284032765 + llvm blockaddress() intrinsic (supported as of LLVM 3.5.1)
git-svn-id: trunk@32409 -
2015-11-21 12:36:55 +00:00
Jonas Maebe
949fd53a0a - reverted r32315: targets using the high level code generator should keep
complex procvars either in a single "register", or in memory

git-svn-id: trunk@32408 -
2015-11-21 12:36:51 +00:00
Jonas Maebe
bd4787c716 * force complex procvars immediately to memory for llvm, so we don't have to
deal with the hacky register/registerhi complex locations

git-svn-id: trunk@32407 -
2015-11-21 12:36:48 +00:00
Jonas Maebe
ae5a355f06 * helpers to load registers/constants into a record field at the hlcg level
git-svn-id: trunk@32406 -
2015-11-21 12:36:45 +00:00
Jonas Maebe
8d8851afd6 * set minimum alignment for pchar to 1 instead of 0 (llvm doesn't
support alignment 0)

git-svn-id: trunk@32405 -
2015-11-21 12:36:42 +00:00
Jonas Maebe
7b93e40530 * fixed opcode in second_sqr_real
git-svn-id: trunk@32404 -
2015-11-21 12:36:39 +00:00
Jonas Maebe
7ce34ac7d2 * fixed code generator type correctness when loading a resourcestring
git-svn-id: trunk@32403 -
2015-11-21 12:36:35 +00:00
Jonas Maebe
ba37a48bcb * support OS_32..OS_128 as source size for LOC_(C)MMREGISTER records
in a_load_ref_cgpara() (if a record is located in memory and needs
    to be passed in mmregisters)

git-svn-id: trunk@32402 -
2015-11-21 12:36:32 +00:00
Jonas Maebe
8e43a8a9cf * changed fix for reusable defs and exceptiontables again: we cannot create
reusable defs for defs in exceptionsymtables, or indeed use any defs from an
    exceptionsymtable in the high level code generator, as those defs are freed
    before the module is completely compiled -> crashes while trying to use them
    in the assembly writing phase ->
   o when the symtablestack top is an exception symtable, keep looking for
     another symtable to put the def in
   o give an internalerror if we encounter a def in an exceptionsymtable anyway
     in getreusablesymtab

git-svn-id: trunk@32401 -
2015-11-21 12:36:29 +00:00
Jonas Maebe
91e8f4c439 + custom section name support for llvm
git-svn-id: trunk@32400 -
2015-11-21 12:36:26 +00:00
Jonas Maebe
92ba1c90a1 * set default machinetype for mach-o/ARM
git-svn-id: trunk@32399 -
2015-11-21 12:36:23 +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
416894f206 * converted tnodeutils.InsertResourceTablesTable() to the high level typed
const builder
   o also put the resourcestring tables table in rodata instead of in data,
     since it doesn't change at run time (unlike the individual resourcestring
     tables)

git-svn-id: trunk@32397 -
2015-11-21 12:36:16 +00:00
Jonas Maebe
d303e15eae * support custom section names for Darwin platforms
git-svn-id: trunk@32396 -
2015-11-21 12:36:13 +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
f22c7cc3fc - removed "packed" and dummy field (that was required because of
the "packed" keyword) from the TResourceStringRecord record

git-svn-id: trunk@32393 -
2015-11-21 12:36:03 +00:00
Jonas Maebe
fbc97cc426 - removed new object/section commands for the al_const list when emitting
resourcestrings, as this is already handled by the typed constant
    builder

git-svn-id: trunk@32392 -
2015-11-21 12:36:00 +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
nickysn
d5428ee210 * the CaseSensitive property in TOmfObjInput renamed CaseSensitiveSegments,
because it only applies to segments/groups/overlays and not symbols.

git-svn-id: trunk@32389 -
2015-11-21 11:25:21 +00:00
svenbarth
89d37c1e69 pgentype.pas:
+ new constant inline_specialization_block_types to easily keep track of block types in which inline specialization is allowed
pexpr.pas:
  * use new inline_specializatio_block_types instead of a inline constant set

git-svn-id: trunk@32388 -
2015-11-21 11:05:58 +00:00
svenbarth
0471db5bb6 pexpr.pas, factor.factor_read_id:
* handle specializations after a type symbol

git-svn-id: trunk@32387 -
2015-11-21 10:52:19 +00:00
Jeppe Johansen
9aa3c23b18 Added a bunch of new and fixed embedded controller units. From Michael Ring.
git-svn-id: trunk@32386 -
2015-11-21 10:30:49 +00:00
nickysn
4da9296f80 * disabled the name mangling of external non-cdecl and non-cppdecl procedures
that don't have an import name specified explicitly. The previous behaviour
  wasn't very useful, because it included the current module name in the mangled
  name and that was very unlikely to be the correct name of a routine in a
  different module. The new behaviour is also BP7 and Delphi compatible.

git-svn-id: trunk@32385 -
2015-11-20 23:14:53 +00:00
svenbarth
ae8316b1b4 Implement two phase specialization to support inline specialization of generic functions in non-Delphi modes.
pexpr.pas, factor.factor_read_id:
  * instead of using generate_specialization() use generate_specialization_phase1() and (for non-procdefs) generate_specialization_phase2
  * pass generated specialization context for procdef on to the generated call nodes which do the second part of the specialization then

git-svn-id: trunk@32384 -
2015-11-20 18:37:32 +00:00
svenbarth
3c41e50f2f Implement generation of method bodies for generic functions.
psub.pas, specialize_objectdefs:
  + new nested procedure process_procdef() to handle the generation of method bodies for procdefs both in generic types as well as of generic functions
  + new nested procedure process_procsym() to handle the generation of method bodies for each specialization procdef of a procsym
  * allow all procsyms and recursively walk all non-generic types to find all method bodies that need to be generated

git-svn-id: trunk@32383 -
2015-11-20 18:01:18 +00:00
nickysn
e4b77c7aab * accept omf object modules, containing LINNUM and LINNUM32 records in the
i8086-msdos internal linker

git-svn-id: trunk@32382 -
2015-11-20 17:41:35 +00:00
nickysn
30a7875d56 + added hack for supporting linking with .obj files, generated by Borland's
binobj tool with the i8086-msdos internal linker

git-svn-id: trunk@32381 -
2015-11-20 17:40:34 +00:00
svenbarth
d3660fec31 Implement support for parsing "generic [class] procedure" and "generic [class] function" in non-Delphi modes. Since "generic" is a prefix it is quite ugly to implement, but from a Pascal language point of view it fits better than "procedure generic xyz".
Supporting such a prefix of course means that all section handling code ("var", "type", etc.) needs to respect the case of a "generic" token followed by "function", "procedure" or "class" and thus abort doing its own business.
Maybe I'll find the time somewhen in the future to rework the parser (plus scanner?) a bit so that code like this gets more easy to add and more importantly less ugly.

pdecsub.pas:
  * extend parse_proc_dec() and parse_record_method_dec() so that they can be told that they are supposed to handle the to be parsed function/procedure/method header as a generic
pdecvar.pas:
  + new entry for tvar_dec_option named "vd_check_generic" to tell read_var_decls() and read_record_fields() to look out for "generic"
  * extend read_var_decls() and read_record_fields() to check for "generic" if needed and to clean up correctly if it is encountered
pdecl.pas:
  * the section handling procedures types_dec(), resourcestring_dec(), var_dec(), threadvar_dec() and consts_dec() all return whether they had encountered a "generic" token that was followed by one of $
pdecobj.pas:
  * extend method_dec() to take a parameter that says whether the method is supposed to be a generic one
  * parse_object_members: while read_record_fields() can handle "generic" we also need to handle the case of "generic" if no fields are allowed anymore
psub.pas:
  * extend read_proc() by the possibility to tell it that the procedure/function to be parsed is supposed to be generic
  * adjust read_declarations() and read_interface_declarations() to keep track of parsed "generic" tokens and to pass them on accordingly
ptype.pas:
  * parse_record_members: same remark as for pdecobj.parse_object_members

git-svn-id: trunk@32380 -
2015-11-20 16:50:58 +00:00
nickysn
ba66456bdb * properly determine the operand size for inline assembler references to procvar
variables without a manually specified size override such as 'dword ptr'.
  Mantis #29010.

git-svn-id: trunk@32379 -
2015-11-20 16:29:40 +00:00
marco
581f1188a5 * deprecated dt routines in unixutils. Julian routines already were
duplicated to the implementations of dos & sysutils.
   localtoepoch and vv not yet.

git-svn-id: trunk@32378 -
2015-11-20 15:06:29 +00:00
Jeppe Johansen
291434be22 Enabled internal assembler for arm-linux. Will allow people to start running tests.
git-svn-id: trunk@32377 -
2015-11-20 14:37:10 +00:00
michael
c5495cb49c * Examples
git-svn-id: trunk@32376 -
2015-11-20 11:34:44 +00:00
svenbarth
74c79803f7 Extend tlocalvarsym with the ability to not register it if needed.
git-svn-id: trunk@32375 -
2015-11-20 11:29:21 +00:00
michael
a192c54e7d * Basedir support
git-svn-id: trunk@32374 -
2015-11-20 11:26:58 +00:00
svenbarth
0ac12f0eaf Extend tstaticvarsym (and by extension tabstractnormalvarsym) with the capability to create it as unregistered if needed.
git-svn-id: trunk@32373 -
2015-11-20 11:15:30 +00:00
svenbarth
922646d106 Adjust tfieldvarsym (and by extension tabstractvarsym) so that it can be created as not registered if needed.
git-svn-id: trunk@32372 -
2015-11-20 10:43:25 +00:00
svenbarth
fe39de1573 pexpr.pas:
* sub_expr: don't extract the def from the node using gettypedef, but use the already retrieved symbol instead

git-svn-id: trunk@32371 -
2015-11-20 10:22:08 +00:00
nickysn
885af367f8 * use OEM_FIXED_FONT instead of SYSTEM_FIXED_FONT in the win16 video unit
git-svn-id: trunk@32370 -
2015-11-19 23:47:41 +00:00
michael
b651a8925e * Observe TZ and TZDir when determining timezone
git-svn-id: trunk@32369 -
2015-11-19 22:34:23 +00:00
Jonas Maebe
fd0c2f36e5 * don't parse "flags" as a register name in the Intel assembler reader
(mantis #29040)

git-svn-id: trunk@32368 -
2015-11-19 19:40:06 +00:00
nickysn
8e9256a93c * fixed IDE compilation with GDBMI=1 (mantis #28890)
git-svn-id: trunk@32367 -
2015-11-19 17:28:37 +00:00
pierre
7250cdb43e Regenerated after: Use explicit rules for all units, needed for GNU make 3.82
git-svn-id: trunk@32366 -
2015-11-19 17:27:00 +00:00
pierre
9c50d25ccc Use explicit rules for all units, needed for GNU make 3.82
git-svn-id: trunk@32365 -
2015-11-19 17:26:26 +00:00
pierre
25ddd745b7 Regenerated after: Fix cross-compilation from win32 using GNU make 3.82
git-svn-id: trunk@32364 -
2015-11-19 15:57:20 +00:00