Commit Graph

38091 Commits

Author SHA1 Message Date
florian
371ef7bada * cover more cases in AlignedToQWord
git-svn-id: trunk@22060 -
2012-08-11 15:11:43 +00:00
florian
db7e029574 * strd/ldrd optimization might be only done on dword operations
git-svn-id: trunk@22059 -
2012-08-11 15:11:10 +00:00
florian
8c45a909be + support ldr/ldr -> ldrd and str/str -> strd optimization where appliable
git-svn-id: trunk@22058 -
2012-08-11 11:45:54 +00:00
florian
49246b6263 * make textrec/filerec unpacked, this improves the code significantly on arm etc.
git-svn-id: trunk@22057 -
2012-08-10 21:17:50 +00:00
florian
2c122a9bf6 * inherit modification flag from load nodes when creating temp nodes when inlining, dfa/cse need this information
git-svn-id: trunk@22056 -
2012-08-10 21:16:54 +00:00
florian
aadf6da14f * better naming of CPU flag strings
git-svn-id: trunk@22055 -
2012-08-09 20:32:18 +00:00
florian
1c2ed53735 * updated comments to reflect latest changes to cse
git-svn-id: trunk@22054 -
2012-08-09 20:18:04 +00:00
michael
a43d433081 * Fixed to take expressions into account
git-svn-id: trunk@22053 -
2012-08-09 19:31:36 +00:00
michael
647bd0ec1c * Case statement tests
git-svn-id: trunk@22052 -
2012-08-09 19:24:37 +00:00
michael
e4758e3cd1 * Case statement labels are now expressions
git-svn-id: trunk@22051 -
2012-08-09 19:24:02 +00:00
florian
4d86d25c6c * -O4 switch for optimizations which are correct but which might have unexpected effects
like field reordering (possible problems cracker classes) or using ebp as normal register (broken
      stack traces from dump_stack)
    + niln is also valid in a cse domain
    * parameters passed by reference shall have a complexity >1
    * load nodes from outer scopes shall have a complexity >1
    * better cse debugging
    + more node types added to cse
    * consider parameters passed by reference in cse
    * take care of cse in parameters in simple cases

git-svn-id: trunk@22050 -
2012-08-09 18:58:54 +00:00
sergei
95535ea845 - Do not create any default object sections. On targets with section-based smartlink these sections remain empty and only cause linker to do useless job of removing them. The same happens when loading object files because duplicate section names are allowed at that time. On targets without smartlink they don't stay empty, but the internal assembler creates sections when required, so not creating initial sections effectively doesn't change anything.
git-svn-id: trunk@22049 -
2012-08-09 17:12:39 +00:00
sergei
393f1d58ed * Fixed register rsi being overwritten. It is used to pass argc into libc_start_main.
git-svn-id: trunk@22043 -
2012-08-09 07:34:49 +00:00
sergei
12dc48afbf * Set errno using a call to seterrno, like it is done for i386 target. This removes most of assembler code together with PIC hacks and makes this part independent of threadvar implementation details.
git-svn-id: trunk@22042 -
2012-08-09 06:34:00 +00:00
florian
03071709a9 * the transformation (a or/and b) or/and c into a or/and (b or/and c) can be applied for booleans as well
git-svn-id: trunk@22041 -
2012-08-08 21:21:45 +00:00
florian
b330bba0bc + introduce -Oofastmath
* limit the application of the tree transformation introduced in r21986 to safe cases and -Oofastmath

git-svn-id: trunk@22040 -
2012-08-08 19:35:45 +00:00
florian
8fd84376d7 * msg files regenerated
git-svn-id: trunk@22039 -
2012-08-08 19:26:36 +00:00
florian
2fc350eabd * the reference counter offset depends only on the current rtl, not the compiler version, so no ifdef needed
git-svn-id: trunk@22038 -
2012-08-08 18:59:19 +00:00
florian
fb7f25f410 * removed wrong -N switch (switch is not used) description
git-svn-id: trunk@22037 -
2012-08-08 17:02:05 +00:00
florian
ecdec2e431 * disable reg. allocator optimization introduced in r21812 for now because it caused some trouble, see #22405
git-svn-id: trunk@22036 -
2012-08-08 16:29:03 +00:00
masta
51af7bd440 Assembly version of fpc_ansistr_incr_ref for ARM
Optimized to minimize load latency and icache usage. Together with the
previous fpc_ansistr_decr_ref optimization this little test programm
runs about 40% faster.

  program stringspeed;

  procedure test(s:string);
  begin
  end;

  var
    s:string;
    i: cardinal;
  begin
    s:='abcd';
    for i:=0 to $FFFFFF do
      test(s);
  end.

Even with s:='' it's about 30% faster.

git-svn-id: trunk@22035 -
2012-08-08 15:29:26 +00:00
masta
b9770519f8 Assembly version of fpc_ansistr_decr_ref for ARM
As fpc_ansistr_decr_ref is a very often called procedure in typical
pascal programs this optimized version will shave off some cycles
compared to the generic one.

It tries to avoid load latencies as much as possible and also uses the
new Z-flag functionality of the InterlockedDecrement from the previous
patch. Also FreeMem is called as a tail-function.

git-svn-id: trunk@22034 -
2012-08-08 06:44:31 +00:00
masta
25e2f5f3fa Small improvement to InterlockedExchange on ARM
Use movs instead of mov when setting the result in r0. This way the Z
flag will be set for the calling function which might allow some smaller
optimizations later on. It does not affect current code in any way,
because flags are not expected to be used across function calls.

git-svn-id: trunk@22033 -
2012-08-08 06:44:26 +00:00
masta
aa21845cd9 Small optimization for OP_AND on ARM
Especially with 64bit operators the CG sometimes generates:
and r0, r1, #0
Which just clears r0 and is equivalent with
mov r0, #0

git-svn-id: trunk@22032 -
2012-08-08 06:44:20 +00:00
michael
8ed3408527 * with statement tests
git-svn-id: trunk@22031 -
2012-08-07 21:16:19 +00:00
michael
874a1f4304 * Use expressions in with statement
git-svn-id: trunk@22030 -
2012-08-07 21:16:01 +00:00
michael
5a57943320 * Tests for loop structures
git-svn-id: trunk@22029 -
2012-08-07 20:58:03 +00:00
michael
e1dead6a1c Conditions in for/while/repeat are now expression elements
git-svn-id: trunk@22028 -
2012-08-07 20:57:35 +00:00
florian
7513291ad8 * generate different code for OS_S8 -> OS_16 conversion which might fold better, idea by Nico Erfurth
git-svn-id: trunk@22027 -
2012-08-07 19:36:46 +00:00
Jonas Maebe
4d31fbc31d * also allow conversion of niln to forward-defined pointerdef
(mantis #22593)

git-svn-id: trunk@22026 -
2012-08-07 11:23:00 +00:00
Jonas Maebe
a63a603cc1 * allow conversion from niln to not-yet-fully-resolved classrefdefs
(mantis #22593)

git-svn-id: trunk@22025 -
2012-08-07 09:56:08 +00:00
masta
6529307d9e Don't emit useless AND/BICs in ARM CG
In certain cases the CG would emit something like
bic r1, r0, #0
As BIC is clearing the specified bits this is equivalent to
mov r1, r0
This patch changes the CG to emit the mov instead which the register
allocator will hopefully remove most of the time.

git-svn-id: trunk@22024 -
2012-08-07 06:46:45 +00:00
masta
9e039936bf Support more operators in FoldShiftProcess on ARM
Now we can also fold shifts into teq, tst, cmp, cmn instructions.

git-svn-id: trunk@22023 -
2012-08-07 06:46:32 +00:00
florian
b20c4cfe87 * replace is_written by using actualtargetnode
git-svn-id: trunk@22022 -
2012-08-06 20:26:23 +00:00
Jonas Maebe
aad3ce960a * give an error when trying to give a parameter of a non-simple type a
default value (mantis #22343)
  * give an error when specifying an invalid default value (e.g. a
    floating point number for a longint parameter)

git-svn-id: trunk@22021 -
2012-08-06 20:13:20 +00:00
Jonas Maebe
ebda98deec * give (w)string tconstsyms a def, so all constsyms always have a def
git-svn-id: trunk@22020 -
2012-08-06 20:13:15 +00:00
Jonas Maebe
be2c757aad * don't crash in getarraydef/getpointerdef if localsymtable is still nil
git-svn-id: trunk@22019 -
2012-08-06 20:13:11 +00:00
Jonas Maebe
c25d9d5e06 * do not search for overloaded operators while parsing constant declarations,
since they require function calls and it's not possible to call functions
    inside constant blocks (and because current_procinfo is not necessarily
    valid when a constant block is parsed, this moreover crashes the compiler)

git-svn-id: trunk@22018 -
2012-08-06 20:13:06 +00:00
florian
405a80066e + cse across assignment operator fixed and enabled
git-svn-id: trunk@22017 -
2012-08-05 20:37:18 +00:00
florian
f619a1aaf6 * fld/fst can have a base register+offset
git-svn-id: trunk@22016 -
2012-08-05 18:34:13 +00:00
florian
df01717c38 * mov x, %treg; mov %treg, y might be only optimized if y does not use treg
git-svn-id: trunk@22015 -
2012-08-05 17:48:28 +00:00
Jonas Maebe
3c1b82f9a0 * don't add value transformations for internal type casts from/to currency
(mantis #22561)

git-svn-id: trunk@22014 -
2012-08-05 15:36:44 +00:00
florian
e81ba0f82e + make use of the armv6+ sign/zero extension instructions if appropriate
git-svn-id: trunk@22013 -
2012-08-05 14:04:11 +00:00
florian
eb1efdff8a + introduce cstylearrayofconst because pocall_mwcall was forgotten at several places
git-svn-id: trunk@22012 -
2012-08-05 08:48:23 +00:00
florian
ad3aa937d3 * respect Dontlinkstdlibpath when adding a default library search path
git-svn-id: trunk@22011 -
2012-08-04 17:29:07 +00:00
florian
19ed835f2b * don't generate an extra indirection when loading vfp constants
git-svn-id: trunk@22010 -
2012-08-04 17:01:57 +00:00
masta
8a684c1f10 Don't generate IT instruction in second_cmp64bit for Thumb-2
Currently the register spiller can not handle the "bond" between IT* and
a following instruction, sometimes breaking them apart, which breaks the
build or worse the result.

So for now we're not emitting A_IT* in second_cmp64bit anymore but use a
conditional jump instead.

This fixes Mantis #22520

git-svn-id: trunk@22009 -
2012-08-04 16:55:58 +00:00
florian
49b03ea350 * readme updated
git-svn-id: trunk@22008 -
2012-08-04 09:50:13 +00:00
florian
89980e21f3 + binary objects for armhf
git-svn-id: trunk@22007 -
2012-08-04 09:47:37 +00:00
michael
2889f22b40 * IF condition expression is now a real expression, not a string
git-svn-id: trunk@22006 -
2012-08-04 09:16:54 +00:00