Commit Graph

229 Commits

Author SHA1 Message Date
sergei
cbad0abab5 + Platform-specific exception support for x86_64-win64. Enable by cycling with OPT=-dTEST_WIN64_SEH.
git-svn-id: trunk@20098 -
2012-01-16 23:13:31 +00:00
florian
d7f7a9bb76 * patch by Alexander Shishkin to clean up $ifopt usage by $push/$pop, resolves #20346
git-svn-id: trunk@19256 -
2011-09-27 20:22:40 +00:00
sergei
b997094755 + Generate unwind bytecode for function prologues on win64.
* For now placed actual processing of unwind info under {$ifdef TEST_WIN64_UNWIND}, because in the current state it doesn't add much value.

git-svn-id: trunk@19200 -
2011-09-23 21:22:25 +00:00
sergei
1365467b0d + Support classes for creating unwind bytecode for Win64.
git-svn-id: trunk@19071 -
2011-09-15 15:35:08 +00:00
sergei
3eaf8df446 * Don't use hardcoded value for maxoutputlists
git-svn-id: trunk@17734 -
2011-06-13 07:11:56 +00:00
Jonas Maebe
a03a597374 * don't call assembler when using -s in combination with -ap (mantis #19401)
git-svn-id: trunk@17712 -
2011-06-10 13:42:59 +00:00
sergei
5bda700410 * External assemblers: moved some common code into the base class, 4 copies reduced to one.
git-svn-id: trunk@17561 -
2011-05-26 13:10:49 +00:00
Jonas Maebe
2c94ef0f09 * quote the path to the assembler if necessary when using popen(), since
it's based on calling "/bin/sh -c $cmdline" (mantis #19316)

git-svn-id: trunk@17423 -
2011-05-09 21:27:36 +00:00
mazen
b127fc154a * Fixed spell error revealed by lintian.
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
pierre
7c04d8d13b From patch submitted by Willibald Krenn in Bug Report 17500.
* assemble.pas (TInternalAssembler.WriteStab): Use RELOC_ABSOLUTE32 for
   32-bit stab entry.
 * ogcoff.pas: Add check for correct generated reloc section size.
 * systems/t_win.pas: Use 0x400000 image base for x86_64 programs using
   stabs debug information format.

git-svn-id: trunk@16056 -
2010-09-28 10:06:54 +00:00
Jonas Maebe
025ec34e4d + "CExtended" type that is the same as "extended", but conforming to the
properties/behaviour of the equivalent of Extended in C (i.e., to
    "long double" on i386 and x86_64 platforms that support a 10 byte
    long double, and to "double" elsewhere)

git-svn-id: trunk@14912 -
2010-02-14 13:45:58 +00:00
Jonas Maebe
28cd8271c9 * initial version of internal Mach-O/i386 assembler by Dmitry Boyarintsev
(mantis #15163)

git-svn-id: trunk@14628 -
2010-01-12 19:52:55 +00:00
Jonas Maebe
d1538ab023 o added ARM VPFv2/VFPv3 support:
+ RTL support:
      o VFP exceptions are disabled by default on Darwin,
        because they cause kernel panics on iPhoneOS 2.2.1 at least
      o all denormals are truncated to 0 on Darwin, because disabling
        that also causes kernel panics on iPhoneOS 2.2.1 (probably
        because otherwise denormals can also cause exceptions)
    * set softfloat rounding mode correctly for non-wince/darwin/vfp
      targets
    + compiler support: only half the number of single precision
      registers is available due to limitations of the register
      allocator
    + added a number of comments about why the stackframe on ARM is
      set up the way it is by the compiler
    + added regtype and subregtype info to regsets, because they're
      also used for VFP registers (+ support in assembler reader)
    + various generic support routines for dealing with floating point
      values located in integer registers that have to be transferred to
      mm registers (needed for VFP)
    * renamed use_sse() to use_vectorfpu() and also use it for
      ARM/vfp support
    o only superficially tested for Linux (compiler compiled with -Cpvfpv6
      -Cfvfpv2 works on a Cortex-A8, no testsuite run performed -- at least
      the fpu exception handler still needs to be implemented), Darwin has
      been tested more thoroughly
  + added ARMv6 cpu type and made it default for Darwin/ARM
  + ARMv6+ implementations of atomic operations using ldrex/strex
  * don't use r9 on Darwin/ARM, as it's reserved under certain
    circumstances (don't know yet which ones)
  * changed C-test object files for ARM/Darwin to ARMv6 versions
  * check in assembler reader that regsets are not empty, because
    instructions with a regset operand have undefined behaviour in that
    case
  * fixed resultdef of tarmtypeconvnode.first_int_to_real in case of
    int64->single type conversion
  * fixed constant pool locations in case 64 bit constants are generated,
    and/or when vfp instructions with limited reach are present

  WARNING: when using VFP on an ARMv6 or later cpu, you *must* compile all
    code with -Cparmv6 (or higher), or you will get crashes. The reason is
    that storing/restoring multiple VFP registers must happen using
    different instructions on pre/post-ARMv6.

git-svn-id: trunk@14317 -
2009-12-03 22:46:30 +00:00
florian
4123e0425c * don't generate instruction alignment fill bytes in non exectuable sections
git-svn-id: trunk@14251 -
2009-11-21 22:34:46 +00:00
Jonas Maebe
e393446769 * fixed several omissions that could cause the dynamic linker not to
register required classes:
    + add lazy references to classes referred to in the current unit
    + define reference symbols for classes defined in the current unit
    + add lazy references to parent classes of classes defined in the current
      unit

git-svn-id: branches/objc@13679 -
2009-09-08 16:05:41 +00:00
yury
b1427bad2e * Fixed internal assembler writer to handle offset calculations with forward symbols involved. Internal assembler can handle dwarf debug info now.
git-svn-id: trunk@13096 -
2009-05-04 11:19:48 +00:00
Jonas Maebe
5f39783ec6 * moved adding of '-mfpu=softvfp' for arm/softfloat to overridden
method in TArmGNUAssembler, because it's cleaner (no ifdef) and it
    mustn't be added for darwin (which uses TArmAppleGNUAssembler)

git-svn-id: trunk@11854 -
2008-10-02 21:52:47 +00:00
peter
a9c9ca0115 * set elf flags for soft float on arm
git-svn-id: trunk@10560 -
2008-03-25 16:15:15 +00:00
peter
52722b2cab * allocate .bss entries manual so we can take care of alignment
* disable COMMON symbol code, it might be needed again for ELF package
    support (.comm for ELF supports alignment)

git-svn-id: trunk@10549 -
2008-03-24 11:55:03 +00:00
Jonas Maebe
f36e5411af * split cpu64bit compiler define into
a) cpu64bitaddr, which means that we are generating a compiler which
       will generate code for targets with a 64 bit address space/abi
    b) cpu64bitalu, which means that we are generating a compiler which
       will generate code for a cpu with support for 64 bit integer
       operations (possibly running in a 32 bit address space, depending
       on the cpu64bitaddr define)
   All cpus which had cpu64bit set now have both the above defines set,
   and none of the 32 bit cpus have cpu64bitalu set (and none will
   compile with it currently)
  + pint and puint types, similar to aint/aword (not pword because that
    that conflicts with pword=^word)
  * several changes from aint/aword to pint/pword
  * some changes of tcgsize2size[OS_INT] to sizeof(pint)

git-svn-id: trunk@10320 -
2008-02-13 20:44:00 +00:00
peter
59365a6db9 - garbage was being output sometimes instead of source lines when compiling with -al. This is because lastfileinfo and lastinfile were never initialized for MASM writer. This is true for TPPCMPWAssembler, too.
- long lines were not wrapped.
- constants of type ait_comp_64bit output incorrectly.
- at end of file, current segment was not closed.
patch from Sergei Gorelkin

git-svn-id: trunk@9331 -
2007-11-25 16:46:19 +00:00
peter
a724d80e81 * debuginfo initialized per unit
git-svn-id: trunk@8918 -
2007-10-23 18:19:17 +00:00
peter
76b23821e1 * missing recalculation of relative constant
* if aligntype=1 then no alignment fillsize guessing is required

git-svn-id: trunk@8701 -
2007-09-30 20:28:41 +00:00
peter
b5fb7120b8 * fixed length calculation of leb128 constants
git-svn-id: trunk@8666 -
2007-09-27 22:40:38 +00:00
florian
499cbcbbe1 * make cycle OPT=-gwl -Co -Cr on x86-64 fixed
git-svn-id: trunk@7976 -
2007-07-07 19:16:49 +00:00
yury
04147151e4 * Fixed stabs generation for DLLs by internal assembler (use RELOC_ABSOLUTE in all cases).
* Do not generate relocs by internal linker for sections which are not loaded in memory.

git-svn-id: trunk@7829 -
2007-06-26 22:51:21 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
peter
29ffdefacb * secrel32 relocation support required by dwarf2 under windows
git-svn-id: trunk@7172 -
2007-04-25 09:06:36 +00:00
peter
7e71a8224e * support relative symbol calculation for uleb128/sleb128
git-svn-id: trunk@7019 -
2007-03-29 06:08:58 +00:00
peter
69a4e616ba * fix symbol substraction in stabs
git-svn-id: trunk@7008 -
2007-03-27 17:43:28 +00:00
pierre
f91620c22b * fix threadvar stabstr handling in internal assembler
git-svn-id: trunk@6960 -
2007-03-23 06:52:29 +00:00
peter
e0c58d3658 * use .comm again for global variables
this is needed for shared library linking where the .so
    needs to resolve to the space allocated for the symbol in the
    main program

git-svn-id: trunk@6641 -
2007-02-25 16:05:57 +00:00
tom_at_work
106fe68ce6 * renamed TStringList to TCmdStrList, in general use TCmdStr instead of shortstrings to fix bug #6351
git-svn-id: trunk@6215 -
2007-01-26 22:29:39 +00:00
Jonas Maebe
228943271f * increased AsmOutSize from 32kb to 128kb, makes external assembling a
little faster

git-svn-id: trunk@6165 -
2007-01-24 15:44:36 +00:00
peter
8bf63f4f69 * don't generate RVA reloc in stabs if there is no symbol
git-svn-id: trunk@5990 -
2007-01-15 16:46:50 +00:00
florian
4aa5f6401e * don't write stabs with rva entries on linux
git-svn-id: trunk@5834 -
2007-01-07 00:04:05 +00:00
Jonas Maebe
4454f6da0f * enable pipe-assembling again for solaris
git-svn-id: trunk@5346 -
2006-11-12 21:43:58 +00:00
florian
959a1379cf * fixed building of smart linked units
git-svn-id: trunk@5227 -
2006-11-04 18:12:33 +00:00
peter
5cd8775d38 * show only totals for memdebug
git-svn-id: trunk@5196 -
2006-11-03 11:24:02 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
peter
7a2e0da7bd * extra parameter for file searching functions
that indicate if the cache shall be used or not
  * fixed compile of non-x86 targets

git-svn-id: trunk@5115 -
2006-10-31 10:56:58 +00:00
peter
cb246eb781 * Remove dos,strings units, use SysUtils instead
* replace split* functions with Extract* functions
  * Add Directory caching

git-svn-id: trunk@5102 -
2006-10-30 23:29:35 +00:00
peter
070b86a512 * order of named sections added
* fix debugstart and debugend labels

git-svn-id: trunk@5098 -
2006-10-30 22:34:22 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
2f72117c9e * stabs don't write offset in n_value for non-local symbols that use
a relocation

git-svn-id: trunk@4763 -
2006-10-01 12:25:45 +00:00
Jonas Maebe
d75b19e484 * removed/conditionalised several unused variables
git-svn-id: trunk@4194 -
2006-07-14 19:44:54 +00:00
Marc Weustink
1f3e05131a fixed generation of dwarf lineinfo in win32
git-svn-id: trunk@4171 -
2006-07-13 23:53:53 +00:00
Tomas Hajny
a62c1faa2d + output is flushed before launching external utilities
git-svn-id: trunk@3539 -
2006-05-15 00:28:55 +00:00
Jonas Maebe
7c16869e48 * don't write individual names of all assembler files when generating
a smart linkable unit with -ap

git-svn-id: trunk@3233 -
2006-04-16 18:25:20 +00:00
peter
be88cd47b2 Merged revisions 3090-3113 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

r3090 | peter | 2006-03-30 15:10:15 +0100 (Thu, 30 Mar 2006) | 2 lines

  * infrastructure for .vtable directives

r3094 | peter | 2006-03-31 10:01:48 +0100 (Fri, 31 Mar 2006) | 2 lines

  * vtable directive fixes

r3113 | peter | 2006-04-01 22:49:57 +0100 (Sat, 01 Apr 2006) | 2 lines

  * Smart VTable linking using Symbols

git-svn-id: trunk@3115 -
2006-04-02 00:11:17 +00:00