Commit Graph

8832 Commits

Author SHA1 Message Date
tom_at_work
f38dcb7145 * fixed wrong alignment on 64 bit cpus for rtti data for ordinals and enums if the cpu requires proper alignment
git-svn-id: trunk@3834 -
2006-06-09 21:01:57 +00:00
yury
01edb71190 * internal linker removes imports referenced by unused code.
git-svn-id: trunk@3832 -
2006-06-09 20:57:48 +00:00
yury
8bef50f29f * fixed import by ordinal number for all Windows targets when using external linker.
git-svn-id: trunk@3830 -
2006-06-09 20:02:03 +00:00
yury
fb9f8bb2a1 * Support for -WB<image_base> option in internal linker.
git-svn-id: trunk@3828 -
2006-06-09 11:08:46 +00:00
yury
e80e5be980 * RELOC_RVA fix for ARM cpu.
* Added offset overflow check for RELOC_RELATIVE_24.

git-svn-id: trunk@3827 -
2006-06-09 11:06:10 +00:00
Jonas Maebe
bc96cd8008 + more rlwinm optimizations
git-svn-id: trunk@3823 -
2006-06-08 09:48:08 +00:00
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
florian
03a0a4ca71 * updates from Karl-Michael Schindler
git-svn-id: trunk@3805 -
2006-06-05 13:42:17 +00:00
tom_at_work
c5cbdda62e * fixed generation of ANDI and ANDIS instructions in the optimizer, properly casting the immediate parameter to an unsigned integer
git-svn-id: trunk@3800 -
2006-06-04 21:16:10 +00:00
tom_at_work
2adcae0cd8 * optimized register-register loading of < 64 bit values (removes superfluous code), similar to 3207 for ppc
* fixed fixref() which did not always treat addresses as 64 bit sizes, resulting in problems using above optimization
* cleanup
* removed assembly fpc_int_real again, has problems with border cases

git-svn-id: trunk@3795 -
2006-06-04 17:35:55 +00:00
michael
bc356240d6 + Updated default config file for FPC
git-svn-id: trunk@3792 -
2006-06-04 16:32:20 +00:00
marco
179451dcfd * Initial linkordering subsystem. Not active (need t_* mods which I want in a different revision to ease merging)
git-svn-id: trunk@3788 -
2006-06-04 12:44:48 +00:00
tom_at_work
a24a329d1c * fixed record regvar code generation for ppc64 for now
git-svn-id: trunk@3787 -
2006-06-04 12:43:28 +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
tom_at_work
9a5885b8d2 * small optimizations for the subsetreg functions
git-svn-id: trunk@3763 -
2006-06-01 20:57:54 +00:00
yury
ba04f1a147 * Internal linker does not leave reference to .dll if no imports from it are used.
* Internal linker writes FPC version to EXE header.
* Internal linker writes subsystem version 3.0 for wince.

git-svn-id: trunk@3760 -
2006-05-31 22:32:08 +00:00
Jonas Maebe
488d8ae766 * improved support for merging two consecutive rlwinm's (now also works
if both perform a rotation)

git-svn-id: trunk@3759 -
2006-05-31 20:25:39 +00:00
Jonas Maebe
3a3651a050 + ppc implementations of subsetreg routines
git-svn-id: trunk@3758 -
2006-05-31 19:01:08 +00:00
yury
76cab9e3c0 * Removed tf_winlikewidestring flag for wince target. Currently it causes problems.
git-svn-id: trunk@3754 -
2006-05-31 12:49:15 +00:00
Jonas Maebe
8e1dd27896 * properly copy tasmlabels when generating altsymbols
git-svn-id: trunk@3753 -
2006-05-31 11:49:37 +00:00
Jonas Maebe
f6d4f38bc0 * fixed setting of alignment of C records for darwin (only do it for
records, not for objects)

git-svn-id: trunk@3752 -
2006-05-31 11:02:42 +00:00
tom_at_work
129fe92d9e * fixed subregister loading and storing for ppc64
git-svn-id: trunk@3751 -
2006-05-30 21:57:48 +00:00
florian
73ff7479df * cleaned up
git-svn-id: trunk@3749 -
2006-05-30 20:38:20 +00:00
daniel
7db8bc6498 * Revert version change
git-svn-id: trunk@3748 -
2006-05-30 18:36:32 +00:00
daniel
91ba2e8851 * Bump compiler version to 2.1.3.
git-svn-id: trunk@3746 -
2006-05-30 14:00:25 +00:00
Jonas Maebe
03302dc7c4 * fixed support for macpas & and | operators: they only work on booleans
now, and always perform short circuit boolean evaluation (also in {$b+})

git-svn-id: trunk@3745 -
2006-05-30 13:02:36 +00:00
oro06
dcd973801f +UNICODE default define for wince
git-svn-id: trunk@3744 -
2006-05-30 07:48:37 +00:00
Jonas Maebe
6335ce6e45 - reverted previous wrong commit
git-svn-id: trunk@3743 -
2006-05-30 07:37:09 +00:00
florian
4f199e533b + creation of IDE configuration files
git-svn-id: trunk@3740 -
2006-05-29 20:42:10 +00:00
Jonas Maebe
b784b2f39e * fixed a_load_subsetreg_reg for loading signed fields (EXTRDI results
in an unsigned number)

git-svn-id: trunk@3739 -
2006-05-29 20:26:06 +00:00
florian
eebef025c2 * default instruction set set to pentium on i386
git-svn-id: trunk@3738 -
2006-05-29 19:52:59 +00:00
florian
bbc42e8503 * made ie unique
git-svn-id: trunk@3737 -
2006-05-29 19:50:12 +00:00
tom_at_work
dba5da67af * initial support for subregister loading (ppc64 specific part only)
+ added EXTRDI and INSRDI opcode
* lots of additional debug code when EXTDEBUG enabled

git-svn-id: trunk@3724 -
2006-05-28 21:02:25 +00:00
yury
b73557ea4e * fixed wince internal linker.
git-svn-id: trunk@3719 -
2006-05-28 20:09:22 +00:00
florian
5575a837db * gba patch from Francesco Lombardi
git-svn-id: trunk@3716 -
2006-05-28 14:48:24 +00:00
florian
9b54dcc781 * fixed compilation on non x86 CPUs
git-svn-id: trunk@3715 -
2006-05-28 12:02:10 +00:00
florian
24ab8e0177 * create proper external stubs in case of generating pic
git-svn-id: trunk@3713 -
2006-05-28 09:23:53 +00:00
yury
2bf89e2040 * Internal linker support for wince.
git-svn-id: trunk@3712 -
2006-05-27 22:49:22 +00:00
florian
daeda1b9e0 * fixed error msg (that->this)
* array properties can be published in delphi mode though it makes no sense to publish them because they can't be streamed

git-svn-id: trunk@3694 -
2006-05-27 15:24:55 +00:00
florian
86d9e04409 * method pointers are now passed by value, fixes #5736
git-svn-id: trunk@3691 -
2006-05-27 08:52:05 +00:00
florian
6620181ee0 * expect repetition of class for class methods and fixed error message to show the forward declaration instead of the current one
git-svn-id: trunk@3685 -
2006-05-26 19:06:40 +00:00
Jonas Maebe
2e49a88148 * fixed some wrong ordering of procdef stabs
git-svn-id: trunk@3679 -
2006-05-26 10:21:59 +00:00
Jonas Maebe
670393533b * tai_symbol no longer derives from tailineinfo, so line number stabs come after
symbols instead of before them

git-svn-id: trunk@3675 -
2006-05-25 20:24:07 +00:00
tom_at_work
1bd43869d0 * reenabled generation of TOC labels for symbols with a length under a certain threshold (to avoid too long symbols passed to the cg which will get truncated)
* cleanup

git-svn-id: trunk@3674 -
2006-05-25 20:16:25 +00:00
tom_at_work
da95ffc4f3 * fixed .toc section label generation
git-svn-id: trunk@3673 -
2006-05-25 20:00:48 +00:00
Jonas Maebe
e531c4f125 + very limited SSA support (only outside control flow
constructs for now)

git-svn-id: trunk@3671 -
2006-05-25 11:45:08 +00:00
Jonas Maebe
a20f211811 * don't try to reuse registers from left/right, impedes optimal register
allocation

git-svn-id: trunk@3669 -
2006-05-25 11:31:32 +00:00
florian
30e7d87c11 * fixed loading of floating point constants
git-svn-id: trunk@3667 -
2006-05-25 09:57:07 +00:00
yury
5d82676f78 * Do not use cprefix for cdecl DLL imports in Windows.
git-svn-id: trunk@3663 -
2006-05-24 23:53:10 +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
c0f805ae6d * fixed a_param_ref in case the paraloc size is different from the source size
git-svn-id: trunk@3653 -
2006-05-24 09:36:41 +00:00
florian
d4848169e1 * as operator isn't allowed for non com interfaces
git-svn-id: trunk@3646 -
2006-05-23 18:52:56 +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
Jonas Maebe
848fa52fa1 * enable rodata for ppc (+ darwin renaming to ".const")
git-svn-id: trunk@3642 -
2006-05-23 11:08:07 +00:00
Jonas Maebe
b5ce7e454c * fixed bug when assigning a negative value in a register to certain
fields of record regvars + test

git-svn-id: trunk@3641 -
2006-05-23 09:17:21 +00:00
Jonas Maebe
32a9702965 * fixed loading of negative constants in some record regvar fields
git-svn-id: trunk@3640 -
2006-05-23 09:07:03 +00:00
Jonas Maebe
4c41e2c677 * fixed IE when using a field of a record regvar as loop control variable
(the generated code is far from optimal, need to find a way to make such
     records non regable)

git-svn-id: trunk@3639 -
2006-05-23 08:55:45 +00:00
Jonas Maebe
7131a2beb6 + a_load_loc_subsetreg
git-svn-id: trunk@3638 -
2006-05-23 08:54:52 +00:00
peter
50ee3a96ad * fix importprocname for cdecl
git-svn-id: trunk@3636 -
2006-05-23 07:59:36 +00:00
peter
5e5edcb520 * allow passing single element to open array bug6960
git-svn-id: trunk@3634 -
2006-05-23 07:23:45 +00:00
florian
2ddd617971 * fixed stm/ldm for usage with large temp. areas
git-svn-id: trunk@3633 -
2006-05-22 21:00:55 +00:00
florian
3a03aee386 * use .rodata directive on arm
git-svn-id: trunk@3632 -
2006-05-22 19:15:11 +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
peter
a57708e63d * DLL support
git-svn-id: trunk@3623 -
2006-05-21 21:07:49 +00:00
peter
392ef22a7f * win imports are only by importname not anymore per procdef
git-svn-id: trunk@3622 -
2006-05-21 20:40:18 +00:00
peter
4790838455 * add -Xi and -Xe
git-svn-id: trunk@3621 -
2006-05-21 20:18:50 +00:00
florian
3261281184 * fixed stabs generation for static class variables
git-svn-id: trunk@3614 -
2006-05-21 17:34:30 +00:00
Jonas Maebe
6dde68da3a * fix IE when subscripting records part of another record regvar
git-svn-id: trunk@3613 -
2006-05-21 16:04:14 +00:00
peter
0bb57006e5 * fix setting of internal/external linker
git-svn-id: trunk@3612 -
2006-05-21 10:52:23 +00:00
Jonas Maebe
84d1fc929f * properly set regvarability of parameters and local variables of inlined
functions
  * fixed setting of expectloc for fields of regvar'ed records

git-svn-id: trunk@3607 -
2006-05-20 23:37:55 +00:00
florian
627c7f2ae0 * allow assembler labels to be used in typed consts
git-svn-id: trunk@3590 -
2006-05-20 10:18:46 +00:00
florian
307315cef6 * movq is also a pure move
git-svn-id: trunk@3588 -
2006-05-19 23:52:10 +00:00
florian
0378f8c162 + more reg/reg reg/mem only instructions
git-svn-id: trunk@3587 -
2006-05-19 23:51:13 +00:00
florian
64f51612d4 * fixed broken fpu type setting in 2.1.1
git-svn-id: trunk@3586 -
2006-05-19 23:28:55 +00:00
florian
e4d2d87bb9 * function results can be a generic parameter
git-svn-id: trunk@3585 -
2006-05-19 21:54:39 +00:00
tom_at_work
5240913a80 * cleaner allocation of scratch registers, removed unnecessary cg methods which emitted code using a fixed register
+ generation of lots of additional debug/trace messages with $EXTDEBUG
* code cleanup (intendation)

git-svn-id: trunk@3584 -
2006-05-19 21:27:44 +00:00
Jonas Maebe
e344ee3cd7 + support for register variables which contain records
git-svn-id: trunk@3580 -
2006-05-19 15:49:07 +00:00
florian
5ef2566381 + parse packed set, fixes #6735
git-svn-id: trunk@3578 -
2006-05-19 12:31:38 +00:00
florian
3824604e8a * export of qualified unit symbols, fixes #6848
git-svn-id: trunk@3570 -
2006-05-18 20:43:52 +00:00
florian
f27fa0d24f * forgotten commit of r3566
git-svn-id: trunk@3569 -
2006-05-18 20:43:16 +00:00
florian
55962cef95 * don't do mul->shl optimizations when compiling with overflow checking
* keep operand size sign information in shl/shr

git-svn-id: trunk@3566 -
2006-05-18 19:30:44 +00:00
Jonas Maebe
a3cb1b1523 + support for "exotic" locations in load_left_right()
git-svn-id: trunk@3556 -
2006-05-17 19:12:00 +00:00
Jonas Maebe
67dc63048c * fixed and enhanced rlwinm optimizations somewhat
git-svn-id: trunk@3555 -
2006-05-17 19:04:31 +00:00
Jonas Maebe
e0250bcdb4 * never remove regvar-ability of parameters passed by reference
(previously worked only for var/out, now also for const and
     is more generic)

git-svn-id: trunk@3554 -
2006-05-17 13:38:02 +00:00
florian
d5008742e5 + tf_smartlink_sections set for arm-wince
git-svn-id: trunk@3547 -
2006-05-16 13:11:52 +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
florian
3c4207bbe0 * fixed i.e. when type casting array constructors
git-svn-id: trunk@3532 -
2006-05-14 20:13:56 +00:00
florian
48802b0866 + variants can be used as case expression
git-svn-id: trunk@3530 -
2006-05-14 18:29:49 +00:00
florian
d9dfcfa402 * fixed reading of shifter op in mov instructions, fixes bug #4722
git-svn-id: trunk@3528 -
2006-05-14 16:28:16 +00:00
daniel
1d9b6ed5f0 * Disable internal_backtrace again
git-svn-id: trunk@3526 -
2006-05-14 13:58:00 +00:00
daniel
3048a98a6f * Fix and activate internal backtrace routines
git-svn-id: trunk@3524 -
2006-05-14 13:04:03 +00:00
florian
454fb81c5b + optimize <string>+'' and ''+<string>
git-svn-id: trunk@3522 -
2006-05-14 09:43:53 +00:00
daniel
4d37c919cc * Internal implementations of get_frame, get_caller_frame and get_caller_addr.
Not yet activated.

git-svn-id: trunk@3517 -
2006-05-14 08:39:19 +00:00
florian
281d6907d2 * fixed overloading of div operator
git-svn-id: trunk@3513 -
2006-05-13 21:37:54 +00:00
florian
d1bfba1c4d * handle stored false properly when overriding properties
git-svn-id: trunk@3509 -
2006-05-13 20:26:42 +00:00
florian
5d9f3cf33d * fixed s<'', fixes 4925
git-svn-id: trunk@3505 -
2006-05-13 20:10:27 +00:00
florian
9b75d87b55 * define PIC when generating pic
git-svn-id: trunk@3504 -
2006-05-13 20:03:40 +00:00
florian
ac4bde88ac * fix 3 operand instructions with third operand being a constant
git-svn-id: trunk@3502 -
2006-05-13 19:51:32 +00:00
florian
1928cd1e60 + Indonesian message file from Zaenal Mutaqin
git-svn-id: trunk@3497 -
2006-05-13 18:19:14 +00:00
florian
688547953d * fixed win64 coff writing
git-svn-id: trunk@3493 -
2006-05-13 16:04:33 +00:00
florian
10520ba9a7 * updates from Karl-Michael Schindler
git-svn-id: trunk@3492 -
2006-05-13 15:51:34 +00:00
florian
c6787b52a7 + compile the svn revision into the compiler, to do so, a file compiler/revision.inc must exist which is updated then
git-svn-id: trunk@3491 -
2006-05-13 15:25:36 +00:00
florian
f378d688d4 * fixed reading of registers in intel assembler mode on x86-64
git-svn-id: trunk@3488 -
2006-05-13 09:24:42 +00:00
florian
83a0c8cd4b + support for more win64 specific relocs
git-svn-id: trunk@3482 -
2006-05-11 19:34:21 +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
2f2c3c09fc * MS-C uses no _ prefix for symbols on win64
git-svn-id: trunk@3475 -
2006-05-11 08:11:15 +00:00
florian
8bd674af24 * another patch from Roozbeh GHolizadeh
* improved concatcopy code generation
  * improved constant loading
  * improved multiplication code generation

git-svn-id: trunk@3471 -
2006-05-10 20:07:29 +00:00
florian
570c1bc3a5 * widestrings aren't ref. counted anymore on windows
git-svn-id: trunk@3466 -
2006-05-09 20:54:26 +00:00
florian
b698d6eb02 * fixed bootstrapping on 64 bit CPUs
git-svn-id: trunk@3461 -
2006-05-09 13:15:22 +00:00
florian
ab1660c9c2 + tf_winlikewidestring
git-svn-id: trunk@3457 -
2006-05-08 18:20:26 +00:00
peter
739c322f60 * fix dllscanner for win32
git-svn-id: trunk@3449 -
2006-05-07 10:20:17 +00:00
peter
6af8b52132 * define common symbol when it is not available
git-svn-id: trunk@3447 -
2006-05-07 09:08:55 +00:00
peter
36a57726ac * always build deref info for localst
git-svn-id: trunk@3446 -
2006-05-07 09:01:21 +00:00
florian
79b8d66212 * fixed safecall calling convention on x86_64
git-svn-id: trunk@3442 -
2006-05-06 22:56:34 +00:00
florian
2983b01109 * variant size must be 24 bytes on 64 bit platforms
git-svn-id: trunk@3441 -
2006-05-06 22:52:13 +00:00
tom_at_work
540af422ca * allocate dedicated register for a_call_ref() to avoid problems with R0-usage on ppc64.
git-svn-id: trunk@3439 -
2006-05-06 21:30:04 +00:00
florian
cae35add51 + reading of winx64 coff object files generated by MS-VC
git-svn-id: trunk@3426 -
2006-05-06 07:59:37 +00:00
florian
da02375f57 + safecall support for x86_64
git-svn-id: trunk@3425 -
2006-05-06 07:58:08 +00:00
Jonas Maebe
5afd8c5e76 * fixed LOC_JUMP handling for case nodes
git-svn-id: trunk@3421 -
2006-05-05 09:01:55 +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
acc016c9ec * finished safecall support
git-svn-id: trunk@3417 -
2006-05-04 20:40:31 +00:00
florian
fa03ab8fe5 * fixed arm compiler by adding a_call_ref
git-svn-id: trunk@3416 -
2006-05-03 13:53:40 +00:00
Jonas Maebe
da3d22e11e * fixed for darwin
git-svn-id: trunk@3413 -
2006-05-02 07:43:52 +00:00
florian
23e67ee289 + intel assembler reader for x86-64
git-svn-id: trunk@3411 -
2006-05-01 19:56:00 +00:00
florian
23f1f83835 + is_automatable
git-svn-id: trunk@3410 -
2006-05-01 19:55:25 +00:00
florian
b98c2b4617 * made win64 ppus usable for win32 and win64 compilers
git-svn-id: trunk@3400 -
2006-05-01 16:18:48 +00:00
florian
36c8decc92 * updated to support 64 bit PPUs (no "cross dumping" yet)
+ dispinterface dumping

git-svn-id: trunk@3399 -
2006-05-01 15:14:54 +00:00
Jonas Maebe
b1c72f6cfa * add ppcgen directory to unit search path for ppc32/ppc64 (forgot to
commit)

git-svn-id: trunk@3396 -
2006-05-01 07:37:32 +00:00
Jonas Maebe
5fc6e81f55 - removed some unit dependencies (most notable cg64f32)
git-svn-id: trunk@3394 -
2006-04-30 20:53:19 +00:00
Jonas Maebe
a387be19a0 + a_call_ref for ppc32 and ppc64
git-svn-id: trunk@3392 -
2006-04-30 20:50:37 +00:00
florian
23af245ba2 * fixed parameter order of self and result to be COM compatible
git-svn-id: trunk@3391 -
2006-04-30 20:00:45 +00:00
florian
2bb707a4ee * fixed COM parameter passing
git-svn-id: trunk@3389 -
2006-04-30 19:09:27 +00:00
florian
9bd2ee5477 * optimized code generation for virtual method calls
git-svn-id: trunk@3388 -
2006-04-30 19:07:16 +00:00
florian
f7817b5669 + parsing of variant dispatching
git-svn-id: trunk@3387 -
2006-04-30 17:53:53 +00:00
florian
c81f34aeee + parsing of dispinterface properties
git-svn-id: trunk@3383 -
2006-04-30 14:29:16 +00:00
florian
06e7d4be7a + dispid parsing
git-svn-id: trunk@3378 -
2006-04-30 08:25:36 +00:00
florian
09ad199450 * cleanup and bug fixing of unaligned data handling code by Roozbeh GHolizadeh
git-svn-id: trunk@3377 -
2006-04-30 08:07:29 +00:00
peter
c861491323 * fix typecast
git-svn-id: trunk@3376 -
2006-04-29 22:43:36 +00:00
peter
d69ad5d84d * cleanup external/nolink options
git-svn-id: trunk@3375 -
2006-04-29 21:49:37 +00:00
florian
91434bd791 * fixed several dispinterface parsing related stuff
git-svn-id: trunk@3373 -
2006-04-29 21:39:21 +00:00
florian
aa2e2a2829 * fix for -Oa parsing, by Roozbeh GHolizadeh
git-svn-id: trunk@3372 -
2006-04-29 21:34:02 +00:00
Jonas Maebe
20e73384ae * tcginnode now uses LOC_JUMP when it generates jumps, resulting in
more efficient code for most "if x in constant_set then" statements
    (removes superfluous LOC_JUMP -> LOC_REGISTER -> LOC_JUMP conversions)

git-svn-id: trunk@3370 -
2006-04-29 20:16:26 +00:00
florian
13493a5355 * fixed copying of unaligned value parameters
git-svn-id: trunk@3369 -
2006-04-29 20:13:57 +00:00
florian
5e4ff16934 * access packed records with unaligned data accesses
git-svn-id: trunk@3365 -
2006-04-29 17:44:27 +00:00
florian
9d42d1986c * corrected record alignment on wince
git-svn-id: trunk@3363 -
2006-04-29 16:26:54 +00:00
florian
053bff4295 + improved concatcopy from Roozbeh GHolizadeh
git-svn-id: trunk@3355 -
2006-04-29 13:12:48 +00:00
yury
2fc45056c7 * fix for rev 3349.
git-svn-id: trunk@3353 -
2006-04-29 11:54:06 +00:00
florian
600af6c9d0 + support for unaligned as lvalue
git-svn-id: trunk@3352 -
2006-04-29 11:52:57 +00:00
florian
0780616dee + unaligned load/store support from Roozbeh GHolizadeh
git-svn-id: trunk@3351 -
2006-04-29 11:44:44 +00:00
florian
9e00f894a9 + support for unaligned function
git-svn-id: trunk@3350 -
2006-04-29 11:15:29 +00:00
yury
9ad6409662 * Fixed linking for arm-wince target.
git-svn-id: trunk@3349 -
2006-04-29 09:44:22 +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
peter
d19c898b56 * remove obsolete generatesmartlib
git-svn-id: trunk@3341 -
2006-04-27 06:40:19 +00:00
florian
f073b1288d * avoid crash when multiple references to one text symbol entry are used
git-svn-id: trunk@3339 -
2006-04-26 18:46:38 +00:00
florian
98d428ff30 * fixed coding style
git-svn-id: trunk@3338 -
2006-04-26 18:13:14 +00:00
florian
6c3ef12cfb * fixed internal error with int64 comparisations
git-svn-id: trunk@3337 -
2006-04-26 18:12:22 +00:00
florian
001ca388eb * fixed important library writing on arm
git-svn-id: trunk@3336 -
2006-04-26 18:11:25 +00:00
florian
a25337d9ca + op_reg_reg_reg_shifterop
git-svn-id: trunk@3330 -
2006-04-25 18:50:19 +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
peter
70e7546d87 * us cs_opt_stackframe
git-svn-id: trunk@3326 -
2006-04-23 20:53:45 +00:00
peter
79e483ec65 * cpu64 -> cpu64bit
git-svn-id: trunk@3324 -
2006-04-23 19:22:50 +00:00
peter
22ada6da0d * initialize output of process_ea
git-svn-id: trunk@3323 -
2006-04-23 19:19:49 +00:00
peter
31c3b5963c * default x86_64-win64 when compiled under windows
git-svn-id: trunk@3322 -
2006-04-23 19:06:03 +00:00
peter
cba7504dec * use -P for cross compile
* support libimp*.a

git-svn-id: trunk@3321 -
2006-04-23 18:53:29 +00:00
florian
c1c8a274bc * fixed compilation on non x86 systems
git-svn-id: trunk@3300 -
2006-04-20 15:03:53 +00:00
peter
89f5d65784 * fix findlohilabel
git-svn-id: trunk@3299 -
2006-04-20 13:59:14 +00:00
peter
cf0c78e7af * Support in tempnodes for SSE floats in XMM registers
git-svn-id: trunk@3295 -
2006-04-20 11:16:26 +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
tom_at_work
b46f7259ca * gprof profiling support
* some additional safety checks

git-svn-id: trunk@3290 -
2006-04-20 08:42:56 +00:00
florian
83f4ab0f4a * align data, bss and text sections to 16 byte boundaries
git-svn-id: trunk@3286 -
2006-04-19 21:54:43 +00:00
peter
76534b1888 * always add library prefix and suffix to generate uniform dll name
git-svn-id: trunk@3285 -
2006-04-19 16:23:42 +00:00
peter
4fd1679b16 * only write line number once
* only write line numbers once, this is forced by requiring always a higher
    line number
  * don't write constsyms for default parameters, they break N_Function scopes

git-svn-id: trunk@3282 -
2006-04-19 13:31:17 +00:00
peter
ead6c6a29a * fix writing of long stabstr entries
git-svn-id: trunk@3279 -
2006-04-19 08:21:49 +00:00
peter
f9a741df23 * CPU386 define for Delphi compatibility
git-svn-id: trunk@3276 -
2006-04-19 06:46:54 +00:00
Jonas Maebe
3360e21bd8 + added mwpascal as supported calling convention
git-svn-id: trunk@3275 -
2006-04-18 21:27:02 +00:00
tom_at_work
3f2f694d48 * per-parameter alignment set in target specific paramanager now overrides default alignment of parameter locals
git-svn-id: trunk@3272 -
2006-04-18 14:32:42 +00:00
tom_at_work
f31ede0b12 * fixed code generation after recent changes of int_cgsize()
* initial code generation for gprof

git-svn-id: trunk@3271 -
2006-04-18 10:27:11 +00:00
tom_at_work
b64981a704 * initial gprof code for ppc64/linux
* compilation fixes
* alignment related fixes

git-svn-id: trunk@3270 -
2006-04-18 10:21:58 +00:00
tom_at_work
7a068de50a * removed misleading non-working automatic save/restore of registers for profiling code (must be done manually in tcg.g_profilecode)
git-svn-id: trunk@3269 -
2006-04-18 09:59:12 +00:00
peter
fe4ab79cd9 * remove check for out/var parameters with LOC_CREFERENCE, we generate valid
code. The checking if the code is allowed is already done by valid_for_assign()

git-svn-id: trunk@3262 -
2006-04-18 06:27:01 +00:00
peter
d858a419c8 * missing import_name flag
git-svn-id: trunk@3256 -
2006-04-17 21:06:36 +00:00
peter
ce58e15393 * fix coff section names to fix resourcestrings with
the external linker
  * create import libraries for dll imports, this uses
    the new objdata framework to generate the binary
    object files directly without needing an assembler pass
  * store import_dll and import_name in ppu
  * external linker uses import libraries
  * internal linker uses import info from symtables,
    no dlls are needed anymore

git-svn-id: trunk@3255 -
2006-04-17 20:48:22 +00:00
florian
97fcac35f3 * fixed compilation on winx64
git-svn-id: trunk@3254 -
2006-04-17 20:33:07 +00:00
florian
af4d5c898a + stack touching for win64
git-svn-id: trunk@3252 -
2006-04-17 19:00:53 +00:00
florian
5a888656ca * pass records of all sizes by reference if they are const
git-svn-id: trunk@3251 -
2006-04-17 18:12:14 +00:00
florian
9bca90c81b * use double as bestreal on win64
git-svn-id: trunk@3249 -
2006-04-17 16:05:05 +00:00
florian
1e52f348c0 * fixed load_fpu_location for xmm locations
git-svn-id: trunk@3248 -
2006-04-17 16:03:55 +00:00
florian
61d86150aa * interface wrappers for win64 abi fixed
git-svn-id: trunk@3240 -
2006-04-17 08:25:44 +00:00
florian
f702b481f0 * fixed assembling of (%rbp)
git-svn-id: trunk@3239 -
2006-04-17 07:58:37 +00:00
Jonas Maebe
6738df45e8 * made ar'ing of smartlinked libraries a lot faster
git-svn-id: trunk@3235 -
2006-04-16 18:43:28 +00:00
Jonas Maebe
adea84b807 * made ar'ing of smartlinked libraries a lot faster
git-svn-id: trunk@3234 -
2006-04-16 18:42:15 +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
florian
2d3d4a66f6 * keep stack aligned to 16 byte borders on winx64
git-svn-id: trunk@3212 -
2006-04-15 16:48:28 +00:00
Jonas Maebe
0d77459b9d * added missing masking of upper 24/16 bits on ppc after performing
add/sub/shl/mul on 8 or 16 bit "registers" + test (tcinvint5)
  * optimized register-register loading of < 32 bit values (removes
    30KB of superfluous extsb/extsh/rlwinm's from compiler+rtl)

git-svn-id: trunk@3207 -
2006-04-14 13:01:10 +00:00
Jonas Maebe
608f7de834 * fixed typo in comments
git-svn-id: trunk@3205 -
2006-04-14 09:16:43 +00:00
Jonas Maebe
5e02b02d24 * properly count references to overloaded operators (tests/tbs/tb0500.pp)
git-svn-id: trunk@3204 -
2006-04-14 09:12:48 +00:00
yury
7d8aa405b1 * GenerateImportSection is true by default as before. Import libs issue need to be fixed before setting this option to false by default.
git-svn-id: trunk@3203 -
2006-04-14 06:47:38 +00:00
peter
810a776e10 * patch from Jonas to pass interface result as parameter
git-svn-id: trunk@3199 -
2006-04-13 07:04:48 +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
Jonas Maebe
76937d5222 * fixed previous commit
git-svn-id: trunk@3195 -
2006-04-12 10:46:21 +00:00
peter
b7a936faa0 * interfaces return values need to be passed in parameters
git-svn-id: trunk@3194 -
2006-04-12 10:26:10 +00:00
Jonas Maebe
05540cad44 * give an error for {$calling } (i.e., when a procedure directive is
missing)

git-svn-id: trunk@3193 -
2006-04-12 07:58:25 +00:00
Jonas Maebe
4d55b3aee3 + support for {$calling default} to switch back to the default calling
convention

git-svn-id: trunk@3192 -
2006-04-11 20:41:53 +00:00
Jonas Maebe
0a10fac060 * fixed regvar bug in in-node code (regvar could be modified by
"in" code)

git-svn-id: trunk@3191 -
2006-04-11 15:08:07 +00:00
Jonas Maebe
039e7143f4 * avoid some unnecessary bool->int->bool type conversions
git-svn-id: trunk@3184 -
2006-04-09 18:33:05 +00:00
Tomas Hajny
c17b57db07 + Statistics of warnings, hints and notes - (modified/fixed) patch from Naj Kejah, part of wishlist item 4897, plus hardcoded text moved to message file
git-svn-id: trunk@3181 -
2006-04-09 11:54:09 +00:00
Jonas Maebe
55a2007321 * fixed skipping of parameter registers for ppc/aix in case a parameter
has to be passed on the stack before all registesters are used up
  * fixed calculation of stack offsets for ppc/aix abi for small records, 
    arrays and ordinals passed on the stack after all registers are used
  + test for all of the above

git-svn-id: trunk@3166 -
2006-04-07 22:17:45 +00:00
Jonas Maebe
c41da1172c * removed wrong comment along with commented-out code
git-svn-id: trunk@3165 -
2006-04-07 21:57:30 +00:00
Jonas Maebe
a55ca0e89f * fixed c record aligning for ppc after symtablestack structure change
git-svn-id: trunk@3164 -
2006-04-07 20:41:33 +00:00
peter
cc67c1ea2d * RELOC_ABSOLUTE32 for all non-x86_64
git-svn-id: trunk@3161 -
2006-04-07 08:29:29 +00:00
Jonas Maebe
eb9f00193b * return OS_NO from int_cgsize() for sizes which are not a power of 2
(fixes crash in tests/test/cg/tpara2.pp for ppc, does not break i386)

git-svn-id: trunk@3159 -
2006-04-06 22:09:25 +00:00
peter
945cb29f24 * TFPHashList.Pack now also packs the items
* Free ObjRelocations

git-svn-id: trunk@3153 -
2006-04-05 12:36:17 +00:00
peter
82b6546997 * fix importing for win32
git-svn-id: trunk@3147 -
2006-04-05 07:17:41 +00:00
peter
96db39b15d * fix compile for win32
git-svn-id: trunk@3146 -
2006-04-05 06:31:01 +00:00
Vincent Snijders
3c8968a4b3 * moved misplaced comma
git-svn-id: trunk@3145 -
2006-04-05 06:21:21 +00:00
florian
a69ae7ca34 * fixed win32->win64 cross compilation
* fixed win64 import section generation in linker module

git-svn-id: trunk@3143 -
2006-04-04 20:43:34 +00:00
Jonas Maebe
385815beff * fixed offset calculation of first parameter on the stack if there
were any preceding parameters < 4 bytes

git-svn-id: trunk@3141 -
2006-04-04 12:44:19 +00:00
peter
66c41ee7cc * fix memory leak with normal exit
git-svn-id: trunk@3137 -
2006-04-03 16:04:55 +00:00
peter
780089fb26 * fixed and simplified section handling now all sections are
always in objsectionlist

git-svn-id: trunk@3135 -
2006-04-03 08:47:20 +00:00
peter
7923a81cfd * range check error
git-svn-id: trunk@3134 -
2006-04-03 07:51:34 +00:00
peter
d542fd97fb * use TFPHashObjectList instead of TDictionary
git-svn-id: trunk@3133 -
2006-04-02 21:18:04 +00:00
peter
1a3cf9650e * prevent overflow in fphash
git-svn-id: trunk@3130 -
2006-04-02 20:48:36 +00:00
florian
a8c2419d8a * fixed left_and_right_must_be_fpureg
git-svn-id: trunk@3129 -
2006-04-02 20:36:20 +00:00
peter
efe41b0766 * fixed section smartlinking with ld.exe
* reference debugstart and debugend sections

git-svn-id: trunk@3127 -
2006-04-02 20:18:38 +00:00
florian
9da293678e * fixed mm register parameters which were messed up by a previous commit
* fixed duplicate ie number

git-svn-id: trunk@3125 -
2006-04-02 19:15:38 +00:00
florian
d904a04d3b * fixed stackframe generation for win x64
git-svn-id: trunk@3124 -
2006-04-02 19:05:00 +00:00
peter
e2f768982d * fix idata generation
git-svn-id: trunk@3118 -
2006-04-02 00:58:28 +00:00
peter
a609d76920 * don't generate import data section anymore by default
git-svn-id: trunk@3117 -
2006-04-02 00:31:52 +00:00
peter
fc6e4adf74 Merged revisions 3068,3070,3114 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

r3068 | peter | 2006-03-28 15:02:06 +0100 (Tue, 28 Mar 2006) | 2 lines

  * Add new TFPHashList and TFPHashObjectList

r3070 | peter | 2006-03-29 07:39:04 +0100 (Wed, 29 Mar 2006) | 2 lines

  * fix compile

r3114 | peter | 2006-04-01 23:47:50 +0100 (Sat, 01 Apr 2006) | 3 lines

  * remove debug writelns
  * enable vtable optimizer with -Xv

git-svn-id: trunk@3116 -
2006-04-02 00:13:03 +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
florian
5e51aa7968 * fixed pe flags x86_64
* fixed idata for x86_64

git-svn-id: trunk@3112 -
2006-04-01 20:09:13 +00:00
florian
3129dd042e * fixed i386 compilation
git-svn-id: trunk@3110 -
2006-04-01 15:10:46 +00:00
florian
d0c327b14b * basic winx64 calling convention support
git-svn-id: trunk@3108 -
2006-04-01 14:42:52 +00:00
florian
79b2432369 * fixed relocation fixup for x86_64
git-svn-id: trunk@3107 -
2006-04-01 13:41:11 +00:00
florian
3324a4a14b * additional ie
git-svn-id: trunk@3106 -
2006-04-01 13:23:15 +00:00
florian
44f797e5bc + x86_64 relocation support
git-svn-id: trunk@3105 -
2006-04-01 13:13:40 +00:00
florian
1d46c65496 * enabled internal linker for winx64
* more descriptive error messages for the coff reader
* fixed coff magic for x64

git-svn-id: trunk@3104 -
2006-04-01 12:39:15 +00:00
peter
c18c8e2412 * don't put resstrs in multiple .o files. It is too dependent on the linker script
git-svn-id: trunk@3097 -
2006-03-31 19:44:33 +00:00
peter
f26e214fe9 * fix warning that reports incompatibility of assembler and target
git-svn-id: trunk@3095 -
2006-03-31 10:34:50 +00:00
florian
1c9da313d9 * 64 bit movnti
git-svn-id: trunk@3091 -
2006-03-30 18:12:33 +00:00
peter
7f4b051f99 * support subsystem
* fixed stab
  * always keep .rsrc section

git-svn-id: trunk@3089 -
2006-03-30 11:24:17 +00:00
peter
5376d2d570 Merged revisions 3072-3073 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r3072 | peter | 2006-03-29 13:34:42 +0200 (Wed, 29 Mar 2006) | 4 lines

  * std_regname generate pair of registers for float doubles
  * don't call translate_register for regvars if -sr is passed
  * use std_regname in regalloc message

........
r3073 | peter | 2006-03-29 16:00:37 +0200 (Wed, 29 Mar 2006) | 2 lines

  * CMP instructions only read operands

........

git-svn-id: trunk@3079 -
2006-03-30 06:36:42 +00:00
peter
583668896a * rex is x86_64 only
git-svn-id: trunk@3078 -
2006-03-30 06:21:38 +00:00
tom_at_work
0845e7c217 - fixed build by forcing alignment of global constants to a minimum of four bytes. Addresses must be multiples of four on ppc64 in the used addressing mode.
git-svn-id: trunk@3077 -
2006-03-29 21:57:29 +00:00
florian
8ba4fcaad9 * fixed handling of code 214
git-svn-id: trunk@3075 -
2006-03-29 20:24:36 +00:00
florian
b215196734 * fixed cto
git-svn-id: trunk@3074 -
2006-03-29 18:25:48 +00:00