Commit Graph

78 Commits

Author SHA1 Message Date
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
nickysn
98d2684368 + correctly support the sse2 version of the cmpsd x86 instruction, when writing
at&t style asm output

git-svn-id: trunk@36122 -
2017-05-05 15:01:38 +00:00
svenbarth
a9888eba70 * also generate Big Obj COFF files with the GNU utilities (needs 2.25 or newer), at least as long as the new option -a5 isn't given, which disables this
Note 1: using an older AS might fail anyway if the amount of sections is too high (like in packages\odata\src\sharepoint.pp)
Note 2: it might be an idea to keep track of the created sections in the asmlists and only enable the option if *really* necessary (like with the internal COFF output generator), though this might lead to false positives due to multiple sections with the same name (since I'd prefer to use the KISS principle only a counter would be used)

git-svn-id: trunk@35381 -
2017-02-03 22:45:32 +00:00
sergei
870fda34d5 * x86 AT&T reader and writer: cleaned up usage of attsufMM suffix:
* It is now only used to select size of vector instructions (i.e. 128 or 256 bits)
  * Scalar instructions reverted to use attsufINT suffix (selecting between 32 or 64 bits).
  * Additionally, vcvtsi2sd and vcvtsi2ss with rm64 operand are x86_64 only.

git-svn-id: trunk@34942 -
2016-11-21 02:07:13 +00:00
sergei
8e55231640 - Removed what's called "GAS bugfix" for VCVTDQ2PD instruction. Rationale:
o "Intel instruction set reference" states that source operand can be XMM register or memory, so GAS behavior
    is correct. If any other assembler expects an YMM register, it must be fixed elsewhere.
  o x86ins.dat does not allow YMM register as source operand for VCVTDQ2PD, and instructions are checked for validity
    before writing them out, therefore this code was simply never executed.

git-svn-id: trunk@34924 -
2016-11-20 04:23:41 +00:00
Jonas Maebe
74a49b5f91 * restructured the the TExternalAssembler constructors so that the
hack for the Jasmin descendent is no longer needed

git-svn-id: trunk@34852 -
2016-11-09 19:51:20 +00:00
Jeppe Johansen
1c0c944311 Added x86_64-embedded target. Patch from Benjamin Rosseaux
git-svn-id: trunk@33097 -
2016-02-14 10:57:00 +00:00
pierre
1abf9df1b0 Solaris assembler does not accept %st instead of %st(0), at least for some instructions
git-svn-id: trunk@32198 -
2015-10-30 11:20:10 +00:00
pierre
6b0e87b95c Correct error in last commit that generate new failures in tbs/tb0587 test for GNU as, as the change was not correctly limited to Solaris Assembler
git-svn-id: trunk@32196 -
2015-10-30 08:34:01 +00:00
pierre
90ff332b49 Add -Aas-sol to use native Solaris assembler
git-svn-id: trunk@32188 -
2015-10-29 15:10:27 +00:00
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
1131b08d6d * changed idtext of as_darwin to AS-DARWIN, so it can be explicitly
selected via -Aas-darwin (since it compares uppercased strings)

git-svn-id: trunk@31808 -
2015-09-24 06:49:29 +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
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
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
Jonas Maebe
5d15a28e75 - reverted workaround from r15939 that hasn't been necessary since FPC 2.6.0,
since that version already shiped with GNU AS 2.21 (mantis #17337)

git-svn-id: trunk@31196 -
2015-07-06 08:05:37 +00:00
Károly Balogh
7ca62febcd AROS/x86_64: initial AROS/x86_64 support and implement syscalls for AROS/x86_64
git-svn-id: trunk@31169 -
2015-06-28 19:16:40 +00:00
Jonas Maebe
79a06b1514 + iphonesim/x86_64 target (64 bit iOS simulator)
git-svn-id: trunk@29970 -
2015-02-23 22:56:09 +00:00
sergei
d24382e8f8 * x86 AT&T writer: never ever drop "@GOTPCREL" relocation, because it results in corrupted code (at least, "mov foo@GOTPCREL(%rip),%reg" must change to "lea foo(%rip),%reg" to remain equivalent, but this must be handled elsewhere anyway. Assembler writer should just write generated code as is).
* Added internal errors on some impossible types of references.

git-svn-id: trunk@29506 -
2015-01-18 17:04:53 +00:00
marco
2578514853 * first dragonfly patch (existing most). Mantis #27091
git-svn-id: trunk@29213 -
2014-12-07 20:27:02 +00:00
Károly Balogh
74581a07af AROS: assembler fixes
git-svn-id: trunk@28439 -
2014-08-18 11:25:55 +00:00
pierre
045f161012 Separate out nasm assembler for i8086, i386 and x86_64 cpus, also separte based on target object format
git-svn-id: trunk@26547 -
2014-01-21 00:26:08 +00:00
Jonas Maebe
1a78ec1f11 * workaround for bug in Apple's assembler regarding movq/vmovq and integer
registers

git-svn-id: trunk@25396 -
2013-09-02 14:39:26 +00:00
yury
0960ee2034 * Add missing checks for android target.
git-svn-id: branches/targetandroid@23477 -
2013-01-21 12:08:25 +00:00
yury
c2fed960c9 * Add android to supported targets for assemblers. It fixes assembling for i386-android.
git-svn-id: branches/targetandroid@23441 -
2013-01-18 14:51:09 +00:00
florian
d49a88c3c8 * merge fixes by Torsten Grundke
git-svn-id: trunk@23030 -
2012-11-18 21:18:49 +00:00
Jonas Maebe
6497d3c994 - removed no longer used/supported af_allowdirect flag (direct assembler
reader support)

git-svn-id: trunk@22794 -
2012-10-21 13:42:58 +00:00
florian
283ff05127 * merged avx support in inline assembler developed by Torsten Grundke
git-svn-id: trunk@22568 -
2012-10-06 19:47:18 +00:00
Jonas Maebe
5dc75a92a3 * don't write size suffix for popcnt on Darwin, its assembler doesn't
support it (fixes webtbs/tw13186)

git-svn-id: trunk@21412 -
2012-05-28 14:00:02 +00:00
Jonas Maebe
ac43eb9b70 + generic implementation of ReplaceForbiddenAsmSymbolChars() instead
of the AVR-specific ifdef'ed variant
   o since the only special character we use in mangled names on all platforms
     is $, added a new field to tasminfo called "dollarsign" that holds the
     character $'s should be replaced with (if it doesn't have to be replaced,
     leave it at $)

git-svn-id: trunk@20801 -
2012-04-11 18:01:57 +00:00
pierre
20eaf3240a Accept x86_64_netbsd system for GNU as
git-svn-id: trunk@20745 -
2012-04-07 15:54:17 +00:00
pierre
2b5cadf271 + Add system_x86_64_openbsd to list of supported systems for as assembler
git-svn-id: trunk@20716 -
2012-04-05 21:08:14 +00:00
sergei
e11c880b1e x86 assembler improvements:
* Don't generate rex.w for "CALL|JMP|LCALL|LJMP regmem", they are 64-bit by default.
* LCALL,LJMP flagged as calljump instructions.
* LCALL,LJMP encode only far jumps and don't accept register operands.
* GAS writer: fixed writing rip-relative operands of calljump instructions.
+ test.

git-svn-id: trunk@19413 -
2011-10-08 11:34:04 +00:00
florian
111d05c68f o patch by Alexander Shishkin, resolves #20409
* eliminate warnings in compiler (i386 & i368->x86_64) and minor refactorings
    - comment out unused vars and types
    - comment out unneeded comparisons (Longword <=> 0)
    - suppress some "comparison always true|false" warnings
    - tweak visiblity sections

git-svn-id: trunk@19385 -
2011-10-05 20:11:09 +00:00
paul
7a74d2c2f8 compiler: reduce amount of hints and notes
git-svn-id: trunk@19293 -
2011-09-30 08:56:05 +00:00
pierre
3fd3cc8099 * Avoid warning for i386 cpu
git-svn-id: trunk@17851 -
2011-06-28 08:02:35 +00:00
pierre
0d7945d8ae Avoid range check error on internalerror function call
git-svn-id: trunk@17399 -
2011-05-03 14:15: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
florian
3041bbab27 * fixes overflowing internalerror number
git-svn-id: trunk@15998 -
2010-09-16 20:46:11 +00:00
pierre
973c23e12c * Fix for win64 GNU AS bug
git-svn-id: trunk@15939 -
2010-09-02 23:41:02 +00:00
florian
34227e811d + patch by Sven Barth to add native NT rtl support to the compiler, resolves #14886
git-svn-id: trunk@14565 -
2010-01-07 17:42:11 +00:00
Jonas Maebe
b4c8c73e70 * changed tf_use_function_relative_addresses into an assembler flag (with
the opposite meaning, af_stabs_use_function_absolute_addresses), because it
    is different on Darwin for the internal and external assembler)

git-svn-id: trunk@14342 -
2009-12-06 13:21:28 +00:00
pierre
ff25f1797c + Add gas for x86_64 solaris
git-svn-id: trunk@14239 -
2009-11-21 16:21:10 +00:00
Jonas Maebe
0c675a4039 * the objc1 unit has been renamed to objc
* the objc unit links against the Foundation instead of against the Cocoa
    framework, and inludes an interface to either the fragile or non-fragile
    obj-c run time depending on the target platform
  + support for the non-fragile Objective-C runtime/ABI, as used on Mac OS X
    for ARM (iPhone) 64 bit (PowerPC/64, x86_64) -- all these targets now
    are now also supported for the objectivec1 modeswitch
  + support for private_extern symbol bindings, required for the above
  * mark objcclasses that are declared in the implementation section of a
    unit as "hidden" (not sure what the effect is, since the Objective-C
    runtime does not seem to do anything with this flag)
  * enabled all obj-c tests for the newly supported platforms

git-svn-id: branches/objc@13763 -
2009-09-27 15:24:50 +00:00
Jonas Maebe
ec8fee45fe * do not access local data via the GOT on x86_64, because
a) it's unnecessary
   b) it's slower than "direct" RIP-relative accessing
   c) it's not supported on darwin/x86_64 in certain cases
  * never use absolute addressing on darwin/x86_64 (like on win64)
  * when not generating PIC, make sure that a_loadaddr_ref_reg on x86_64
    also uses RIP-relative addressing for darwin/x86_64 and win64

git-svn-id: trunk@13760 -
2009-09-27 13:43:56 +00:00
Jonas Maebe
b1c3f76ff9 * changed the supported targets for assembler writers to a set, and
(hopefully correctly) limited all assembler writers to only the
    OSes they support (mantis #11801)

git-svn-id: trunk@12622 -
2009-01-28 15:12:43 +00:00
Jonas Maebe
032352d98b + darwin/x86_64 support
git-svn-id: trunk@9180 -
2007-11-10 18:33:09 +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
Tomas Hajny
30b78920cd * OS/2 compilation fixes (not completely finished yet)
git-svn-id: trunk@6937 -
2007-03-20 00:49:20 +00:00