Commit Graph

151 Commits

Author SHA1 Message Date
florian
4148637c8c * fold mov/lea/mov as well if possible
git-svn-id: trunk@25905 -
2013-11-01 19:01:29 +00:00
Jonas Maebe
2ba22f666e + support for R_SUBMMX and R_SUBMMY in generic_regname()
git-svn-id: trunk@25225 -
2013-08-07 12:41:47 +00:00
nickysn
9dbbffba61 + added trefaddr.addr_seg for referencing the segment of a symbol
git-svn-id: trunk@24859 -
2013-06-10 01:16:37 +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
2279e51a95 + added trefaddr.addr_far for emitting far calls
git-svn-id: trunk@24826 -
2013-06-09 10:24:06 +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
8d6017348a * fixed the defines of OS_PAIR and OS_SPAIR for cpus with 16-bit or 8-bit ALU
git-svn-id: branches/i8086@23797 -
2013-03-12 01:00:40 +00:00
sergei
a519741d89 - Revert {$J-} accidentally committed in r23555.
git-svn-id: trunk@23556 -
2013-02-01 16:49:46 +00:00
sergei
503b132096 * cgbase.pas: added more MIPS-specific address types, needed to support large GOT model.
* cpugas.pas: GetReferenceString: rewritten, it is easier than trying to fix it. Fixes incorrect writing of non-PIC references containing base, symbol and offset together, and some forms of PIC references. Also supports newly introduced address types.

git-svn-id: trunk@23555 -
2013-02-01 16:46:22 +00:00
pierre
493c77bca0 + Add addr_pic_call16 relocation type for mips
git-svn-id: trunk@23547 -
2013-01-31 13:08:49 +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
67744ef46e * fix methodpointers in registers on big endian targets
git-svn-id: trunk@22362 -
2012-09-09 17:54:35 +00:00
florian
7361e19799 + support for handling OS_128/OS_S128 on 64 Bit CPUs as far as needed for method pointers in registers
git-svn-id: trunk@22344 -
2012-09-06 15:12:12 +00:00
Jonas Maebe
0fc422f244 * moved definition of maxcpuregister and tcpuregisterset from cgbase to
cgutils, and define them so they are no larger than what is required by
    the current target platform
  * added cgutils to the uses clause of several units that use the
    tcpuregisterset type

git-svn-id: trunk@21624 -
2012-06-15 18:24:35 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
florian
fcd3872d88 + introduction of tcgint
git-svn-id: trunk@17017 -
2011-02-26 20:15:53 +00:00
florian
26ce3cef00 * compilation fixes
* completed a_load_ref_reg
+ implemented procedure entry/exit code generation
+ implemented a_load_reg_ref

git-svn-id: trunk@17009 -
2011-02-26 20:08:23 +00:00
florian
8b245369e1 + implemented normalize_ref
git-svn-id: trunk@17008 -
2011-02-26 20:03:39 +00:00
Jonas Maebe
f302fcdc98 + TSubRegisterSet definition forgotten to commit in r15952
* fixed compilation on non-x86 platforms after r15952

git-svn-id: trunk@15956 -
2010-09-09 08:48:02 +00:00
Jonas Maebe
025ec34e4d + "CExtended" type that is the same as "extended", but conforming to the
properties/behaviour of the equivalent of Extended in C (i.e., to
    "long double" on i386 and x86_64 platforms that support a 10 byte
    long double, and to "double" elsewhere)

git-svn-id: trunk@14912 -
2010-02-14 13:45:58 +00:00
florian
e5ebb2a26e * started to integrate the code of David Zhang's MIPS code from fpc-mips on sf into fpc trunk
git-svn-id: trunk@14219 -
2009-11-19 22:07:10 +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
florian
6898b10e2e * fixed order of cgloc2str strings
git-svn-id: trunk@13352 -
2009-06-29 19:27:51 +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
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
florian
b5c114934d * reverted 9727 and made a better fix for it
git-svn-id: trunk@9734 -
2008-01-13 13:23:19 +00:00
florian
295fdbe37c * use the current cgsizes instead of the def to determine if loadfpu can be used, else softfloats are broken
git-svn-id: trunk@9728 -
2008-01-13 09:59:13 +00:00
Jonas Maebe
20dbda751a * fixed sparc compilation after addr_lo/hi changes
git-svn-id: trunk@8107 -
2007-07-20 12:30:16 +00:00
tom_at_work
2d1f9b20a3 * merged trefaddr.addr_lo/addr_hi with trefaddr.addr_low/addr.high; some related bugfixing/cleanup
git-svn-id: trunk@7983 -
2007-07-08 20:50:58 +00:00
peter
f2a25e845d * refactor gen_alloc_symtable so it depends on varsym type and not
on symtabletype

git-svn-id: trunk@5259 -
2006-11-05 21:53:40 +00:00
Jonas Maebe
9acc38e82a * moved some more common powerpc32/64 things to ppcgn
+ a few initial darwin/ppc64 things

git-svn-id: trunk@5197 -
2006-11-03 12:30:17 +00:00
florian
fb5e396881 + experimental -Sv option to support vector arithmetics
git-svn-id: trunk@4825 -
2006-10-07 21:39:48 +00:00
Jonas Maebe
2e131baa4c * code generator support for subsetreferences (memory locations which
are not a multiple of 8 bits, nor necessarily aligned at a
    multiple of 8 bits). Supports both constant and variable bit
    indices.

git-svn-id: trunk@4443 -
2006-08-19 11:14:43 +00:00
Jonas Maebe
8e5e1d8cdb * another shuffle fix
git-svn-id: trunk@3857 -
2006-06-13 07:54:35 +00:00
Jonas Maebe
bbeb8c14b1 * fixed shuffle helpers
git-svn-id: trunk@3856 -
2006-06-13 07:53:39 +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
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
f87b04c034 Merged revisions 2994 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2994 | peter | 2006-03-21 07:58:12 +0100 (Tue, 21 Mar 2006) | 2 lines

  * use float size for parameters on the stack

........

git-svn-id: trunk@2995 -
2006-03-21 06:59:04 +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
florian
137f8f340d * handling of address registers in references fixed
* write address registers as areg when compiling with -sr

git-svn-id: trunk@2398 -
2006-02-01 22:45:14 +00:00
Jonas Maebe
ac24965242 * procedures which use goto/label revert to the older and less
efficient regvar allocation scheme
  * also allocate regvars before the loops, not just afterwards

git-svn-id: trunk@2192 -
2006-01-05 23:45:00 +00:00
Jonas Maebe
61ef30381c * Only synchronise regvars after a loop (and only those regvars
which are used in the loop). The compiler makes now much
    more efficient use of registers for register variables (and
    different regvars can now also share the same register if
    their live range does not overlap)

git-svn-id: trunk@2186 -
2006-01-05 17:48:11 +00:00
Jonas Maebe
3f86e6b728 * keep upper bound of loops in a register instead of in memory
git-svn-id: trunk@2105 -
2006-01-01 17:02:34 +00:00
tom_at_work
0f10de3d1a - Powerpc compiler cycles again; during adding PowerPC64 code, the trefaddr enumeration for PPC was mixed up
git-svn-id: trunk@1195 -
2005-09-25 19:16:57 +00:00
peter
6bf3269b41 * powerpc64 port from Thomas Schatzl
git-svn-id: trunk@1193 -
2005-09-25 17:19:44 +00:00
michael
7449f99d5f + Removed all compatibility defines from compiler
git-svn-id: trunk@335 -
2005-06-09 21:14:22 +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
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