Commit Graph

15 Commits

Author SHA1 Message Date
Jonas Maebe
4686f61002 * keep track of the temp position separately from the offset in references,
so that they can still be freed after the reference has been changed
    (e.g. in case of array indexing or record field accesses) (mantis #33628)

git-svn-id: trunk@38814 -
2018-04-22 17:03:16 +00:00
nickysn
ae52295232 * fixes for Seg(proc) for i8086
git-svn-id: trunk@37727 -
2017-12-13 16:56:01 +00:00
nickysn
8d18dafe34 * in the i8086 load node, when generating static/global var access to variables
in the default data segment, set their treference.segment to NR_DS, in order
  to avoid creating redundant segment relocations to the default data segment
  (which is a problem with win16 multiple instance applications). Redundant
  segment overrides are stripped later anyway, so it doesn't hurt the generated
  code.

git-svn-id: trunk@37715 -
2017-12-11 20:06:42 +00:00
nickysn
303309b28f + added support for 'external far' variables for i8086
git-svn-id: trunk@37532 -
2017-10-30 18:03:44 +00:00
Jonas Maebe
a25ebbba3e + added volatility information to all memory references
o separate information for reading and writing, because e.g. in a
     try-block, only the writes to local variables and parameters are
     volatile (they have to be committed immediately in case the next
     instruction causes an exception)
   o for now, only references to absolute memory addresses are marked
     as volatile
   o the volatily information is (should be) properly maintained throughout
     all code generators for all archictures with this patch
   o no optimizers or other compiler infrastructure uses the volatility
     information yet
   o this functionality is not (yet) exposed at the language level, it
     is only for internal code generator use right now

git-svn-id: trunk@34996 -
2016-11-27 18:17:37 +00:00
Jonas Maebe
0afbe85aab * various memory reference alignment fixes
git-svn-id: trunk@34544 -
2016-09-20 21:43:19 +00:00
Jonas Maebe
aa1be3276f - removed default value of _typ parameter of TAsmData.(Weak)RefAsmSymbol():
it was AT_NONE, which is invalid and should never be used
  * explicitly pass the correct value for all calls to those methods elsewhere
    in the compiler

git-svn-id: trunk@34250 -
2016-08-05 07:09:16 +00:00
nickysn
66725cf170 * fixed huge memory model threadvars after r32013
git-svn-id: trunk@32016 -
2015-10-11 12:55:44 +00:00
nickysn
aa57e7e835 * moved the i8086-specific threadvar generation code from
ti8086loadnode.pass_generate_code to ti8086loadnode.generate_threadvar_access

git-svn-id: trunk@31699 -
2015-09-15 13:02:25 +00:00
Jonas Maebe
3c6aa91a96 * factored out the loading of threadvars in its own method, and put the
x86-specific part in nx86ld

git-svn-id: trunk@31639 -
2015-09-12 23:32:53 +00:00
nickysn
69042574b2 * assume external variables are in a different segment in the huge memory model
git-svn-id: trunk@31517 -
2015-09-04 19:39:55 +00:00
nickysn
2087290802 * i8086 huge memory model threadvar code generation fixes
git-svn-id: trunk@31516 -
2015-09-04 19:15:10 +00:00
nickysn
2b42c17318 + also initialize the proper (foreign) segment when loading a global variable
from another unit in the huge memory model

git-svn-id: trunk@31515 -
2015-09-04 16:05:52 +00:00
nickysn
f4a0c08736 * fixed nested access to parent local variables in i8086 far data memory models
git-svn-id: trunk@27388 -
2014-03-30 17:50:35 +00:00
Jonas Maebe
4a79481c51 * isolated segment-related functionality of tabsolutevarsym into i386/i8086-
specific descendent classes and moved the code that deals with this in the
    code generator also to target-specific classes -> only ifdefs left in
    pdecvar

git-svn-id: trunk@27379 -
2014-03-30 15:42:53 +00:00