Commit Graph

36 Commits

Author SHA1 Message Date
Jonas Maebe
c4bcb45fea --- Merging r43650 into '.':
U    compiler/i386/cpupi.pas
U    compiler/ncgcal.pas
U    compiler/ncgutil.pas
U    compiler/systems/i_bsd.pas
U    compiler/systems/i_linux.pas
U    compiler/systems.inc

git-svn-id: branches/fixes_3_2@43683 -
2019-12-14 16:20:28 +00:00
florian
7cdb39b3f9 -- Aufzeichnung der Informationen für Zusammenführung von r43005 in ».«:
G   .
-- Aufzeichnung der Informationen für Zusammenführung von r43006 in ».«:
 G   .
-- Aufzeichnung der Informationen für Zusammenführung von r43007 in ».«:
 G   .
-- Aufzeichnung der Informationen für Zusammenführung von r43008 in ».«:
 G   .
-- Zusammenführen von r43000 in ».«:
U    compiler/pp.pas
-- Aufzeichnung der Informationen für Zusammenführung von r43000 in ».«:
 G   .
-- Zusammenführen von r43011 in ».«:
U    rtl/inc/system.inc
-- Aufzeichnung der Informationen für Zusammenführung von r43011 in ».«:
 G   .
-- Zusammenführen von r43012 in ».«:
U    rtl/i386/i386.inc
-- Aufzeichnung der Informationen für Zusammenführung von r43012 in ».«:
 G   .
-- Zusammenführen von r43013 in ».«:
U    rtl/linux/i386/si_c21.inc
-- Aufzeichnung der Informationen für Zusammenführung von r43013 in ».«:
 G   .
-- Zusammenführen von r43014 in ».«:
U    compiler/systems/i_linux.pas
-- Aufzeichnung der Informationen für Zusammenführung von r43014 in ».«:
 G   .
-- Zusammenführen von r43176 in ».«:
U    compiler/i386/cpupi.pas
U    compiler/i386/n386cal.pas
U    compiler/ncgcal.pas
U    compiler/ncgutil.pas
G    compiler/systems/i_linux.pas
U    compiler/systems.inc
C    compiler/systems.pas
G    tests/webtbs/tw7808.pp
-- Aufzeichnung der Informationen für Zusammenführung von r43176 in ».«:
 G   .
Konfliktübersicht:
  Textkonflikte: 1
Konfliktübersicht:
  Textkonflikte: 1

git-svn-id: branches/fixes_3_2@43434 -
2019-11-09 22:07:33 +00:00
Jonas Maebe
880d438704 * renamed t<cpuname>procinfo to tcpuprocinfo for all targets, so we can
inherit from it for LLVM without a thousand ifdefs

git-svn-id: trunk@35141 -
2016-12-16 22:41:21 +00:00
yury
862348c317 * Keep the GOT offset in a virtual register for i386 non-darwin platforms.
It fixes PIC code generation with GOT for i386 with enabled optimizations. Bugs #28667, #28668. 
  Prior the fix I have not been able to compile even RTL with -O2 due to not enough free registers, since EBX is reserved for GOT.

  It can be further optimized to teach register allocator to not spill the GOT register if possible.
  

git-svn-id: trunk@32020 -
2015-10-12 08:02:56 +00:00
Jonas Maebe
b1dc518ac4 * removed systems_need_16_byte_stack_alignment and use target_info.stackalign instead
git-svn-id: trunk@22279 -
2012-09-02 14:32:21 +00:00
Jonas Maebe
a5cb157091 * enable specifying the alignment mismatch of the frame/stack pointer
relative to the normal stack alignment of the target (e.g., when using
    ebp as framepointer, all addresses are offset 8 to the stack pointer) in
    the temp generator. This enables allocating temps/locals with the correct
    alignment as long as the required alignment is not bigger than the
    guaranteed stack pointer alignment (fixes mantis #15582 on systems where
    the stack pointer is at least aligned to 16 bytes; e.g., not yet on
    i386-platforms other than darwin)

git-svn-id: trunk@22277 -
2012-09-02 14:32:05 +00:00
pierre
34bc5ea624 * Use localalignmax in calc_stackframe_size method
git-svn-id: trunk@20938 -
2012-04-20 12:13:52 +00:00
Jonas Maebe
8b0301409a + i386/iphonesim target for the new iPhoneSimulator in Xcode 3.2.4 and
later: the same as i386/darwin, except
      a) uses the non-fragile Objective-C ABI/runtime
      b) does not require stubs for direct calls/jumps (not required for
         i386/darwin under 10.6 and later either, but still generated
         there for backwards compatibility)
      c) only the same packages are enabled as for ARM/Darwin
      d) MacOSAll is compiled specifically for the iPhoneSimulator SDK
    This target also defines the symbol "darwin" apart from the target
    name "iphonesim" for source code compatibility reasons.

git-svn-id: trunk@16065 -
2010-09-29 21:56:47 +00:00
Jonas Maebe
f13f6627c4 * moved use_fixed_stack from cgutils to a method in paramgr so it can
be used outside the code generator
  * renamed tabstractprocdef.requiredargarea into callerargareasize,
    and also added calleeargareasize field; added init_paraloc_info(side)
    method to init the parameter locations and init those size fields and
    replaced all "if not procdef.has_paraloc_info then ..." blocks with
    procdef.init_paraloc_info(callersize)"
  * moved detection of stack tainting parameters from psub to
    symdef/tabstractprocdef
  + added tcallparanode.contains_stack_tainting_call(), which detects
    whether a parameter contains a call that makes use of stack paramters
  * record for each parameter whether or not any following parameter
    contains a call with stack parameters; if not, in case the current
    parameter itself is a stack parameter immediately place it in its
    final location also for use_fixed_stack platforms rather than
    first putting it in a temporary location (part of mantis #17442)
  * on use_fixed_stack platforms, always first evaluate parameters
    containing a stack tainting call, since those force any preceding
    stack parameters of the current call to be stored in a temp location
    and copied to the final location afterwards

git-svn-id: trunk@16050 -
2010-09-26 21:24:14 +00:00
Jonas Maebe
3266f4e483 + Compiler support for pic on darwin/i386. The i386 rtl still needs
to be made pic-safe (mainly accesses to the global default8087cw)
  * At the same time also made the non-pic code abi-compliant (access
    external data via indirect symbol pointers etc)

    Darwin/i386 also puts the got into a virtual register (like
    Darwin/ppc), a.o. because the register allocator fails to colour
    a routine in aasmcpu.pas if we take away ebx from it.

git-svn-id: trunk@8657 -
2007-09-26 21:42:27 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
Jonas Maebe
3765a9bbb8 * fixed set_first_temp_offset for use_fixed_stack
git-svn-id: trunk@2866 -
2006-03-11 21:08:04 +00:00
Jonas Maebe
6e58ad4a12 * set firsttempoffset properly for use_fixed_stack
git-svn-id: trunk@2853 -
2006-03-11 13:54:03 +00:00
Jonas Maebe
9de2847865 + support for passing parameters via pre-allocated stack space on i386
(override/adjust cgutils.use_fixed_stack to change conditions where
     this is done, currently only activated for darwin-i386)
  * make sure the stack is always aligned to 16 bytes on darwin-i386

git-svn-id: trunk@2840 -
2006-03-10 19:59:44 +00:00
peter
e5ca17b598 * fix compilation for r1224
git-svn-id: trunk@1235 -
2005-09-30 05:59:34 +00:00
Jonas Maebe
f3384bab09 + some initial darwin/x86 stuff:
* align stack to 16 bytes
    * extended takes 16 bytes
    * <= 8 byte records are passed in registers

git-svn-id: trunk@1224 -
2005-09-29 11:31:26 +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
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
57a2fe6ddb + some code for PIC support added 2003-10-14 00:30:48 +00:00
peter
3a92a2a25a * parameter alignment fixes 2003-10-03 22:00:33 +00:00
peter
70fe77ca7c * procinfo unit contains tprocinfo
* cginfo renamed to cgbase
  * moved cgmessage to verbose
  * fixed ppc and sparc compiles
2003-10-01 20:34:48 +00:00
peter
2392f28675 * parameter fixes 2003-09-25 21:28:00 +00:00
peter
8af51ea6d3 * locals and paras are allocated in the code generation
* tvarsym.localloc contains the location of para/local when
    generating code for the current procedure
2003-09-23 17:56:05 +00:00
peter
3a3d710c47 * basics for x86 register calling 2003-09-09 21:03:17 +00:00
peter
6a8d5eb25d * NEWRA branch merged 2003-09-03 15:55:00 +00:00
peter
32d076480b * framepointer fixes for sparc
* parent framepointer code more generic
2003-07-06 17:58:22 +00:00
peter
0dceec9a64 * current_procdef removed, use current_procinfo.procdef instead 2003-06-13 21:19:30 +00:00
Jonas Maebe
2b312f6e8c * fixed compilation problems 2003-06-12 18:12:49 +00:00
peter
a0b9306652 * newra compiles for sparc 2003-06-12 16:43:07 +00:00
peter
c0995a3db1 * fix interrupt stack allocation 2003-05-25 10:26:15 +00:00
peter
437ce7f8a2 * removed some unit dependencies 2003-05-22 21:32:28 +00:00
peter
60978ba89c * aktprocdef renamed to current_procdef
* procinfo renamed to current_procinfo
  * procinfo will now be stored in current_module so it can be
    cleaned up properly
  * gen_main_procsym changed to create_main_proc and release_main_proc
    to also generate a tprocinfo structure
  * fixed unit implicit initfinal
2003-04-27 11:21:32 +00:00
peter
a5e7f02527 * updated for removed lexlevel 2003-04-27 07:48:05 +00:00
florian
e313bab4ff * first part of procinfo rewrite 2002-08-17 09:23:33 +00:00