Commit Graph

350 Commits

Author SHA1 Message Date
Jonas Maebe
7c594b0288 + added support for using Clang as an assembler, and make it the default
for all non-ppc(32/64) Darwin platforms
   o pass the macosx-version-min/iphoneos-version-min to clang as an assembler,
     so that it properly sets this information starting with Xcode 7 (solves
     errors when targeting the iOS simulator, and warnings about object files
     being compiled for a different OS X version when targeting (Mac) OS X)
   o the old assembler is still selectable via -Aas-darwin (required with
     Xcode 3.1.x and older)
   o since the first Xcode version that shipped with Clang is Xcode 3.2, which
     is available for Mac OS X 10.6, most users should not encounter any issues
     with the new default (in fact, it fixes some tests for x86 because Clang
     supports some instructions that "as" doesn't). Clang does not support
     Stabs however, so -gs does require the use of -Aas-darwin

git-svn-id: trunk@31830 -
2015-09-25 18:31:54 +00:00
Jonas Maebe
8155d759dc - reverted r31806, it breaks building on non-Darwin (mantis #28716)
git-svn-id: trunk@31807 -
2015-09-24 06:44:12 +00:00
Jonas Maebe
c0b451e788 - removed as_darwin, since there is no difference with as_gas (there is no
GNU as from binutils for Darwin, and Apple's "as" is based on an old
    version of GNU as)
   o this will not cause any backward compatibility problems, as the
     previous identifier for as_darwin was "AS-Darwin" and the compiler
     compared the uppercase value of the -A parameter to the identifier,
     so it was not explicitly selectable earlier. The new name is "AS",
     so it is explicitly selectable via -Aas like on other platforms.

git-svn-id: trunk@31806 -
2015-09-23 21:25:38 +00:00
Jonas Maebe
ff4847f685 * also write out the assembler invocation when using pipes
git-svn-id: trunk@31803 -
2015-09-23 20:38:11 +00:00
yury
432248cbf1 * Removed lot of unused vars.
git-svn-id: trunk@31732 -
2015-09-17 12:48:58 +00:00
Jonas Maebe
839482751d * when generating code for a pure assembler routine with LLVM, instantiate
a code and temp generator for the architectural target instead of for LLVM
  * write the code for pure assembler routines using a GNU-style external
    assembler writer for the target, with a decorator to wrap it in
    LLVM module-level assembly statements

git-svn-id: trunk@31633 -
2015-09-12 23:32:31 +00:00
Jonas Maebe
55e84df094 + GetExternalAssemblerWithAsmInfoWriter() to get a GNU-style external
assembler writer that is compatible with the current architecture,
    for use by the LLVM assembler writer to write inline assembly

git-svn-id: trunk@31631 -
2015-09-12 23:32:24 +00:00
Jonas Maebe
991e1f49bd * store a pointer to the used tasminfo record in every assembler writer, so
that we can use assembler writers with different conventions from the
    currently set target_asm (e.g. an x86 assembler writer for inline assembly
    in LLVM IR)

git-svn-id: trunk@31628 -
2015-09-12 23:32:13 +00:00
Jonas Maebe
4bb82b0a3f - removed unused OnlyAsm procedure
git-svn-id: trunk@31627 -
2015-09-12 23:32:09 +00:00
Jonas Maebe
e1f78cb774 * added decorator support to the external assembler writers so the LLVM
assembler writer can postprocess their output

git-svn-id: trunk@31626 -
2015-09-12 23:32:05 +00:00
Jonas Maebe
b3d0197f98 * factored out the output file handling (mostly writing data) from the
external assembler writer, so we can reuse the archtecture-specific
    writers to write inline assembly in LLVM IR files

git-svn-id: trunk@31625 -
2015-09-12 23:32:01 +00:00
nickysn
4a855b140a + support mixing initialized and bss data in the same object section (only in
case the section options contain the new option 'oso_sparse_data') in the
  internal object writer (needed for the huge memory model)

git-svn-id: trunk@31503 -
2015-09-04 13:16:45 +00:00
nickysn
046a4e4114 * allow using a TObjSymbol subclass via using a "class of" type
git-svn-id: trunk@31424 -
2015-08-25 14:32:08 +00:00
nickysn
d204aaab72 * refactored "ar" object writer creation in the internal assembler to allow
having different implementations of an internal "ar" writer

git-svn-id: trunk@30667 -
2015-04-19 16:35:16 +00:00
nickysn
cebd3de630 + added unit owomflib (empty for now), which is going to contain the internal
.lib writer for i8086-msdos

git-svn-id: trunk@30643 -
2015-04-18 09:49:38 +00:00
nickysn
7315175c32 * keep the proper original section name and order (and not just the type) of the
last encountered section at the object cut location when writing a smartlinked
  library with the internal assembler. This fixes the $HUGECODE directive with
  the internal assembler on i8086 and maybe other things on other platforms,
  that use library based smartlinking in combination with the internal asm.

git-svn-id: trunk@30615 -
2015-04-16 23:33:26 +00:00
nickysn
f66d8cfb7f * create normal object files, instead of using the internal "ar" writer in TInternalAssembler.writetreesmart in case the af_needar flag is set on an internal assembler
git-svn-id: trunk@30515 -
2015-04-09 14:50:22 +00:00
nickysn
3840db5457 * handle aitconst_farptr with a constant (nil) directly in the internal asm
writer, without calling writereloc

git-svn-id: trunk@30457 -
2015-04-05 23:56:23 +00:00
nickysn
393b9b54a8 + handle aitconst_farptr in the internal asm writer as a new relocation type (RELOC_FARPTR)
git-svn-id: trunk@30456 -
2015-04-05 23:43:37 +00:00
Jeppe Johansen
e2272c8a7e Added aitconst_gs for AVR pointer references to Flash.
git-svn-id: trunk@30419 -
2015-04-04 10:29:11 +00:00
Jonas Maebe
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Jeppe Johansen
60f24739fc Fixed typo
git-svn-id: trunk@30238 -
2015-03-15 15:47:45 +00:00
Jeppe Johansen
2bcef2daee Fix break caused by r30233
git-svn-id: trunk@30235 -
2015-03-15 13:34:01 +00:00
Jeppe Johansen
155998fe89 Support .set and .weak in internal assembler.
Fix problem with fpc_initialHeap getting put in .data instead of .bss.

git-svn-id: trunk@30233 -
2015-03-15 12:10:54 +00:00
Jeppe Johansen
52e505bff7 Fixed internal error in GOT related code for ARM internal assembler.
git-svn-id: trunk@30188 -
2015-03-14 16:03:16 +00:00
Jeppe Johansen
914e9e7b49 Merged from trunk
git-svn-id: branches/laksen/armiw@30146 -
2015-03-08 12:33:46 +00:00
Jonas Maebe
06dd396a2f * fixed writing float values using the internal assembler after r28105
git-svn-id: branches/hlcgllvm@30105 -
2015-03-05 21:41:56 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Jonas Maebe
bb1274a8ee * make DoPipe() a method of TExternalAssembler and use it in
TAArch64AppleAssembler to determine whether we have to add extra
    parameters to support assembling via a pipe ("as" is a symlink to
    clang for Arch64 on OS X, and needs to be explicitly told its going to
    receive assembler code from standard input)

git-svn-id: trunk@29952 -
2015-02-23 22:55:05 +00:00
Jeppe Johansen
6fff181679 Add support for TBB/TBH instructions.
Precisize rules for selection of thumb instructions.
Add short-cut notation support for most simple Thumb2 instructions ( add r1,#4 instead of add r1,r1,#4 ).

git-svn-id: branches/laksen/armiw@29343 -
2014-12-27 16:00:06 +00:00
Jeppe Johansen
de00a1d76d Implement simple support for .thumb_func in the ELF output.
git-svn-id: branches/laksen/armiw@29340 -
2014-12-27 11:02:38 +00:00
Jeppe Johansen
6976af8365 Change .thumb_func to be an ait_directive instead of it's own tai type.
git-svn-id: branches/laksen/armiw@29334 -
2014-12-26 23:13:14 +00:00
sergei
6fd8a26ae1 + internal assembler: early check for empty asmlists.
git-svn-id: trunk@28629 -
2014-09-08 23:26:20 +00:00
Jonas Maebe
7ebb1b813f + basic support infrastructure in the llvm assembler writer to write out
typed constant data
   o llvm declarations now get an extra "initdata" list that contains the
     typed constant data associated with this declaration (if any)

git-svn-id: branches/hlcgllvm@28111 -
2014-07-01 16:30:19 +00:00
Jonas Maebe
b0ff41406a * grouped all tai_real* types into a single tai_realconst type,
to free up space for more ait_* types in taitype (can't have
    more than 32 because they have to fit in a small set)
   o factored out writing of floating point numbers as an array of
     byte in the external assemblers

git-svn-id: branches/hlcgllvm@28105 -
2014-07-01 16:29:58 +00:00
Károly Balogh
2d38cf0dbd assemble: don't include exec directly, but use GetProcessID to generate the unique file ID, because that maps to exec/FindTask on Amiga anyway
git-svn-id: trunk@27737 -
2014-05-04 23:16:52 +00:00
pierre
9c78abafce Add SmartFilesCount number to AddAsmCommand call for SmartAsm
git-svn-id: trunk@27530 -
2014-04-11 13:37:00 +00:00
Károly Balogh
7e1051324d include exec on Amiga only in the implementation part
git-svn-id: trunk@27065 -
2014-03-09 23:05:13 +00:00
sergei
46f8e78d1f + Support GOT/gp-relative constants in GAS and internal assemblers, MIPS and i386.
* Change MIPS jump tables in PIC mode to use gp-relative constants, making them ABI-compliant and not requiring dynamic relocations.

git-svn-id: trunk@26886 -
2014-02-26 14:54:47 +00:00
Károly Balogh
31ec76422a redirect .s files to the RAM: drive on Amiga while compiling
git-svn-id: trunk@26829 -
2014-02-22 08:43:11 +00:00
pierre
441b9feffc pass new asm extra opt using -ao option
git-svn-id: trunk@26540 -
2014-01-21 00:16:53 +00:00
florian
4d5119bf1c * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
Károly Balogh
3d07b35d77 do not append directory separator when it is already there, as // equals /../ on Amiga, fixes smartlinked RTL build
git-svn-id: trunk@26126 -
2013-11-24 03:09:24 +00:00
Jonas Maebe
f348e89112 - removed too early assignment of have_first_symbol:=true, making the later
check of "if not have_first_symbol and dosub then" always evaluate to
    false (found by looking at the results of constant propagation :)

git-svn-id: trunk@26011 -
2013-11-10 15:08:28 +00:00
svenbarth
6f5a648516 Improve the cpu type handling for M68k just in case we should branch 2.8.0 before I can start working on M68k again.
Therefor the cpu type (-Cp...) "coldfire" was split up into "isaa", "isaa+", "isab" and "isac". The Linux RTL can currently compiled for "68020", "isab" and "isac". For the other three Bcc.L must be handled differently (only Bcc.B/W supported) and for "68000" also EXT.L needs to be handled differently.

fpcdefs.inc:
  + define CPUCAPABILITIES if capabilities can be set for a certain CPU type (currently ARM, AVR and M68k)
options.pas:
  * check for CPUCAPABILITIES instead of specific CPUs
assemble.pas:
  - the handling of the CPU type is already done in m68k/ag68kgas.pas, Tm68kGNUAssembler.MakeCmdLine (and thereby already using the gascputypestr array!)
m68k/cpuinfo.pas:
  - tcputype: remove "cpu_coldfire"
  + tcputype: add "cpu_isa_a", "cpu_isa_a_p", "cpu_isa_b" and "cpu_isa_c"
  + add "cpu_coldfire" constant which contains all Coldfire specific cpu types
  * adjust "cputypestr" and  "gascputypestr"
  + add tcpuflags and cpu_capabilities (DBRA restriction was checked with CPUCOLDFIRE, CAS/TAS will be needed for atomic operations and BRAL restriction was discovered during testing of new cpu types)
m68k/cgcpu.pas:
  * adjust checks for "cpu_coldfire"
m68k/n68kadd.pas:
  * don't use a BRA.L if it is not supported, but (at least for now) a BRA.W
aggas.pas:
  * adjusted check for Coldfire

git-svn-id: trunk@25457 -
2013-09-11 17:07:32 +00:00
Jonas Maebe
de56f909d5 * synchronized with trunk up to and including r25430
git-svn-id: branches/cpstrrtl@25431 -
2013-09-06 10:09:26 +00:00
Jonas Maebe
efa95bed66 * changes so the compiler can be compiled with a unicode RTL without warnings
git-svn-id: branches/cpstrrtl@25307 -
2013-08-19 22:47:07 +00:00
sergei
9e3d17778d - Removed TAbstractAssembler and TAbstractAssemblerClass, they are not used anymore.
git-svn-id: trunk@25278 -
2013-08-18 11:03:30 +00:00
sergei
2caa05ccd1 * Make Win64 SEH support enabled by default. If necessary to disable, compiler should be cycled with OPT=-dDISABLE_WIN64_SEH. Mantis #24012.
git-svn-id: trunk@23732 -
2013-03-08 16:58:05 +00:00
svenbarth
a68e237450 Fix cycle/build with -al
assemble.pas, TExternalAssembler.WriteSourceLine:
  * don't generate an internal error if no module is found; if the system unit is compiled with -al there can be cases when fileinfo contains only zeros (though I wonder where this comes from; I'll need to investigate this when I have time)

git-svn-id: trunk@23631 -
2013-02-19 10:11:39 +00:00
svenbarth
b219638284 Ensure that no garbage for specialization code is written in case of "-al"
assemble.pas, TExternalAssembler.WriteSourceLine:
  * also respect a module change which can happen if the generated assembler code belongs to a specialized generic

git-svn-id: trunk@23628 -
2013-02-18 16:53:37 +00:00
sergei
d967566a37 * Changed TExternalAssembler.CreateSmartLinkPath to use ansistrings (TPathStr), like the rest of file handling routines do.
git-svn-id: trunk@23214 -
2012-12-23 14:11:27 +00:00
Károly Balogh
7fa067265b small & ugly patch to work around old GNU AS on Amiga, which doesn't know about -march=
git-svn-id: trunk@23160 -
2012-12-17 00:12:30 +00:00
svenbarth
63f4e44fd5 assemble.pas, texternalcompiler.makecmdline:
* pass the correct architecture to the assembler (later we might switch to a $ARCH approach...)

git-svn-id: trunk@22737 -
2012-10-18 20:11:29 +00:00
pierre
82cc913b06 Use -KPIC option without space as older GNU as only seem to support that version
git-svn-id: trunk@22606 -
2012-10-09 14:11:34 +00:00
pierre
7c1db10df9 Handle new unaligned constant types
git-svn-id: trunk@22520 -
2012-10-02 22:30:22 +00:00
pierre
c2a6fbbae3 Fix error in previous commit
git-svn-id: trunk@22491 -
2012-09-27 16:05:31 +00:00
pierre
0ed6c20451 Use -K PIC instead of -KPIC for pic mode
git-svn-id: trunk@22474 -
2012-09-27 15:42:35 +00:00
sergei
24c7b7f433 * If alignment requirement of data is bigger than alignment of the section being written to, increase section alignment to match. This mostly affects cases of non-smart linking, where wrong initial alignment used to cause hard to catch misalignment issues. It also largely obsoletes the need to supply the initial section alignment (hidden tai_section constructor,etc).
* Likewise, when merging object sections into exe sections, set alignment of exe section to maximum value.

git-svn-id: trunk@21964 -
2012-07-24 08:38:11 +00:00
pierre
1f762cc247 Add and replacement, for MIPS
git-svn-id: trunk@21780 -
2012-07-04 16:33:17 +00:00
sergei
dc03282cb7 + Support assembling expressions ".long L2-L1" where label L1 belongs to the current objsection and L2 comes from any objsection. This is done using relative relocations and is compatible with GNU AS.
* Also fixed ogcoff.pas to handle these relative relocations correctly.

git-svn-id: trunk@21362 -
2012-05-22 14:59:24 +00:00
Jonas Maebe
14cfe770a4 * replaced most (if not all) remaining fields/parameters in the compiler
that deal with paths/filenames with TPathStr (= ansistring) to prevent
    cutting off long paths (no change in speed when compiling the compiler,
    1% extra memory usage)

git-svn-id: trunk@21120 -
2012-04-29 17:36:23 +00:00
Jonas Maebe
834026bfb5 * synchronised with trunk up to r21067
git-svn-id: branches/jvmbackend@21068 -
2012-04-26 21:24:20 +00:00
Jonas Maebe
35b80a4229 * enable assembling via pipe for the AIX assembler
git-svn-id: trunk@20965 -
2012-04-21 20:17:58 +00:00
Jonas Maebe
02413c8a57 * moved maybequoted() from cutils to cfileutl and let its behaviour vary
based on the actual target platform rather than always on the host
    platform
  * on Unix, use single rather than double quotes for quoting, so it also
    properly handles $, ! and `, which keep their special meaning when
    appearing in scripts inside double quotes
  * since sysutils.executeprocess() can only deal with double-quoted
    strings in parameters, re-quote parameters on Unix when they turn
    out not to be for scripts but for direct execution (which is most
    of the time, but unfortunately doing the reverse is not possible
    because parameters used in scripts sometimes contain script-specific
    code that must not be quoted, such as `cat link.res`)
   -> always use cfileutl.RequotedExecuteProcess() rather than
    sysutils.ExecuteProcess() in the compiler (added a bunch of dummy
    ExecuteProcess string constants to common units to prevent accidental
    usage)

git-svn-id: branches/jvmbackend@20901 -
2012-04-16 19:52:36 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
Jonas Maebe
aaf6015b51 * converted tai directive string from pshortstring to ansistring (some
AIX directives are quite long)

git-svn-id: trunk@20799 -
2012-04-11 18:01:41 +00:00
Jonas Maebe
7a92d5e912 + TExternalAssembler.AsmWrite(ansistring) (from JVM branch), needed to be
able to write long tasmdirective strings required by AIX target

git-svn-id: trunk@20798 -
2012-04-11 18:01:35 +00:00
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
Jonas Maebe
7230d076c4 * part of r19750, forgot to commit
git-svn-id: branches/jvmbackend@19751 -
2011-12-04 15:46:48 +00:00
Jonas Maebe
38c090c1a2 * fixed buffer overrun in TExternalAssembler.AsmWrite(ansistring) in case the
ansistring's length is > AsmOutSize

git-svn-id: branches/jvmbackend@19637 -
2011-11-14 22:57:34 +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
Jonas Maebe
ce88df680b + symansistr conditional define that, when activated, makes the symbol/
mangled name handling ansistring rather than pshortstring based (required
    for JVM target; little effect on speed, some extra memory usage)

git-svn-id: branches/jvmbackend@18597 -
2011-08-20 08:13:50 +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