Commit Graph

34 Commits

Author SHA1 Message Date
joost
e70c001dad --- Merging r42115 into '.':
U    compiler/i386/n386flw.pas
--- Recording mergeinfo for merge of r42115 into '.':
 U   .
--- Merging r43830 into '.':
U    compiler/i386/cpunode.pas
U    compiler/options.pas
--- Recording mergeinfo for merge of r43830 into '.':
 G   .

git-svn-id: branches/fixes_3_2@43978 -
2020-01-19 12:48:36 +00:00
Jonas Maebe
a0efde8167 * automatically generate necessary indirect symbols when a new assembler
symbol is defined
   o removed all places where AB_INDIRECT symbols were explicitly generated
   o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
   o for some symbols an indirect symbol is always required (because they are
     dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type

git-svn-id: trunk@34165 -
2016-07-20 20:53:03 +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
Jonas Maebe
b57c95043f + support overriding tdef/tsym methods with target-specific functionality:
o made all (non-abstract) tdef and tsym constructors virtual
   o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
     class
   o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
     class from the base classes, and initialises the c*def/c*sym classes with
     them. This is done so that the llvm target will be able to derive from
     the tcpu*def/sym classes without umpteen ifdefs, and it also means that
     the WPO can devirtualise everything because the c* variables are only
     initialised with one class type
   o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
     calls

git-svn-id: trunk@27361 -
2014-03-29 22:31:55 +00:00
sergei
179586f589 + SEH support for Win32. Enable by cycling with OPT=-dTEST_WIN32_SEH.
Although basic things work (no regressions in test suite, also with TEST_OPT=-O2), there are some secondary issues/TODOs:
- Exception frame around PASCALMAIN is not properly removed in DLLs
- No stack traces yet
- Stack overallocated in finalizer procedures, their entry/exit code needs cleanup
- Signals unit is probably completely broken.

git-svn-id: trunk@26225 -
2013-12-12 12:43:46 +00:00
Jonas Maebe
6165536b5e + added {$modeswitch objectivec1}/-Mobjectivec1 mode switch to enable
the use of Objective-C 1.0 constructs. Because it is a mode switch, it
    can be used cumulatively with every syntax mode. Note that a {$mode xxx}
    statement resets all mode switches as well, so you cannot use the
    -Mobjectivec1 variant if you have such a statement in a unit. This
    modeswitch is currently only enabled for Darwin/PowerPC and Darwin/i386,
    as the backend support is not yet implemented for other platforms.
  + implemented selector() statement that can be used to create an Objective-C
    selector for the message with the specified *constant* name (in the future,
    it will also work for Objective-C method identifiers)
  + added SEL type to the system unit (the selector() statement returns it)
  + added all Objective-C segments to the assembler writers
  + (currently mostly dummy) objc1 unit that is automatically included if the
    {$modeswitch objectivec1} statement is used
  + some tests for the selector() statement

git-svn-id: trunk@12870 -
2009-03-08 18:40:32 +00:00
florian
a2fd319a20 * nx86cnv.pas must set ctypeconv node properly
* nx86cnv must be used

git-svn-id: trunk@787 -
2005-08-03 20:29:38 +00:00
florian
b222cc7519 - n386cnv.pas removed, was empty
git-svn-id: trunk@786 -
2005-08-03 20:21:55 +00:00
florian
ebcb69478f * fixed a lot of stuff for fpu/mm register variables
git-svn-id: trunk@199 -
2005-06-04 21:23:15 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
e820bc93f2 * interface wrapper generation moved to cgobj
* generate interface wrappers after the module is parsed
2005-01-24 22:08:32 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
00dbe6655d + nx86set added
* some more x86-64 fixes
2004-02-22 12:04:04 +00:00
florian
7f04bb7272 * ncgopt replaces n386opt 2003-04-24 11:19:13 +00:00
peter
d551c5d867 * i386 uses now the generic exception management from ncgflw 2002-08-24 18:35:42 +00:00
peter
4b81e16fe2 * tempgen cleanup
* tt_noreuse temp type added that will be used in genentrycode
2002-08-23 16:14:48 +00:00
peter
98dd65b0f3 * inlining is now also allowed in interface
* renamed write/load to ppuwrite/ppuload
  * tnode storing in ppu
  * nld,ncon,nbas are already updated for storing in ppu
2002-08-18 20:06:23 +00:00
carl
ebbd8e9e04 + added generic inline nodes 2002-07-25 18:01:58 +00:00
carl
63e0f03f63 + generic set handling 2002-07-06 20:27:26 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
4a176c81bc * removed n386ld and n386util units
* maybe_save/maybe_restore added instead of the old maybe_push
2002-05-13 19:54:36 +00:00
peter
8d0751ff97 * removed some more routines from cga
* moved location_force_reg/mem to ncgutil
  * moved arrayconstructnode secondpass to ncgld
2002-04-19 15:39:34 +00:00
Jonas Maebe
7fb55bf4e4 + a_loadfpu_* and a_loadmm_* methods in tcg
* register allocation is now handled by a class and is mostly processor
    independent (+rgobj.pas and i386/rgcpu.pas)
  * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  * some small improvements and fixes to the optimizer
  * some register allocation fixes
  * some fpuvaroffset fixes in the unary minus node
  * push/popusedregisters is now called rg.save/restoreusedregisters and
    (for i386) uses temps instead of push/pop's when using -Op3 (that code is
    also better optimizable)
  * fixed and optimized register saving/restoring for new/dispose nodes
  * LOC_FPU locations now also require their "register" field to be set to
    R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  - list field removed of the tnode class because it's not used currently
    and can cause hard-to-find bugs
2002-03-31 20:26:33 +00:00
Jonas Maebe
39f67208a8 * made most constant and mem handling processor independent 2001-09-30 16:17:17 +00:00
Jonas Maebe
fc6d300a95 * almost all second pass typeconvnode helpers are now processor independent
* fixed converting boolean to int64/qword
  * fixed register allocation bugs which could cause internalerror 10
  * isnode and asnode are completely processor indepent now as well
  * fpc_do_as now returns its class argument (necessary to be able to use it
    properly with compilerproc)
2001-09-29 21:32:46 +00:00
Jonas Maebe
b374bec6fb * changed all flow control structures (except for exception handling
related things) to processor independent code (in new ncgflw unit)
  + generic cgobj unit which contains lots of code generator helpers with
    global "cg" class instance variable
  + cgcpu unit for i386 (implements processor specific routines of the above
    unit)
  * updated cgbase and cpubase for the new code generator units
  * include ncgflw unit in cpunode unit
2001-09-28 20:39:32 +00:00
peter
767062cb3b * tasmnode.pass_2 is independent of cpu, moved to ncgbas
* include ncgbas for independent nodes
2001-05-18 22:31:06 +00:00
peter
b87b73d9bf * made tclassheader using class of to implement cpu dependent code 2001-04-21 13:37:16 +00:00
Jonas Maebe
4c8ca9774f + implemented/fixed docompare() mathods for all nodes (not tested)
+ nopt.pas, nadd.pas, i386/n386opt.pas: optimized nodes for adding strings
    and constant strings/chars together
  * n386add.pas: don't copy temp strings (of size 256) to another temp string
    when adding
2000-12-31 11:14:10 +00:00
peter
4286d3e9bb * moved cpu*.pas to i386/
* renamed n386 to common cpunode
2000-10-15 09:39:36 +00:00