Commit Graph

784 Commits

Author SHA1 Message Date
Jonas Maebe
9e57973566 - reverted previous fix, is wrong
git-svn-id: trunk@3819 -
2006-06-07 20:52:45 +00:00
Jonas Maebe
d9c1078793 * fixed mantis bug #6913
git-svn-id: trunk@3818 -
2006-06-07 19:37:47 +00:00
yury
550626ef34 - Removed need of assembler startup files for wince. Now compiler directly creates .pdata section needed for arm-wince exception handling.
git-svn-id: trunk@3764 -
2006-06-02 08:36:25 +00:00
Jonas Maebe
93fba718b9 * proper fix for problem I tried to solve in r3655
git-svn-id: trunk@3661 -
2006-05-24 19:44:16 +00:00
Jonas Maebe
d1e262d18c * fix use of unitialised value if a procedure only has an
array of const parameter

git-svn-id: trunk@3655 -
2006-05-24 14:56:11 +00:00
Jonas Maebe
a854918f9a * the length of a sequence loading a constant in a register is properly set
* register contents are fully cleared in clearregcontentsfrom()

git-svn-id: trunk@3654 -
2006-05-24 14:38:35 +00:00
Jonas Maebe
00f401693c * fixed web bug #5094. Renaming registers is now done sequentially instead
of all at the same time, because otherwise circular renamings could
    cause errors

git-svn-id: trunk@3644 -
2006-05-23 17:17:23 +00:00
florian
783b91ba1e * yasm fix from Yuri Zaporogets
git-svn-id: trunk@3631 -
2006-05-22 19:06:31 +00:00
Jonas Maebe
cc7cea1a5d * always extend parameters < sizeof(aint) to sizeof(aint) for darwin/x86
git-svn-id: trunk@3628 -
2006-05-22 10:42:55 +00:00
Jonas Maebe
a1b2701e5f * if while we are restoring the contents of a register, we encounter an
operation which changes a register, clear the contents of all registers
    which depend on this register

git-svn-id: trunk@3480 -
2006-05-11 16:46:58 +00:00
florian
a5dfe315ec * made safecall working, handling not consistent yet though
git-svn-id: trunk@3418 -
2006-05-04 22:15:31 +00:00
florian
23e67ee289 + intel assembler reader for x86-64
git-svn-id: trunk@3411 -
2006-05-01 19:56:00 +00:00
Jonas Maebe
34f1c427eb * pass shortstrings (and longstrings) by reference to C routines (this is
what Apple's universal interfaces expect)

git-svn-id: trunk@3343 -
2006-04-27 13:02:36 +00:00
Jonas Maebe
4b887ef604 * when restoring a register's previous contents after it's been replaced
completely, there were some missing checks to make certain these
    previous contents didn't conflict with memory operations in the new
    sequence

git-svn-id: trunk@3329 -
2006-04-24 11:12:17 +00:00
Jonas Maebe
3360e21bd8 + added mwpascal as supported calling convention
git-svn-id: trunk@3275 -
2006-04-18 21:27:02 +00:00
Jonas Maebe
f93ea93cea * fixed returning of records < 8 bytes but not a power of 2 from
functions under Darwin/x86
  * implemented "mwpascal" calling conventions for darwin/x86
    (pass const records by reference, destroyed registers are
     [eax,ecx,edx])

git-svn-id: trunk@3196 -
2006-04-12 12:19:08 +00:00
florian
b215196734 * fixed cto
git-svn-id: trunk@3074 -
2006-03-29 18:25:48 +00:00
peter
0ec2921bbe * split newasmsymbol to refasmsymbol and defineasmsymbol
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +00:00
florian
8a71767125 * movsql fixed in x86_64 assembler writer
git-svn-id: trunk@3048 -
2006-03-26 20:48:05 +00:00
florian
87da67129c * rtl compilation with x86_64 binary writer fixed
git-svn-id: trunk@3042 -
2006-03-26 18:32:15 +00:00
florian
5519158dff + no rex.w prefix support
git-svn-id: trunk@3037 -
2006-03-25 19:45:09 +00:00
Jonas Maebe
af36d177d9 * if we find a constant already loaded in a register and we use that
register, mark the register as read by the current instruction
    (fixes compilation of tcalfun8 with optimizations)

git-svn-id: trunk@3003 -
2006-03-21 15:44:55 +00:00
Jonas Maebe
01cf70d354 * don't change "mov const,ref; mov ref,reg" into "mov const,reg; mov reg,ref"
if ref depends on reg

git-svn-id: trunk@3002 -
2006-03-21 15:25:16 +00:00
peter
37c81492ad Merged revisions 2827,2831,2837,2932-2980 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

r2827 (peter)
  * smartlinking of resourcestrings


r2831 (peter)
  * process_ea 64bit fixes


r2837 (peter)
  * linker script

git-svn-id: trunk@2981 -
2006-03-19 22:12:52 +00:00
Jonas Maebe
8a6ebdf274 - disabled loop unrolling for level 3 optimizations since it only causes
crashes (and even if it didn't, on its own it mainly causes code
    bloat)

git-svn-id: trunk@2941 -
2006-03-17 17:42:39 +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
eb725d4e44 Merged revisions 2908,2911,2913-2917 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2908 | peter | 2006-03-13 13:35:48 +0100 (Mon, 13 Mar 2006) | 2 lines

  * merge trunk upto r2907

........
r2911 | peter | 2006-03-13 18:08:00 +0100 (Mon, 13 Mar 2006) | 2 lines

  * rename values to make room for operand size codes

........
........
........
r2915 | peter | 2006-03-14 13:51:35 +0100 (Tue, 14 Mar 2006) | 2 lines

  * check aktcputype

........
r2916 | peter | 2006-03-14 15:06:32 +0100 (Tue, 14 Mar 2006) | 3 lines

  * merge 300 opcodes
  * more 64bit versions of opcodes

........
r2917 | peter | 2006-03-14 17:34:03 +0100 (Tue, 14 Mar 2006) | 3 lines

  * x86_64 tables
  * convert movq with normal registers to mov

........

git-svn-id: trunk@2931 -
2006-03-16 08:09:28 +00:00
Jonas Maebe
5155de6d61 * fixed webtbs/tw2514 for darwin/i386 (and a similar bug for win32):
you get an internalerror if you try to keep a 0-byte record in
    a register (because the paramgr then tries to allocate a register
    of size OS_NO)

git-svn-id: trunk@2929 -
2006-03-15 21:48:32 +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
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
2888a21593 * list supported optimization options in -i
* support $OPTIMIZATION and $O+

git-svn-id: trunk@2904 -
2006-03-13 11:17:56 +00:00
peter
17bc033747 Merged revisions 2791-2793,2798-2800,2806-2825,2829-2830,2833,2839,2898 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2791 | peter | 2006-03-06 14:57:20 +0100 (Mon, 06 Mar 2006) | 3 lines

  * disable internal linker if -s is used
  * enable section smartlink by default for internal linker

........
r2792 | peter | 2006-03-06 14:58:23 +0100 (Mon, 06 Mar 2006) | 2 lines

  * support long sectionnames

........
r2793 | peter | 2006-03-06 15:04:12 +0100 (Mon, 06 Mar 2006) | 2 lines

  * register symbols in section also when reading .o files

........
r2798 | peter | 2006-03-07 10:08:07 +0100 (Tue, 07 Mar 2006) | 2 lines

  * symbolrefs need to be loaded from relocations when loading a .o

........
r2799 | peter | 2006-03-07 16:17:52 +0100 (Tue, 07 Mar 2006) | 3 lines

  * remove unreferenced sections
  * set stacksize in peopthaeder

........
r2800 | peter | 2006-03-07 17:02:46 +0100 (Tue, 07 Mar 2006) | 2 lines

  * objsection.fullname added

........
........
r2807 | peter | 2006-03-08 08:18:04 +0100 (Wed, 08 Mar 2006) | 2 lines

  * powerpc64 fixes

........
r2808 | peter | 2006-03-08 08:35:53 +0100 (Wed, 08 Mar 2006) | 2 lines

  * register x86_64_pecoff

........
r2809 | peter | 2006-03-08 11:26:38 +0100 (Wed, 08 Mar 2006) | 2 lines

  * optimize and cleanup matches()

........
r2810 | peter | 2006-03-08 12:25:28 +0100 (Wed, 08 Mar 2006) | 2 lines

  * small tweak to readdata to copy values direct without calling move()

........
r2811 | peter | 2006-03-08 15:55:21 +0100 (Wed, 08 Mar 2006) | 2 lines

  * compile fix

........
........
........
........
........
........
r2817 | peter | 2006-03-09 14:20:52 +0100 (Thu, 09 Mar 2006) | 2 lines

  * more readable with long secnames

........
........
........
........
........
........
........
........
r2825 | peter | 2006-03-10 09:52:05 +0100 (Fri, 10 Mar 2006) | 2 lines

  * don't initialize/finalize external variables

........
r2829 | peter | 2006-03-10 10:58:08 +0100 (Fri, 10 Mar 2006) | 2 lines

  * merge 64bit assembler

........
r2830 | peter | 2006-03-10 12:25:08 +0100 (Fri, 10 Mar 2006) | 2 lines

  * TElfAssembler rename

........
r2833 | peter | 2006-03-10 15:22:27 +0100 (Fri, 10 Mar 2006) | 3 lines

  * support & prefix to force identifier parsing, used to access fields that
    have the names of a register

........
r2839 | peter | 2006-03-10 19:37:11 +0100 (Fri, 10 Mar 2006) | 2 lines

  * merge stabs section flags

........
r2898 | peter | 2006-03-12 23:18:18 +0100 (Sun, 12 Mar 2006) | 2 lines

  * reorder instructions for better first match

........

git-svn-id: trunk@2902 -
2006-03-13 09:29:57 +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
09a3bbfc07 * fixed previous commit
git-svn-id: trunk@2877 -
2006-03-11 22:53:41 +00:00
Jonas Maebe
7b5ee7342a * fixed wrong generation of teardown of stackframe on i386-darwin
in case no stackframe was generated (in case no pi_do_call in
    current_procinfo.flags)

git-svn-id: trunk@2876 -
2006-03-11 22:38:28 +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
3765a9bbb8 * fixed set_first_temp_offset for use_fixed_stack
git-svn-id: trunk@2866 -
2006-03-11 21:08:04 +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
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
6e58ad4a12 * set firsttempoffset properly for use_fixed_stack
git-svn-id: trunk@2853 -
2006-03-11 13:54:03 +00:00
Jonas Maebe
fad5d59bd9 * turned {$ifdef cputargethasfixedstack} into "if use_fixed_stack"
* fixed i386 parameter passing of function calls nested in parameters
    of functions which also need the stack to pass poarameters

git-svn-id: trunk@2847 -
2006-03-10 23:44:04 +00:00
Jonas Maebe
41eba7dffe * properly calculate the value to add to esp at the end of a function
without framepointer
  * use generic save/restore exception reason code for use_fixed_stack

git-svn-id: trunk@2846 -
2006-03-10 22:34:11 +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
florian
5ece7cbc2f * first part of x86-64 assembler
git-svn-id: trunk@2824 -
2006-03-09 22:05:16 +00:00
peter
785550d7e3 Merged revisions 2669,2673,2677,2683,2696,2699-2702,2704,2708,2712-2715,2718,2722-2723,2728-2730,2740,2769 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

........
r2669 | peter | 2006-02-23 09:31:21 +0100 (Thu, 23 Feb 2006) | 2 lines

  * add compiler dir

........
r2673 | peter | 2006-02-23 17:08:56 +0100 (Thu, 23 Feb 2006) | 2 lines

  * enabled more code

........
r2677 | peter | 2006-02-24 17:46:29 +0100 (Fri, 24 Feb 2006) | 2 lines

  * pe stub and headers

........
r2683 | peter | 2006-02-25 23:13:24 +0100 (Sat, 25 Feb 2006) | 2 lines

  * section options cleanup

........
r2696 | peter | 2006-02-26 20:27:41 +0100 (Sun, 26 Feb 2006) | 2 lines

  * fixed typecasts

........
r2699 | peter | 2006-02-26 23:04:32 +0100 (Sun, 26 Feb 2006) | 2 lines

  * simple linking works

........
r2700 | peter | 2006-02-27 09:44:50 +0100 (Mon, 27 Feb 2006) | 2 lines

  * internal linker script

........
r2701 | peter | 2006-02-27 12:05:12 +0100 (Mon, 27 Feb 2006) | 2 lines

  * make elf working again

........
r2702 | peter | 2006-02-27 14:04:43 +0100 (Mon, 27 Feb 2006) | 3 lines

  * disable dwarf for smartlinking with .a
  * fix section start in new .a file

........
r2704 | peter | 2006-02-27 18:30:43 +0100 (Mon, 27 Feb 2006) | 2 lines

  * stab section fixes

........
r2708 | peter | 2006-02-28 19:29:17 +0100 (Tue, 28 Feb 2006) | 2 lines

  * basic work to merge stabs sections

........
r2712 | peter | 2006-02-28 23:17:48 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload tmodules before linking

........
r2713 | peter | 2006-02-28 23:18:51 +0100 (Tue, 28 Feb 2006) | 2 lines

  * fixed stabs linking

........
r2714 | peter | 2006-02-28 23:19:19 +0100 (Tue, 28 Feb 2006) | 2 lines

  * show code and data size

........
r2715 | peter | 2006-02-28 23:25:35 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload .stabs from objdata after it is merged

........
r2718 | peter | 2006-03-01 12:24:38 +0100 (Wed, 01 Mar 2006) | 3 lines

  * memsize/datasize cleanup
  * check for exports/resources when adding module to linker

........
r2722 | peter | 2006-03-03 09:12:20 +0100 (Fri, 03 Mar 2006) | 2 lines

  * new TObjSymbol splitted from TAsmSymbol

........
r2723 | peter | 2006-03-03 14:08:55 +0100 (Fri, 03 Mar 2006) | 2 lines

  * coff fixes after recent objsymbol changes

........
r2728 | peter | 2006-03-03 22:43:04 +0100 (Fri, 03 Mar 2006) | 2 lines

  * fixed coff writer

........
r2729 | peter | 2006-03-04 01:10:32 +0100 (Sat, 04 Mar 2006) | 2 lines

  * fix read-only opening

........
r2730 | peter | 2006-03-04 01:11:16 +0100 (Sat, 04 Mar 2006) | 2 lines

  * Read edata from DLLs, basic work

........
r2740 | peter | 2006-03-04 21:13:43 +0100 (Sat, 04 Mar 2006) | 3 lines

  * deletedef added
  * don't remove defs from index when we are already clearing everything

........
r2769 | peter | 2006-03-05 21:42:33 +0100 (Sun, 05 Mar 2006) | 4 lines

  * moved TObj classes to ogbase
  * ObjSection.SymbolRefs and SymbolDefines list
  * DLL importing

........

git-svn-id: trunk@2771 -
2006-03-05 21:10:37 +00:00
peter
5ac78d1ec3 * fix range error
git-svn-id: trunk@2640 -
2006-02-20 06:59:14 +00:00
daniel
e138c9c081 + Add nice little peephole trick
+ Add a comment to another

git-svn-id: trunk@2602 -
2006-02-15 22:03:07 +00:00
Jonas Maebe
a68ca7eb2a * fixed web bug #4768 + test
git-svn-id: trunk@2479 -
2006-02-08 19:22:26 +00:00