Commit Graph

626 Commits

Author SHA1 Message Date
Károly Balogh
b77a51f67d + first somewhat-valid AmigaOS/PowerPC support (no linking yet)
git-svn-id: trunk@4329 -
2006-08-02 18:47:25 +00:00
Jonas Maebe
c25aba7592 * cleaned up subsetreg support (put everything in a record)
* prepared support for elements with arbitrary bit length (as opposed
    to a multiple of 8)

git-svn-id: trunk@4324 -
2006-08-01 20:39:53 +00:00
florian
4095b36047 * cr register name fix
git-svn-id: trunk@4276 -
2006-07-22 09:33:47 +00:00
daniel
e21858f85a + Add Jonas his explanation as comments to gas_regname
git-svn-id: trunk@4272 -
2006-07-21 11:26:00 +00:00
Jonas Maebe
e08aa358fb * removed stb from calculation_target_op0 (stb does not calculate a value
to store in operand 0)

git-svn-id: trunk@4269 -
2006-07-20 22:38:26 +00:00
Jonas Maebe
90cacb4cf5 * changed result type of dwarf_reg from byte to shortint to avoid
warning about comparison which can never be true

git-svn-id: trunk@4183 -
2006-07-14 17:25:16 +00:00
Jonas Maebe
ef16df72da * some optimizations for code generated for
"(x and power_of_two_const) <>/= 0)"

git-svn-id: trunk@4159 -
2006-07-13 17:48:41 +00:00
Jonas Maebe
e32e5e1f9f * fixed interface wrappers for darwin in case they end up in
a shared library

git-svn-id: trunk@3976 -
2006-06-27 13:42:00 +00:00
Károly Balogh
bea92e0656 + small optimizations for code generated for MorphOS syscalls
git-svn-id: trunk@3939 -
2006-06-25 12:33:07 +00:00
Jonas Maebe
bc96cd8008 + more rlwinm optimizations
git-svn-id: trunk@3823 -
2006-06-08 09:48:08 +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
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
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
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
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
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
a387be19a0 + a_call_ref for ppc32 and ppc64
git-svn-id: trunk@3392 -
2006-04-30 20:50:37 +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
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
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
Jonas Maebe
6c62d6a647 + get_max_value in defutil
* use a linear cmp list instead of subtractions on ppc if low >=
    low(smallint) and high <= high(word), because a compare does not
    introduce any dependencies (and in those cases using subtractions
    does not save any instructions or bytes either)

git-svn-id: trunk@3065 -
2006-03-28 11:49:16 +00:00
peter
0ec2921bbe * split newasmsymbol to refasmsymbol and defineasmsymbol
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +00:00
peter
870be04a3f * use dwarf_reg()
git-svn-id: trunk@3046 -
2006-03-26 20:15:32 +00:00
Jonas Maebe
ab8f96f4cf * disabled i386 createtempparaloc again because it generates wrong
code in case of nested function calls with lots of arguments

git-svn-id: trunk@2948 -
2006-03-17 22:01:25 +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
Jonas Maebe
0232ab62cb * fixed compilation
git-svn-id: trunk@2940 -
2006-03-17 17:26:58 +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
Jonas Maebe
e919e1f2fd * fixed compilation
git-svn-id: trunk@2914 -
2006-03-14 08:38:13 +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
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
4ed39b0c16 * don't explicitly us NR_F0 in concatcopy but ask a register from
the register allocator (since NR_F0 can also be used by the ra)

git-svn-id: trunk@2855 -
2006-03-11 14:13:47 +00:00
Jonas Maebe
988f689445 * fixed compilation
git-svn-id: trunk@2851 -
2006-03-11 09:30:09 +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
7cdf9bbaac * moved the indirect symbol stuff from nppcld to cgobj and ncgld, since
darwin/x86 needs the same code
  - removed now empty nppcld unit

git-svn-id: trunk@2821 -
2006-03-09 18:27:11 +00:00
Jonas Maebe
ba6f1e4990 * factered WriteInstruction out of TGNUAssembler into its own class
* put Apple-specific GNU assembler stuff in its own class
  + darwin/x86 support to the assembler writer

git-svn-id: trunk@2818 -
2006-03-09 14:59:04 +00:00
Jonas Maebe
8a10afc29d * align symbol stubs on 16 bytes instead of 4
* removed some useless/wrong ".data" section directives in the symbol stubs

git-svn-id: trunk@2816 -
2006-03-09 10:36:57 +00:00
peter
38c0ae73da Merged revisions 2775,2788-2789 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2775 | peter | 2006-03-05 22:43:30 +0100 (Sun, 05 Mar 2006) | 2 lines

  * merge ppu changes to keep ppus the same

........
r2788 | peter | 2006-03-06 12:59:14 +0100 (Mon, 06 Mar 2006) | 2 lines

  * Add TFPList and TFPObjectList

........
r2789 | peter | 2006-03-06 13:01:37 +0100 (Mon, 06 Mar 2006) | 2 lines

  * fix powerpc

........

git-svn-id: trunk@2790 -
2006-03-06 12:04:44 +00:00
Jonas Maebe
ab5f5ca15e * fixed ppc compilation
git-svn-id: trunk@2778 -
2006-03-05 22:06:44 +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
Jonas Maebe
07ce826be0 + added ability for (mainly 32bit) code generators to directly handle
32bit*32bit->64bit          
  + implemented the above for ppc32 (note: does not happen very often
    in practice, at least not in the compiler and rtl)       
  + test for the above

git-svn-id: trunk@2735 -
2006-03-04 15:09:09 +00:00
Jonas Maebe
8f6b52d482 * don't set high register of 64 bit result for comparisons in case
one of the operands is a constant (missing begin/end after "if")

git-svn-id: trunk@2733 -
2006-03-04 14:14:39 +00:00
Jonas Maebe
dd03d5c997 * put jump tables in rodata
git-svn-id: trunk@2726 -
2006-03-03 19:33:17 +00:00
Jonas Maebe
d8ed0a8722 * copied createtemppara override from x86, to avoid creating double
copies of large value paras

git-svn-id: trunk@2692 -
2006-02-26 14:53:59 +00:00
Jonas Maebe
71407ba8cb * don't concatcopy if source = dest
git-svn-id: trunk@2691 -
2006-02-26 14:53:20 +00:00
Jonas Maebe
7f247e9305 * fix and suppress some rangecheck/overflow errors (regarding calculation
of magic constants for changing division into multiplication)

git-svn-id: trunk@2653 -
2006-02-20 11:01:38 +00:00
Jonas Maebe
285744fe00 * fixed range errors
git-svn-id: trunk@2649 -
2006-02-20 10:39:37 +00:00
Jonas Maebe
21e604c1ea + add "-arch ppc" to the assembler call to fix assembling when
running on x86

git-svn-id: trunk@2590 -
2006-02-15 11:00:09 +00:00