Commit Graph

41490 Commits

Author SHA1 Message Date
florian
945b318012 + get rid of unnecessary 64 bit conversions too if one of the operands is 8 or 16 bit
git-svn-id: trunk@25897 -
2013-11-01 19:01:09 +00:00
florian
d201bcb1cd * get rid of 64 bit operations on 64 bit targets as well if possible
git-svn-id: trunk@25896 -
2013-11-01 19:01:06 +00:00
florian
c8743c4826 * support 32 bit operations on x86-64 in the code generator
git-svn-id: trunk@25895 -
2013-11-01 19:01:02 +00:00
Jonas Maebe
dad15f2843 * fixed test for double precision platforms after r25888
git-svn-id: trunk@25894 -
2013-11-01 14:18:40 +00:00
Jonas Maebe
96ac477b96 * part of r25888, forgot to commit
git-svn-id: trunk@25891 -
2013-10-31 13:50:35 +00:00
Jonas Maebe
85059f79fe * readded halt(1) temporarily removed for testing and accidentally committed
git-svn-id: trunk@25890 -
2013-10-31 13:47:49 +00:00
Jonas Maebe
4becf1f3c1 + tests for mantis #23196 and #25122, already fixed by r25888
git-svn-id: trunk@25889 -
2013-10-31 13:10:48 +00:00
Jonas Maebe
21eeec9981 + re-implementation of real->string and string->real conversion routines
based on the Grisu1 algorithm. This corrects several precision issues
    with the previous code used to perform such conversions (patch by
    Max Nazhalov, mantis #25241)
   o adaptation of several tests to deal with the better precision of these
     routines compared to the previous version
  Please don't remove the real2str.inc file yet, it's still used by the
  JVM target for now

git-svn-id: trunk@25888 -
2013-10-31 12:39:27 +00:00
Jonas Maebe
7b97752d0b - removed commented out duplicate thlcg.getmmregister()
git-svn-id: trunk@25887 -
2013-10-31 12:30:53 +00:00
nickysn
8bfe2a56dd * optimized SAR by 31 to use only one SAR instruction in tcg8086.a_op_const_reg
git-svn-id: trunk@25883 -
2013-10-30 16:53:59 +00:00
sergei
ca445577ff - Linux RTL: MIPS no longer needs the softfloat code, don't compile it.
git-svn-id: trunk@25882 -
2013-10-30 12:25:11 +00:00
nickysn
f288859fba * i386 optimization - remove the test/or %y, %y instruction in the sequence:
shl/sal/shr/sar $x, %y
  test/or %y, %y
  jz/jnz/setz/setnz/cmovz/cmovnz ...

git-svn-id: trunk@25881 -
2013-10-29 17:34:32 +00:00
sergei
66e82f1655 + i386: generate optimized code for 64-bit arithmetic shifts by constant amount. Shifts by 63 and by less than 32 take just two instructions, shifts by 32..62 bits are done with 3 instructions.
git-svn-id: trunk@25880 -
2013-10-29 16:10:13 +00:00
Jonas Maebe
e219b8387e * no longer support building with 2.6.0 (mainly because 2.6.0 doesn't generate
working binaries by default on OS X 10.9, and 2.6.2 has been out for quite
  a while now...)

git-svn-id: trunk@25879 -
2013-10-29 13:36:43 +00:00
sergei
486a7ef81e * tx86inlinenode.second_popcnt: use emit_ref_reg instead of appending instruction directly, this provides proper PIC handling of the reference. emit_reg_reg part is not strictly necessary, but done for consistency.
git-svn-id: trunk@25878 -
2013-10-28 16:40:42 +00:00
sergei
6a08ca3f0b * tmoddivnode.firstoptimize improvements/fixes:
* Fixed misplaced parentheses, which were preventing optimization of "unsigned mod power_of_two" into "and" expressions.
  * Handling "signed div power_of_two": properly delete the temp node, removes warnings when compiled with "-dEXTDEBUG". This however requires another temp node for storing the result.
  * Replaced direct calls to "fpc_sarint64" with inline nodes (in_sar_x_y), allowing target-specific optimizations to take place.

git-svn-id: trunk@25877 -
2013-10-28 15:55:13 +00:00
sergei
9ad98a2c4d * Handle "SarInt64" always as internal procedure, introduced virtual method tinlinenode.first_sar that by default converts it into call to "fpc_sarint64" unless target CPU is 64-bit. This provides a point to insert target-specific optimizations.
git-svn-id: trunk@25876 -
2013-10-28 14:31:36 +00:00
nickysn
611358be7e * fixed the stack traces (StackTop initialization) under go32v2 as well
git-svn-id: trunk@25875 -
2013-10-28 00:14:08 +00:00
nickysn
12b1e0cbfd + tell wlink to add dwarf debug info to the executable when -gw2/3/4 is used
git-svn-id: trunk@25874 -
2013-10-27 20:30:00 +00:00
nickysn
9f979eb5c6 * put the i8086-msdos dwarf debug sections in USE32 class=DWARF segments because
wlink wants them this way

git-svn-id: trunk@25873 -
2013-10-27 20:28:43 +00:00
nickysn
93a706f1a0 + allow smartlinking and dwarf debug info at the same time for i8086-msdos
git-svn-id: trunk@25872 -
2013-10-27 20:26:34 +00:00
nickysn
90a092e585 + added enum Tdwarf_addr with the values of DW_AT_address_class (to be used for
the i8086-msdos debug info)

git-svn-id: trunk@25871 -
2013-10-27 18:40:59 +00:00
Jonas Maebe
c693a91e18 * fixed compilation after r25847 (mantis #25237)
git-svn-id: trunk@25870 -
2013-10-27 17:35:04 +00:00
Jonas Maebe
353c15fb34 * fixed size of temporary register used to evaluate smallset<=/>=smallset
git-svn-id: trunk@25869 -
2013-10-27 17:34:59 +00:00
florian
17dcd2fa31 * get rid of unneeded 64 bit multiplications, it makes also for signed operations no difference if a calculation is carried out with 32 or 64 bit, if the result is casted to 32 bin again
git-svn-id: trunk@25868 -
2013-10-27 16:47:37 +00:00
florian
0eeb3e8d49 * check if the pointer is really assigned when trying to remove unneeded jumps
git-svn-id: trunk@25867 -
2013-10-27 16:47:34 +00:00
nickysn
e6a4435330 + support the aitconst_XXbit_unaligned const types in the NASM asm writer. This
fixes DWARF support when using NASM.

git-svn-id: trunk@25866 -
2013-10-27 15:21:30 +00:00
nickysn
af91346830 + added exeinfo to the implicitunits list in the makefile for i8086-msdos
git-svn-id: trunk@25865 -
2013-10-27 14:23:31 +00:00
paul
d16606b04c compiler: revert r25852 since 10.9 is already handled
git-svn-id: trunk@25864 -
2013-10-27 14:17:29 +00:00
nickysn
8066d12c87 * fixed the stack traces under i8086-msdos (StackTop wasn't initialized)
git-svn-id: trunk@25863 -
2013-10-27 13:53:16 +00:00
nickysn
28c16f31e6 * __stkbottom, __nearheap_start and __nearheap_end moved to the implementation
part of the system unit for i8086-msdos

git-svn-id: trunk@25862 -
2013-10-27 13:28:58 +00:00
nickysn
714ca3a61d * fixed the stack traces under linux (StackTop wasn't initialized)
git-svn-id: trunk@25861 -
2013-10-27 12:37:32 +00:00
nickysn
f23794bf39 * get_caller_frame for i8086 optimized for size
git-svn-id: trunk@25860 -
2013-10-27 12:01:29 +00:00
nickysn
7489bfb56b * fixed get_caller_addr returning the wrong segment in i8086 medium memory model
git-svn-id: trunk@25859 -
2013-10-27 11:36:45 +00:00
nickysn
4646884d87 + enabled compilation of unit ctypes for i8086-msdos
git-svn-id: trunk@25858 -
2013-10-26 22:26:42 +00:00
sergei
fbf6192aff * tmipsaddnode.second_addfloat: don't bother reusing locations, always allocate a new register for result.
git-svn-id: trunk@25857 -
2013-10-26 18:15:24 +00:00
sergei
dd472dbfb0 * MIPS: when converting int to real, use a floating point constant directly, instead of emulating it with integers. tai_real_64bit already handles all endian issues.
git-svn-id: trunk@25856 -
2013-10-26 18:12:25 +00:00
sergei
40239e8bcc * Elaborating removal of branches with delay slots: ignore reg. deallocations that are inserted by RA between branch and its delay slot instruction.
* Also skip possible ait_marker's between branch and its immediately following target (which was preventing certain optimizations of "exit" statements on all targets because procedure's exit label is always preceded by location marker).

git-svn-id: trunk@25855 -
2013-10-26 17:45:01 +00:00
nickysn
85c8be531a + added an asm implementation of FillWord for i8086 as well
git-svn-id: trunk@25854 -
2013-10-26 16:52:57 +00:00
florian
de2e4632c5 * if a build-id is generated, put it into flash
git-svn-id: trunk@25853 -
2013-10-26 14:19:14 +00:00
paul
43b9308929 compiler: also skip crt1.o for osx 10.9
git-svn-id: trunk@25852 -
2013-10-26 13:36:40 +00:00
Jonas Maebe
40eafc3d82 * don't try to post-process embedded executables when linking is
disabled

git-svn-id: trunk@25851 -
2013-10-26 10:01:05 +00:00
reiniero
94d207558d * fcl-db/tests: cosmetic: extended comments for dbf tests
git-svn-id: trunk@25850 -
2013-10-26 07:39:13 +00:00
nickysn
2f88ae82b1 + added an asm implementation of FillChar for i8086
git-svn-id: trunk@25849 -
2013-10-25 23:15:44 +00:00
svenbarth
c077adf499 Fix for Mantis #25132
defcmp.pas, objectdef_is_related:
  * use "equal_defs" instead of "=", as the former also handles equivalence of specializations

+ added test

git-svn-id: trunk@25848 -
2013-10-25 19:50:56 +00:00
svenbarth
798bb91e90 Extract tdef.is_related plus its overrides in tobjectdef, trecorddef and tstringdef into a new function def_is_related in unit defcmp.
defcmp.pas:
  + add new function "def_is_related" which combines the "is_related" overloads of "tobjectdef", "trecorddef" and "tstringdef" (it returns "false" for other def types which is what "tdef.is_related" did)
  * compare_defs_ext & compatible_childmethod_resultdef: change call from "x.is_related" to "def_is_related(x,...)"
symtype.pas, tdef:
  - remove "is_related" method
symdef.pas:
  - remove "is_related" in "tobjectdef", "trecorddef" and "tstringdef"
  * tobjectdef.needs_inittable: for checking whether a Corba interface somehow inherits from a IInterface don't use "is_related" anymore (we want to avoid the dependency after all), but mimic the necessary functionality of "def_is_related"
htypechk.pas, nadd.pas, ncal.pas, ncnv.pas, ngtcon.pas, nld.pas, optvirt.pas, pdecobj.pas, pdecvar.pas, pexpr.pas, pgenutil.pas:
  * change call from "x.is_related" to "def_is_related(x,...)"
symtable.pas
  + use unit defcmp
  * change call from "x.is_related" to "def_is_related(x,...)"
jvm/njvmcnv.pas, jvm/njvmflw.pas:
  * change call from "x.is_related" to "def_is_related(x,...)"

git-svn-id: trunk@25847 -
2013-10-25 19:44:27 +00:00
lacak
ebf70342c5 fcl-db: memds:
- add support for ftWord, ftFmtBCD field types
- fix memds for failed tests TestRequired (add call to inherited InternalPost), TestRecNo
- fix testing environment for memds

git-svn-id: trunk@25846 -
2013-10-25 12:46:00 +00:00
Jonas Maebe
b70e64dc67 * fixed some bugs in the camelCase conversion performed on the JVM target by
-CTlowercaseprocstart
   o convert all consecutive uppercase characters at the start to lowercase
     instead of only the first one. Exception: if there is more than one
     such character and the last one is followed by a lowercase character,
     assume the last uppercase character belongs to the second word (like
     in FPCIsGreat) and don't lowercase that one
 + test

git-svn-id: trunk@25845 -
2013-10-23 22:44:45 +00:00
svenbarth
76f6de5cf1 Refactor tobjectdef.find_implemented_interface out into unit defcmp so that the recently introduced cycle between symdef and defcmp can be broken again.
defcmp.pas:
  + add function "find_implemented_interface"
  * change method call of "find_implemented_interface" into function call
symdef.pas:
  - tobjectdef: remove method "find_implemented_interface"
  - remove use of unit "defcmp"
pgenutil.pas:
  * change method call of "find_implemented_interface" into function call
  + add use of unit "defcmp"
ncgcnv.pas, ncnv.pas, pdecobj.pas, pdecsub.pas, pdecvar.pas:
  * change method call of "find_implemented_interface" into function call

git-svn-id: trunk@25844 -
2013-10-23 19:05:00 +00:00
Jonas Maebe
555634b755 * (re)set upper bits of register when appropriate for all operations in
a_op_reg_reg() (except for NOT, which was already handled correctly)
    + test

git-svn-id: trunk@25840 -
2013-10-22 07:41:52 +00:00