Commit Graph

131 Commits

Author SHA1 Message Date
florian
319b575012 -- Aufzeichnung der Informationen für Zusammenführung von r43503 in ».«:
U   .
-- Zusammenführen von r43506 in ».«:
U    compiler/x86/cgx86.pas
-- Aufzeichnung der Informationen für Zusammenführung von r43506 in ».«:
 G   .
-- Zusammenführen von r43508 in ».«:
U    compiler/i386/n386cal.pas
-- Aufzeichnung der Informationen für Zusammenführung von r43508 in ».«:
 G   .

git-svn-id: branches/fixes_3_2@43510 -
2019-11-17 20:16:02 +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
Károly Balogh
f5f895e2a3 syscalls: unify call reference creation across 4 different CPU archs. less copypasted code, brings x86_64 AROS support up to speed
git-svn-id: trunk@35034 -
2016-12-02 09:29:09 +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
Károly Balogh
c7c37f66ed * refactored syscall types for unified naming,first bits of ARM AROS syscall support
git-svn-id: trunk@34806 -
2016-11-06 12:41:56 +00:00
Károly Balogh
464ecab542 huge syscall support refactor for Amiga-likes. removed large chunks of ancient duplicated code, and in general tried to make the entire thing more maintainable and cleaner. also added support for AROS EAXBase syscall convention
git-svn-id: trunk@34416 -
2016-09-03 07:57:23 +00:00
Károly Balogh
4ed3a3f09a * re-read the libbase already pushed on the stack for AROS syscalls, instead of trying to re-resolve it. should fix threadvar libbases on AROS.
git-svn-id: trunk@33455 -
2016-04-08 22:42:29 +00:00
Károly Balogh
4ee15b84da AROS: syscall (library call) support for based on the Amiga/68k and MorphOS/PPC versions
git-svn-id: trunk@28463 -
2014-08-19 00:39:18 +00:00
pierre
1cec09f979 Add -Caoldwin32gnu ABI option to cope with 'ret $4' issues in old GNU mingw32 C compiler (version below 4.7)
git-svn-id: trunk@26536 -
2014-01-20 22:47:46 +00:00
yury
e13e2e1697 * Turn off special handling of interrupt calling convention for i386-android.
git-svn-id: branches/targetandroid@23492 -
2013-01-22 14:43:42 +00:00
paul
51825b6f2e compiler: change ret_in_param to accept tabstractprocdef instead of tproccalloption to allow check more options (required for record constructor implementation)
git-svn-id: trunk@23394 -
2013-01-16 01:14:23 +00:00
pierre
2fdd8656d5 * Fix tw18702.pp i386-win32 specific failure (stack was not properly maintained)
git-svn-id: trunk@22617 -
2012-10-12 14:00:35 +00:00
Jonas Maebe
b837694207 * factored out releasing an unused return value into
release_unused_return_value_cpu(), so it can be cleanly
    overridden by cpu-specific code

git-svn-id: branches/jvmbackend@18322 -
2011-08-20 07:45:44 +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
joost
b938ea0f2a * For cdecl functions the funcret is not popped by the caller when it is passed
as a para. But in case of the safecall convention, the funcret is always
   returned as para and from the c point-of-view this is a normal para. So it has
   to be popped normally. This was done by correcting the pop_size in 
   ti386callnode.pop_parasize but it's better to do this directly in 
   tcgcallnode.pass_generate_code.

git-svn-id: trunk@15994 -
2010-09-15 20:18:36 +00:00
joost
65ab1e820b * Safecall on linux/i386 now behaves like cdecl plus hidden exception support.
* Adapted tests because safecall on linux/i386 now does not include high() 
   support anymore

git-svn-id: trunk@15913 -
2010-08-27 19:07:22 +00:00
Jonas Maebe
02adc2b6ab * fixed calling cdecl routines under win32 which return their result in
a structure whose address is passed by the caller (the caller is
    responsible there to remove the address from the stack, unlike on
    e.g. linux/i386 and darwin/i386) (mantis #9013)

git-svn-id: trunk@7667 -
2007-06-15 12:48:12 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
d8dc5679e3 * aktcputype and aktoptimizecputype was missing in the previous optimization commits
git-svn-id: trunk@2907 -
2006-03-13 12:29:56 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
5f0f08dd18 * fixed calling cdecl functions which return a large record with
use_fixed_stack on i386

git-svn-id: trunk@2872 -
2006-03-11 22:12:20 +00:00
Jonas Maebe
431cead7a2 * more disabling of interrupt code for i386-darwin
git-svn-id: trunk@2862 -
2006-03-11 15:10:20 +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
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
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
peter
65c3ba277c * ungetregister is now only used for cpuregisters, renamed to
ungetcpuregister
  * renamed (get|unget)explicitregister(s) to ..cpuregister
  * removed location-release/reference_release
2004-09-25 14:23:54 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
florian
bbf7300a0c * Florian's culmutative nr. 1; contains:
- invalid calling conventions for a certain cpu are rejected
    - arm softfloat calling conventions
    - -Sp for cpu dependend code generation
    - several arm fixes
    - remaining code for value open array paras on heap
2003-11-07 15:58:32 +00:00
peter
fb81b7ebbb * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
* tregisteralloctor renamed to trgobj
  * removed rgobj from a lot of units
  * moved location_* and reference_* to cgobj
  * first things for mmx register allocation
2003-10-10 17:48:13 +00:00
daniel
b2343f4b16 * Register allocator splitted, ans abstract now 2003-10-09 21:31:37 +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
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
6a8d5eb25d * NEWRA branch merged 2003-09-03 15:55:00 +00:00
peter
414bd5fa22 * more sparc cleanup
* accumulator removed, splitted in function_return_reg (called) and
    function_result_reg (caller)
2003-05-30 23:57:08 +00:00
peter
047a066711 * procinlinenode removed
* aktexit2label removed, fast exit removed
  + tcallnode.inlined_pass_2 added
2003-05-26 21:17:17 +00:00
peter
437ce7f8a2 * removed some unit dependencies 2003-05-22 21:32:28 +00:00
daniel
9e2084b8d5 * Further register allocator work. Compiler now smaller with new
allocator than without.
  * Somebody forgot to adjust ppu version number
2003-04-23 14:42:07 +00:00
peter
9ed2ce8c12 * removed some notes/hints 2003-04-22 14:33:38 +00:00
daniel
25059e21b6 + Implemented the actual register allocator
+ Scratch registers unavailable when new register allocator used
  + maybe_save/maybe_restore unavailable when new register allocator used
2003-04-22 10:09:34 +00:00
peter
6a16389f67 * moved generic code from n386cal to ncgcal, i386 now also
uses the generic ncgcal
2003-04-04 15:38:56 +00:00
peter
4a0b87ac59 * fix classmethod from classmethod call
* move BeforeDestruction/AfterConstruction calls to
    genentrycode/genexitcode instead of generating them on the fly
    after a call to a constructor
2003-03-30 20:59:07 +00:00
peter
c4ddcc78a8 * generic constructor working for i386
* remove fixed self register
  * esi added as address register for i386
2003-03-28 19:16:56 +00:00
Jonas Maebe
e8a0c0cd62 * and more new register allocator fixes (in the i386 code generator this
time). At least now the ppc cross compiler can compile the linux
    system unit again, but I haven't tested it.
2003-03-13 19:52:23 +00:00
daniel
436e47a87d * Fixed internalerror 7843 issue 2003-03-06 11:35:50 +00:00
daniel
86bcea6ef5 * Code generator converted to new register notation
- Horribily outdated todo.txt removed
2003-02-19 22:00:14 +00:00