Commit Graph

389 Commits

Author SHA1 Message Date
nickysn
62316da236 * a_call_reg moved to a_call_reg_near
git-svn-id: trunk@24855 -
2013-06-09 22:09:39 +00:00
nickysn
604b7c9deb + added cg.a_call_ref_near and a_call_ref_far
git-svn-id: trunk@24853 -
2013-06-09 20:22:47 +00:00
nickysn
ec497ae11e + the regular tcgx86.a_call_name and .a_call_name_static moved to .a_call_name_near and .a_call_name_static_near, because a_call_name and a_call_name_static are going to be overriden in tcg8086
git-svn-id: trunk@24827 -
2013-06-09 10:42:39 +00:00
nickysn
ec76b2cf40 * refactored the segment-in-integer-register reference support, so it's handled in make_simple_ref, instead of all over the place in the code generator
git-svn-id: trunk@24752 -
2013-06-01 22:18:09 +00:00
nickysn
c9c882c30a * always use 16-bit pushes for pushing/popping the segment registers on i8086 in Tcgx86.g_concatcopy
git-svn-id: trunk@24735 -
2013-06-01 17:49:49 +00:00
nickysn
e243b6b869 * never use the 66h prefix when pushing/popping segment registers on i8086, as the stack is aligned on 2 bytes there
git-svn-id: trunk@24729 -
2013-06-01 16:03:14 +00:00
nickysn
c2e3fb5918 + emit proper interrupt procedure entry/exit code on i8086
git-svn-id: trunk@24728 -
2013-06-01 15:50:11 +00:00
nickysn
0a8e008a0d + the ES register made volatile on i8086 as per the 16-bit x86 calling conventions
git-svn-id: trunk@24462 -
2013-05-07 14:27:21 +00:00
nickysn
e4f3dd1264 * do not emit shl/shr with a const different than 1 on 8086
git-svn-id: trunk@24382 -
2013-04-29 23:02:09 +00:00
nickysn
fbc41991f9 * i8086 fixes in tcgx86.a_op_reg_reg for 16-bit OP_SHR,OP_SHL,OP_SAR,OP_ROL,OP_ROR
git-svn-id: branches/i8086@23881 -
2013-03-17 00:05:05 +00:00
florian
edd4c1ce4b * proper fix to avoid sp relative adressing as r23867 tries
git-svn-id: branches/i8086@23868 -
2013-03-16 16:51:31 +00:00
florian
b321f867c6 + trgintcpu.add_cpu_interferences for i8086 so references are properly build
* empty make_simple_ref code path for i8086

git-svn-id: branches/i8086@23782 -
2013-03-10 18:51:42 +00:00
nickysn
95b15d15bd another nested ifdef cleaned up
git-svn-id: branches/i8086@23741 -
2013-03-09 11:35:42 +00:00
nickysn
981f0a5c6c nested ifdefs converted to series of elseif + some other ifdefs cleaned up
git-svn-id: branches/i8086@23740 -
2013-03-09 11:25:25 +00:00
nickysn
5f7d432ff9 i8086 fixes in Tcgx86.g_concatcopy and TCGSize2OpSize
git-svn-id: branches/i8086@23720 -
2013-03-08 00:13:02 +00:00
Jonas Maebe
5d628b29bb * set the subregsize of OS_M64 SSE registers to R_SUBQ so we can
differentiate between 64 bit and 128 bit (R_SUBMMWHOLE) SSE vector regs,
    and support spilling/assembling for R_SUBQ SSE registers (8 bytes)
    (mantis #23962)

    We currently never use the full 128 bit of an SSE register, and
    spilling for those hasn't been implemented yet either (R_SUBMMWHOLE
    SSE regs are spilled into a 4-byte temp currently -> can overwrite data)

git-svn-id: trunk@23700 -
2013-03-06 12:42: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
yury
0960ee2034 * Add missing checks for android target.
git-svn-id: branches/targetandroid@23477 -
2013-01-21 12:08:25 +00:00
sergei
7530fb3352 * tcgx86.make_simple_ref: handle references to absolute addresses (these are quite rare on x86_64, but still worth to handle correctly).
* If possible, use reference base instead of index, this yields shorter instructions.
* Added comment about offset limits for rip-relative addressing.
- Removed code related to taking threadvar address on win32, it is incorrect because Windows TLS is not directly accessible via segment registers (fs:0x2c points to array of pointers to TLS storages of each module, so at least double indirection is needed).

git-svn-id: trunk@23342 -
2013-01-07 16:00:12 +00:00
florian
d7e0f07aab + UseAVX check
git-svn-id: trunk@22642 -
2012-10-14 14:04:31 +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
florian
8818b58e5d * Bsf/Bsr on x86 handle now correctly 0 as argument, resolves #22783
* generic Bsf implementations handle now correctly 0 as argument
* test extended

git-svn-id: trunk@22327 -
2012-09-05 13:51:45 +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
952ac1ffa6 * only use indirect symbol loads for (weak)external and private_external
symbols on darwin/ppc and darwin/i386, and also for common symbols on
    darwin/ppc, as they're not required for other kinds of symbols on those
    platforms (gcc doesn't use them either with -O1 and higher; it does use
    them always for darwin/ppc64 except for local symbols, and hence so do we)

git-svn-id: trunk@22271 -
2012-08-30 21:30:38 +00:00
Jonas Maebe
35c70a6c96 * copy the darwin got register to a new register when using it, so it
cannot get modified

git-svn-id: trunk@22240 -
2012-08-25 15:12:34 +00:00
Jonas Maebe
0a1157da38 * fixed memory leaks in the compiler introduced in r21862 by marking and
releasing temporarily created function result locations

git-svn-id: trunk@21953 -
2012-07-23 13:49:29 +00:00
Jonas Maebe
408f459f5a * the code generator bugs referred to in r21921 weren't completely fixed yet
after all, although for some reason the problems only showed up with the
    external assembler on x86-64 platforms other than Darwin. Now we never use
    GOT entries on x86-64 anymore for local symbols, regardless of their nature,
    and instead use plain RIP-relative addressing for them.

git-svn-id: trunk@21924 -
2012-07-17 14:36:37 +00:00
Jonas Maebe
bb28a7cd08 * decrease the fpu stack position counter after explicitly inserted
fist(t)pq instructions (mantis #22331)
  * also internalerror in case the internal fpu stack position counter
    becomes larger than 7, so we don't have to wait for the entire
    byte to overflow before we detect a problem

git-svn-id: trunk@21734 -
2012-06-29 09:52:35 +00:00
Jonas Maebe
260958eb45 * changed last parameter of g_indirect_sym_load() to a set and also
pass on whether the symbol refers to code or data (important for
    AIX weak symbols; note that AIX does not support undefined weak
    external symbols, and FPC does not yet support weakly defining
    non-external symbols, so this functionality isn't really used yet)

git-svn-id: trunk@20802 -
2012-04-11 18:02:03 +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
florian
c4a5499d2a * handle flag to reg./ref. conversion correctly for boolean64
git-svn-id: trunk@19914 -
2011-12-29 17:28:35 +00:00
florian
a59a37dddd * handle assignments of qword bools with LOC_FLAGS correctly, resolves #20874
git-svn-id: trunk@19912 -
2011-12-29 16:48:46 +00:00
florian
60cccdcdbd * improve heuristics for copy_move vs. copy_string when optimizing for size, #20664
git-svn-id: trunk@19758 -
2011-12-04 21:18:56 +00:00
sergei
ce3f850a68 * x86_64, use rip-relative references when taking address of local code labels, fixes test/library/tlib1a.pp for Linux and FreeBSD and passing exception address to FPC_RAISEEXCEPTION on Darwin.
git-svn-id: trunk@19616 -
2011-11-09 05:12:59 +00:00
sergei
4c21beb48e win64 unwinding, misc fixes:
* Insert seh_endprologue directive after the last prologue instruction, not before it
* Omit seh_stackalloc for zero bytes
* (For now) ignore SEH directives in NASM and MASM writers, instead of failing with internal error.

git-svn-id: trunk@19246 -
2011-09-26 13:55:21 +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
florian
13ac5d185f * fix add_move_instruction for sse moves
git-svn-id: trunk@18789 -
2011-08-20 12:30:47 +00:00
florian
26850e3425 * fix full cycle after adding new boolean types
git-svn-id: branches/pasboolxx@17847 -
2011-06-27 20:11:08 +00:00
florian
d35d1ed357 + initial support for pascal booleans with sizes 2, 4 and 8
git-svn-id: branches/pasboolxx@17836 -
2011-06-26 15:02:37 +00:00
florian
2005f6869b * cycling with $R+ fixed
git-svn-id: trunk@17600 -
2011-05-28 21:18:35 +00:00
florian
77f2d6cc0d * introduce usage of TCGInt in the code generator units
git-svn-id: trunk@17459 -
2011-05-14 17:58:23 +00:00
Jonas Maebe
b49b3ecc61 * one more fix that should have been part of r16717: also generate
addr_pic_no_got references for linux in a_loadaddr_ref_reg()

git-svn-id: trunk@16728 -
2011-01-07 19:17:47 +00:00
Jonas Maebe
0da9d36116 * fixed internal assembler for x86-64 so that it correctly handles
relocations for addr_pic_no_got references (do not go via the GOT)
  * fixed code generator so that it generates addr_pic_no_got references
    also for platforms that use the internal assembler (this will break linking
    of some tests that check static data > 2GB on Linux/x86-64, but they were
    already broken before as well because we don't use the "huge" x86-64
    execution model)
  * fixed x86-64 Linux syscall code to not expect GOT-based relocations for
    the system unit's errno variable (it's an implementation-only variable)

git-svn-id: trunk@16717 -
2011-01-06 09:28:25 +00:00
florian
5dae691c96 * implementation of bit scan intrinsics by Richard Vida, resolves #17592
git-svn-id: trunk@16174 -
2010-10-16 15:03:30 +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
356026f849 * use new_section() instead of tai_section.create() everywhere
- sort of reverted r14134, which is no longer required after the above
    change (new_section() inserts the alignment itself)
  * made the tai_section.create() constructor private so it cannot be
    called directly anymore

git-svn-id: trunk@15482 -
2010-06-26 10:50:14 +00:00
Jonas Maebe
3c8b23cda4 * fixed cg.a_loadmm_reg_ref() and cg.a_loadfpu_reg_ref() in case they are
used to store a record function result in an MM/FPUREGISTER to memory
    (the register size will be OS_F32/OS_F64, while the memory size will
     be OS_32/OS_64 -> convert the latter to the former)
  * extended tcalext6 to also test this scenario

git-svn-id: trunk@15385 -
2010-06-04 22:31:35 +00:00
Jonas Maebe
9e785ea553 + several internalerrors in case things go wrong
+ support for OS_M64 in several places

git-svn-id: trunk@15366 -
2010-06-03 19:09:27 +00:00
pierre
7c08e5cb57 * Fix solaris problem after commit rev 14971
git-svn-id: trunk@14974 -
2010-03-05 13:46:36 +00:00
Jonas Maebe
a7dca09535 * only refer to local symbols without GOT redirection on darwin/x86_64,
because on linux/x86_64
     a) the resulting code crashes when using the internal assembler
     b) refuses to link when using the external assembler
   (and hence I don't know whether it's safe to do on other non-darwin
    platforms either) -- fixes mantis #15889

git-svn-id: trunk@14971 -
2010-03-04 20:23:45 +00:00
Jonas Maebe
89110baab8 * don't modify the flags while simplifying PIC memory references
(mantis #15694)

git-svn-id: trunk@14871 -
2010-02-06 20:18:36 +00:00
florian
c1f3d8dcaa * unified names of system_*/systems_* sets
git-svn-id: trunk@14566 -
2010-01-07 18:16:20 +00:00
pierre
e67307aa66 * New constant system_needs_16_byte_stack_alignment
defined in system.pas
    used in x86/cgx86.pas
    and x86_64/cgcpu.pas
   

git-svn-id: trunk@14401 -
2009-12-11 09:50:27 +00:00
pierre
dbf2be812a * for rip_relative if cs_create_pic is selected
git-svn-id: trunk@14392 -
2009-12-10 13:38:34 +00:00
Jonas Maebe
559e284bd0 * merged r13762-14047 from trunk
git-svn-id: branches/objc@14048 -
2009-11-04 15:50:26 +00:00
Jonas Maebe
762a0c7059 * try to prevent addresses from being PICified multiple times (should fix
regressions after r13760)

git-svn-id: trunk@13795 -
2009-10-02 14:13: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
baf1ac22b7 * fixed r13469 (PLT entries are not GOT-relative). Not reverting all the
changes from that commit, because not hardcoding the use of
    current_procinfo in all cases when obtaining the GOT register is
    cleaner

git-svn-id: trunk@13470 -
2009-07-28 17:43:17 +00:00
Jonas Maebe
f265fbe343 * fixed GOT loading for i386 in stubs for external procedures whose external
name is (re)defined in the implementation (mantis #14221)

git-svn-id: trunk@13469 -
2009-07-28 17:28:17 +00:00
yury
41d50e4723 * Fixed dead code warning.
git-svn-id: trunk@13140 -
2009-05-13 11:27:48 +00:00
yury
92ad06f1e8 * Always use RIP relative symbol addressing for x86_64 Windows targets. Bug #13657.
* Support for simple form of RIP relative addressing by x86_64 assembler writer. Example: movl rax,SomeSymbol(%rip)

git-svn-id: trunk@13135 -
2009-05-13 10:07:44 +00:00
Jonas Maebe
7d459cf12a * the compiler now explicitly keeps track of the minimally guaranteed
alignment for each memory reference (mantis #12137, and
    test/packages/fcl-registry/tregistry1.pp on sparc). This also
    enables better code generation for packed records in many cases.
  o several changes were made to the compiler to minimise the chances
    of accidentally forgetting to set the alignment of memory references
    in the future:
    - reference_reset*() now has an extra alignment parameter
    - location_reset() can now only be used for non LOC_(C)REFERENCE,
      use location_reset_ref() for those (split the tloc enum so the
      compiler can catch errors using range checking)

git-svn-id: trunk@12719 -
2009-02-08 13:00:24 +00:00
Jonas Maebe
718694d1d6 * always specify an explicit alignment for tgobj.gettemp (so e.g.
shortstring temps don't get maximum alignment)
  * changed some gettemptyed() calls into gettemp() calls (gettemptyped
    means that this temp can only be used for temps of that type,
    which is necessary for refcounted types but not for floats)

git-svn-id: trunk@12036 -
2008-11-08 22:20:47 +00:00
Jonas Maebe
a23630260b + "weakexternal" support for imported procedures and variables.
the syntax is exactly the same as for "external", except for
    the keyword. It is currently only active for Darwin targets.
    It should also work at least for Linux targets, but only with
    the GNU assembler (which is why it is not activated there)
  + test for this functionality

git-svn-id: trunk@12009 -
2008-11-01 18:38:32 +00:00
florian
1afb1aa9cc + ror/rol functions
+ internal compiler support for ror/rol on i386

git-svn-id: trunk@11466 -
2008-07-27 17:12:32 +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
Jonas Maebe
8349cde7db * changed byte/word/longbool to be Delphi-compatible (+ similar changes
for qwordbool) + test:
    o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
    o these types are now all signed
    o converting an integer type to a byte/word/long/qwordbool using an
      explicit type cast keeps the integer's original value stored in the
      bool, instead of forcing it to ord(true)/ord(false)
    (mantis #10233 and #10613, implemented for all architectures, testsuite
     tested for ppc32, sparc and x86)
  * fixed some places where the rtl depended on longbool(true) having the
    value 1
  * extended several boolean tests (and adapted some to no longer assume
    that byte/word/long/qwordbool(true)=1)
  + support for converting to qwordbool in second_int_to_bool for x86, ppc
    and sparc

git-svn-id: trunk@9898 -
2008-01-24 21:30:55 +00:00
Jonas Maebe
6c536dab3e * added several missing make_simple_ref() calls
* removed addr_pic again for darwin, as you have to explicitly code
    the relative address using a relsym instead of using an assembler
    directive like @GOT there

git-svn-id: trunk@9353 -
2007-11-29 22:06:14 +00:00
peter
dbba46c0e4 * set addr_pic
git-svn-id: trunk@9350 -
2007-11-29 21:15:22 +00:00
Jonas Maebe
c8f270c556 + darwin/x86_64 gprof support
git-svn-id: trunk@9252 -
2007-11-14 20:47:55 +00:00
Jonas Maebe
032352d98b + darwin/x86_64 support
git-svn-id: trunk@9180 -
2007-11-10 18:33:09 +00:00
Jonas Maebe
8d8ba9a583 * fixed pic reference loading for non-darwin i386 platforms after
r8657

git-svn-id: trunk@8993 -
2007-10-29 19:00:15 +00:00
florian
19b79468ad * store/load mmx registers properly
* sse registers can be stored/loaded aligned on x86-64

git-svn-id: trunk@8969 -
2007-10-28 14:08:57 +00:00
florian
f32831c44a * fixed assembling of fisttp of sse3 instruction set
+ sse3 optimized trunc() using fisttp
+ -Cfsse3 for x86-64

git-svn-id: trunk@8962 -
2007-10-27 20:50:46 +00:00
Jonas Maebe
c84744b27f * fixed a_jmp_name() for darwin/i386 (go via a stub)
* fixed g_external_wrapper for darwin/i386 (both with and without pic,
    by using a_jmp_name(), because the darwin jump stubs can always
    be called directly)

git-svn-id: trunk@8669 -
2007-09-28 14:12:46 +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
Jonas Maebe
9750e49d5a * fixed x86 compilation after r8651
git-svn-id: trunk@8652 -
2007-09-26 17:25:38 +00:00
Jonas Maebe
ecd2445602 + segment register support in g_concatcopy (should fix #9667, but I
can't test since I don't have Dos/Windows -- at least the changes
    don't break Linux/i386)

git-svn-id: trunk@8608 -
2007-09-22 20:10:56 +00:00
tom_at_work
b0bb3f94a7 * improve powerpc64/linux stub for external procedures in units: also consider GOT change in call to this external procedure
* refactored above mentioned stub code generation, allowing the CG to define a cpu specific method for this task by overriding new g_external_wrapper() method

git-svn-id: trunk@8566 -
2007-09-19 20:41:39 +00:00
peter
2f044481ae * release temp when downgrading fpuregister value
git-svn-id: trunk@8530 -
2007-09-17 20:52:24 +00:00
daniel
a05d228679 - Remove IE from g_concatcopy again.
git-svn-id: trunk@8065 -
2007-07-15 16:15:13 +00:00
daniel
f0633187f4 + Change constants in g_concatcopy to make the right decisions on x86_64.
* Fix move copy in g_concatcopy for x86_64.

git-svn-id: trunk@8058 -
2007-07-14 21:29:57 +00:00
daniel
4f6eb50391 + Internalerror if g_concatcopy is called with len=0.
git-svn-id: trunk@8052 -
2007-07-14 18:56:16 +00:00
florian
c7100799ed + forbid usage of $E on targets supporting no fpu emulation
- disabled -Cfsoft on i386

git-svn-id: trunk@7625 -
2007-06-10 17:03:26 +00:00
florian
fe69d19f9c * align stack properly if no stack frame is generated, should resolve #8986
git-svn-id: trunk@7611 -
2007-06-09 18:46:35 +00:00
florian
f87e96dfb0 * properly release open array value parameters on x86-64 or if they contain automated types, resolves #8664
git-svn-id: trunk@7100 -
2007-04-13 19:20:56 +00:00
Jonas Maebe
abef29c1d5 * fixed x86 vector mmloads and use scalar loads in ncgcnv
git-svn-id: trunk@5967 -
2007-01-14 13:36:26 +00:00
Jonas Maebe
fc99b0ad48 * fixed floating point precision conversions for loc_mmregister and
between loc_fpuregister and loc_mmregister

git-svn-id: trunk@5942 -
2007-01-13 15:00:00 +00:00
Jonas Maebe
e815b923d5 * a_loadfpu_* gets two size parameters: fromsize and tosize
* fixed downsizing the precision of floating point values
  * floating point constants are now treated using only the minimal
    precision required (e.g. 2.0 is now a single, 1.1 extended etc)
    (Delphi compatible)

git-svn-id: trunk@5927 -
2007-01-12 18:33:51 +00:00
florian
36a500c38c * don't coalescate with frame/stack pointer
git-svn-id: trunk@5880 -
2007-01-11 10:47:07 +00:00
florian
c238bb15d1 * .init section support
git-svn-id: trunk@5835 -
2007-01-07 10:03:52 +00:00
florian
836dbad1b2 * bitpacked stuff fixed for x86-64
git-svn-id: trunk@5503 -
2006-11-26 21:57:34 +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
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
florian
fb5e396881 + experimental -Sv option to support vector arithmetics
git-svn-id: trunk@4825 -
2006-10-07 21:39:48 +00:00
peter
0bb22a2d17 * don't generate fwait by default anymore
* SAVEFPUEXCEPTIONS switch added to enable fwait inserts

git-svn-id: trunk@4733 -
2006-09-26 19:22:45 +00:00
florian
efd24ba7a0 * x86_64 abis ensure that the direction flag is clear at procedure entry
git-svn-id: trunk@4689 -
2006-09-23 10:08:47 +00:00
florian
abc957d80d * fixed stack initialization on Win x64, still not sure if it is necessary
git-svn-id: trunk@4617 -
2006-09-12 20:49:18 +00:00
Jonas Maebe
51259b697b * more mmx/sse register spilling fixes:
* operand read/write info for movaps and movapd
    * use "movapd reg,reg" instead of "movaps reg,reg" if appropriate
      so the spilling code can spill the correct size to memory
    * replace movaps/movapd with movss/movsd when spilling to memory
      instead of movq

git-svn-id: trunk@4612 -
2006-09-12 11:07:45 +00:00
florian
b3ae0c51a4 * sizes2load handles OS_NO properly if one size is given
git-svn-id: trunk@4586 -
2006-09-09 18:12:07 +00:00
florian
55484f9bb7 * shifting can operate on 64 bit values on x86_64
git-svn-id: trunk@4561 -
2006-09-07 19:41:02 +00:00
florian
6d0a078441 * do stack page initialization on i386-wince as well
git-svn-id: trunk@4521 -
2006-08-31 14:23:29 +00:00
florian
9e66674ff9 + first part of qwordbool implementation
git-svn-id: trunk@4462 -
2006-08-19 23:16:17 +00:00
Jonas Maebe
a3a74c3fbe * fixed interface wrappers for darwin in case they end up in
a shared library

git-svn-id: trunk@3980 -
2006-06-27 14:32:14 +00:00
daniel
3048a98a6f * Fix and activate internal backtrace routines
git-svn-id: trunk@3524 -
2006-05-14 13:04:03 +00:00
peter
0a50dd1029 * give IE if fpu stack counter becomes < 0
git-svn-id: trunk@3294 -
2006-04-20 11:15:54 +00:00
florian
af4d5c898a + stack touching for win64
git-svn-id: trunk@3252 -
2006-04-17 19:00:53 +00:00
florian
2d3d4a66f6 * keep stack aligned to 16 byte borders on winx64
git-svn-id: trunk@3212 -
2006-04-15 16:48:28 +00:00
peter
0ec2921bbe * split newasmsymbol to refasmsymbol and defineasmsymbol
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +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
Vincent Snijders
7dfd96b59c * fixed another typo
git-svn-id: trunk@2927 -
2006-03-15 20:42:14 +00:00
Vincent Snijders
594861974d * fixed typo
git-svn-id: trunk@2926 -
2006-03-15 20:28:02 +00:00
peter
588cccb3ca * remove some obsolete i386 specific code
* use a_optimize_const to remove useless opcodes

git-svn-id: trunk@2910 -
2006-03-13 16:37:08 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
9125d0c189 * also align esp for all procedures/functions declared "assembler",
since they may do a call. If you don't want that to happen, use
    the nostackframe directive (i386-darwin only)

git-svn-id: trunk@2896 -
2006-03-12 21:20:29 +00:00
Jonas Maebe
435aee2398 * fixed g_copyvaluepara_openarray/g_releasevaluepara_openarray for
use_fixed_stack (use generic code)

git-svn-id: trunk@2895 -
2006-03-12 21:04:59 +00:00
Jonas Maebe
e7112c6636 * ignore po_interrupt for i386-darwin since it messes up stack alignment
git-svn-id: trunk@2857 -
2006-03-11 14:30:02 +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
Jonas Maebe
d7b4ac73cf + darwin/x86 support for a_call_name
git-svn-id: trunk@2819 -
2006-03-09 15:02:55 +00:00
Jonas Maebe
d2ba35df7e * don't destroy edi when allocating the stack frame for win32
git-svn-id: trunk@2330 -
2006-01-23 10:54:48 +00:00
florian
f5d790f9b6 * i386 uses dwarf cfi info on linux/win32, so even when omitting the stack frame, trace backs in gdb are correct
git-svn-id: trunk@2316 -
2006-01-21 14:30:57 +00:00
florian
a3e3e7e8c5 * avoid esp to be freed
git-svn-id: trunk@2203 -
2006-01-07 14:32:09 +00:00
Jonas Maebe
7aa315c71a * made some Tcpuregisterset parameters const to avoid useless copying
git-svn-id: trunk@2176 -
2006-01-05 10:10:25 +00:00
florian
f7d2c47f73 + no stackframe is generated for i386 if possible
git-svn-id: trunk@2162 -
2006-01-04 19:19:06 +00:00
florian
61e3b70cfa * cleaned up segmented thread variables
git-svn-id: trunk@2135 -
2006-01-03 12:49:29 +00:00
florian
fb4557d71e * first implementation of pic for i386
git-svn-id: trunk@2107 -
2006-01-01 20:14:48 +00:00
florian
99be25604b * fixed address calculation when generating pic
git-svn-id: trunk@1759 -
2005-11-15 19:25:42 +00:00
florian
72d7597edc + implementation of lazy binding for linux
git-svn-id: trunk@1750 -
2005-11-14 22:28:12 +00:00
florian
2585309c04 * of course, we can't omit pic generation for local symbols
git-svn-id: trunk@1743 -
2005-11-13 21:36:38 +00:00
florian
ff6af1804b * fixed loading of pic'ed symbols with offset
* symbols declared AB_COMMON or AB_LOCAL need no pic

git-svn-id: trunk@1739 -
2005-11-13 21:05:42 +00:00
florian
bc7fab1aeb + plt support for x86_64
git-svn-id: trunk@1578 -
2005-10-23 14:47:09 +00:00
florian
1b97e2cffd + added missing make_simple_ref
git-svn-id: trunk@1572 -
2005-10-23 13:28:43 +00:00
peter
a3ab2053c9 * support multiple asmlabel types, renamed getlabel to
getjumplabel and added type para to getlabel for specific types
  * moved lineinfo generation from assemble and aggas to dbgstabs

git-svn-id: trunk@1120 -
2005-09-18 21:16:10 +00:00
daniel
22e89e1a42 * Proof of concept: Support threadvars using segment registers.
git-svn-id: trunk@740 -
2005-07-24 21:06:23 +00:00
florian
83209064f9 * getmmregister should test the mm register allocator for being assigned
git-svn-id: trunk@221 -
2005-06-05 15:32:24 +00:00
florian
c97714de9f * renamed windows related units from win32 to win so it can contain ce and 64 bit stuff
git-svn-id: trunk@213 -
2005-06-05 13:42:35 +00:00
florian
ebcb69478f * fixed a lot of stuff for fpu/mm register variables
git-svn-id: trunk@199 -
2005-06-04 21:23:15 +00:00
florian
b0545a7a04 * first bunch of pic fixes
git-svn-id: trunk@76 -
2005-05-22 19:57:38 +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
florian
0811184277 + pic code reading for the assembler readers
* loadaddr generates pic code as well now
2005-04-25 09:51:07 +00:00
florian
0cd81efba7 + storing non-extended floats to memory generates now a fwait to get exceptions at the correct place 2005-03-13 17:15:26 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
b1c8bfc478 + x86_64 pic draft 2005-02-06 00:05:56 +00:00
florian
3835b9f13b * fixed previous commit 2005-02-05 18:32:17 +00:00
florian
e94fe45846 * fixed dword -> qword/int64 type cast on x86_64 2005-02-05 18:08:48 +00:00
peter
0991cb288d * tf_pic_uses_got added 2005-01-25 18:48:15 +00:00
florian
cf55930118 * fixed loadaddr; I wonder how it ever worked 2005-01-08 16:00:55 +00:00
florian
0037f4a199 * fixed operand size calculation for sse operands
+ all nasm assembler targets to help page output added
2004-12-12 10:50:34 +00:00