Commit Graph

37353 Commits

Author SHA1 Message Date
Jonas Maebe
9e0184884e * correctly change the signdness information of tordconstnodes that are
simplified via typeconvnode (corrects resultdef of "qword(1) shl 33",
    mantis #22133)
  * simplify shl/shr nodes after their resultdef has been set, so the
    resultdef used during simplify is set (fixes same expression as above
    when it is calculated by an inline function)

git-svn-id: trunk@21394 -
2012-05-26 13:31:23 +00:00
Jonas Maebe
baa8fa39a8 * converted code to trash variables (-gt) to operate at the node tree level,
and also use this code to trash local variables in inlined routines
   o fixes mantis #22088
   o makes it possible to also implement it for the jvm target in the future

git-svn-id: trunk@21393 -
2012-05-26 11:32:39 +00:00
Jonas Maebe
f2c82e32cd - removed g_indirect_sym_load() from hlcgobj/hlcg2ll because this cgobj
method is only used anymore internally in cgobj.tcg and its descendants
  * made tcg.g_indirect_sym_load() protected to ensure it stays that way

git-svn-id: trunk@21392 -
2012-05-26 11:32:33 +00:00
Jonas Maebe
8234a842e6 * fixed conversion of empty ansistring/widestring constants to pchar on
the jvm target + test

git-svn-id: trunk@21391 -
2012-05-26 11:32:20 +00:00
michael
5aeb9c860d * Added FreeContentStream property to TResponse.
git-svn-id: trunk@21390 -
2012-05-26 10:41:54 +00:00
Jonas Maebe
11968c4261 * use A_J instead of A_B (without explicitly defined condition) to jump to
wrapped interface methods

git-svn-id: trunk@21389 -
2012-05-25 14:50:50 +00:00
marco
ced0992642 * extraction example by Reinier Olislagers. Mantis #21304
git-svn-id: trunk@21387 -
2012-05-24 19:26:22 +00:00
michael
032528115f * Patch from Mattias Gaertner to improve quicksort memory use (Bug 22119)
git-svn-id: trunk@21386 -
2012-05-24 19:18:44 +00:00
florian
21b94f675f + add for MLA the same register interferences as for MUL
* register interferences for MUL/MLA are only needed for less than ARMv6

git-svn-id: trunk@21385 -
2012-05-24 19:14:58 +00:00
marco
2d890ae0b3 * Some more interfaces (include IOleCOmmandTarget). Patch by Ludo.
Mantis #22109

git-svn-id: trunk@21384 -
2012-05-24 19:01:01 +00:00
sergei
bbb08bbf66 ogcoff.pas:
- removed empty destructor and checks for nil before .Free (they are done in tobject.free itself)
+ added COMDAT definitions.

git-svn-id: trunk@21383 -
2012-05-24 16:34:13 +00:00
Jonas Maebe
3c6c4dff30 * fixed assembler code that was enabled in r20968 (push/pop changed ebx
and edi)

git-svn-id: trunk@21382 -
2012-05-24 15:34:33 +00:00
Jonas Maebe
ffe68ca284 * do not search overloaded assignment/conversion operators for internal
type conversions (those should always re-interpret the raw bits),
    except for variants (because those are sometimes generated internally)
    -- done so that -gt code at the node tree level can insert explicit
    typecasts to integer types without triggering overloaded explicit
    typecast operators such as in tests/test/terecs14

git-svn-id: trunk@21381 -
2012-05-24 15:34:27 +00:00
Jonas Maebe
0037de6ac9 * disable range/overflow checking for subsetreg/ref code, to prevent
spurious errors when calculating masks (was also the case for the old
    code in cgobj)

git-svn-id: trunk@21380 -
2012-05-24 15:33:49 +00:00
joost
4bbaeeccc6 * Reinstated the thest that was removed in r21365. Better not replace tests with
new ones, but add new tests

git-svn-id: trunk@21376 -
2012-05-24 09:16:38 +00:00
florian
638d0d49c0 + take advantage of the mla instruction when calculating array offsets
git-svn-id: trunk@21375 -
2012-05-23 20:48:26 +00:00
sergei
71c8b9cf8a * ogelf.pas: cleaned up code that creates default sections.
git-svn-id: trunk@21374 -
2012-05-23 14:21:44 +00:00
marco
283ed5971a * Fixed gotcha in r21364. SQL Null instead of nil. Mantis #22108 by Ludo
git-svn-id: trunk@21373 -
2012-05-23 12:37:02 +00:00
pierre
de9d8f2880 Regenerated after: Add x86_64 cpu specific units
git-svn-id: trunk@21372 -
2012-05-23 09:16:57 +00:00
pierre
7a9f1556e2 Add x86_64 cpu specific units
git-svn-id: trunk@21371 -
2012-05-23 09:13:06 +00:00
pierre
312c6bb7f8 x86_64 subdirectory added
git-svn-id: trunk@21370 -
2012-05-23 09:09:46 +00:00
pierre
5aaf3b797e Regenerated after: Add missing x86_64 specific cpu unit dependency on sysutils
git-svn-id: trunk@21369 -
2012-05-23 08:54:54 +00:00
pierre
f6231e154f Add missing x86_64 specific cpu unit dependency on sysutils
git-svn-id: trunk@21368 -
2012-05-23 08:54:26 +00:00
pierre
1ca3b765ec Regenerated after: Add x86_64 specific units
git-svn-id: trunk@21367 -
2012-05-23 08:49:24 +00:00
pierre
d99aeffbe4 Add x86_64 specific units
git-svn-id: trunk@21366 -
2012-05-23 08:48:57 +00:00
marco
9e5316afd1 * Patch from Mantis #22105 by Lacak2 that improves oldvalue testing.
git-svn-id: trunk@21365 -
2012-05-23 06:49:49 +00:00
marco
283b37139f * Patch from Ludo Brands implementing TCustomBufdataset.lookup
Mantis #22099

git-svn-id: trunk@21364 -
2012-05-23 04:57:36 +00:00
florian
c75486db89 * patch by Nico Erfurth:
Reorder unaligned Load sequence on ARM

The old version produced code like that:

ldrb rDEST, [rBASE]
ldrb rTemp, [rBASE, #1]
orr  rDEST, rDEST, rTEMP lsl #8 (2 stall cycles)
ldrb rTemp, [rBASE, #2]
orr  rDEST, rDEST, rTEMP lsl #16 (2 stall cycles)
ldrb rTemp, [rBASE, #3]
orr  rDEST, rDEST, rTEMP lsl #24 (2 stall cycles)

This creates a lot of stall-cycles on ARM Implementations with load
delay slots like Marvel Kirkwood or Intel XScale. With the usual up to 2
stall-cycles this code requires a total of 13 cycles (7 instructions + 6 stall
cycles) in best case.

The new code uses a second temp register to avoid the stall cycles.

ldrb rDEST, [rBASE]
ldrb rTemp1, [rBASE, #1]
ldrb rTemp2, [rBASE, #2]
orr  rDEST, rDEST, rTEMP1 lsl #8
ldrb rTemp1, [rBASE, #3]
orr  rDEST, rDEST, rTEMP2 lsl #16
orr  rDEST, rDEST, rTEMP1 lsl #24 (1 stall cycle)

The rescheduling and second register bring the total cycles down to 8.
If a later rescheduling should happen for the last orr it even can go
down to 7.

git-svn-id: trunk@21363 -
2012-05-22 19:09:20 +00:00
sergei
dc03282cb7 + Support assembling expressions ".long L2-L1" where label L1 belongs to the current objsection and L2 comes from any objsection. This is done using relative relocations and is compatible with GNU AS.
* Also fixed ogcoff.pas to handle these relative relocations correctly.

git-svn-id: trunk@21362 -
2012-05-22 14:59:24 +00:00
svenbarth
dbc410de63 Allow the usage of a generic's name without type arguments inside of nested classes inside the generic. This fixes Mantis #19499, but also Mantis #18688.
* symtable.pas:
    + add function "get_generic_in_hierarchy_by_name" which returns a def with the name of the symbol in the given object/record hierarchy (useful only in non-Delphi modes)
    + add function "return_specialization_of_generic" which returns the specialization def of a given class inside the given object/record hierarchy
* pexpr.pas, factor, factor_read_id: instead of checking whether the names of the found symbol and the current_structdef are equal, check whether the generic appears in hierarchy of current_structdef
* ptype.pas:
    * id_type: check whether the found symbol is a generic dummy and we are currently parsing a generic then return the correct def of the generic instead of the dummy one
    * single_type: when using the generic type without type parameters the def must resolve to the specialized def when specializing the class instead of the generic def which the dummy symbol points to
    * read_named_type, expr_type: like in "single_type" we need to resolve the use of the parameterless type name to the correct specialization def instead of the generic def
* pdecobj.pas, object_dec: also set the typesym of the current_structdef as otherwise some assumptions about generics with the above mentioned changes aren't valid anymore (like the def the typesym is unset again afterwards)
+ add tests for both bug reports (the one for 19499 is slightly modified so that it does not contain any errors)

git-svn-id: trunk@21361 -
2012-05-22 12:19:11 +00:00
Jonas Maebe
1ec48299cf * allow default() on Objective-C classes and protocols: the compiler already
allows it, and they're plain pointer-based types -> nil is fine

git-svn-id: trunk@21360 -
2012-05-22 11:07:05 +00:00
marco
0757517dde * more removal of deprecated functions (deprecated before 2.4.0)
old copies of routines in dos, and some shortstring shorthands for fsplit.

git-svn-id: trunk@21359 -
2012-05-22 08:04:24 +00:00
marco
043ff2c81c * more deprecations. Copies of stringtypes usually defined in unit dos, but
that are no longer needed.

git-svn-id: trunk@21358 -
2012-05-22 08:00:36 +00:00
Jonas Maebe
959efe1f54 * CTFrameSetter.pas -> CTFramesetter.pas (fixes installation on
case-sensitive file systems, mantis #22094)

git-svn-id: trunk@21356 -
2012-05-21 13:50:36 +00:00
Jonas Maebe
9b21c6c84d * abort if the specified destination file is a directory (mantis #22089)
git-svn-id: trunk@21355 -
2012-05-21 11:37:41 +00:00
Jonas Maebe
9bfb8b5d48 * fixed (currently harmless) error in r21287 that specified that the full
contents of a procvar had to be loaded in case of a procedure of object
    or nested procvar rather than only the code address (harmless, because
    this code is only active for low level targets currently and since
    r21330 the location's size was used because the source and destination
    types were the same)

git-svn-id: trunk@21352 -
2012-05-20 21:11:45 +00:00
florian
5f0bcd9248 * patch by Nico Erfurth:
Optimize ARM OP_MUL/OP_IMUL for x*ispowerof2(const+1) cases

Calculations like a*7 can be optimized to a*8-a with the usage of RSB and left
shifts which can be done in a single cycle.

git-svn-id: trunk@21351 -
2012-05-20 20:50:04 +00:00
Jonas Maebe
78bb3e323a * fixed source type information for values loaded in arrayconstructor after
r21069

git-svn-id: trunk@21350 -
2012-05-20 20:34:14 +00:00
florian
21573f50c5 * allow LOC_CONSTANT to be used as vmt pointers in the cg, resolves #21914
git-svn-id: trunk@21349 -
2012-05-20 19:02:36 +00:00
pierre
02f8739bca Fix win32 compilation
git-svn-id: trunk@21346 -
2012-05-20 17:03:01 +00:00
Jonas Maebe
7dbfd9dc81 * don't say a config file is empty if it only contains #define, #undef,
#write and/or #include statements (mantis #20504)

git-svn-id: trunk@21345 -
2012-05-20 15:00:53 +00:00
Jonas Maebe
eb7e192226 * support pointer constants as initialisation values for procvar typed
constants in Delphi mode on non-treetypedconstbuilder platforms
    (mantis #21267)

git-svn-id: trunk@21344 -
2012-05-20 14:51:15 +00:00
Jonas Maebe
c27f9da1b2 * always surround ld link.res SEARCH_DIR() arguments with double quotes,
rather than with single/double quotes depending on the target platform
    (ld only supports double quotes), and rather than only quoting when
    necessary (wastes time since quotes are always allowed, and double
    quotes inside a directory name cannot be escaped for ld; they are
    simply not supported by the program) (mantis #22059, follow-up to
    r21069 and r21208)

git-svn-id: trunk@21343 -
2012-05-20 13:30:51 +00:00
Jonas Maebe
ccf895af5a * link.res is a real linkerscript when we target binutils, not when we
target the AIX linker
  * never quote file names added to link.res when it's not a linkerscript
    (only newline is a separator in the case)

git-svn-id: trunk@21342 -
2012-05-20 13:30:42 +00:00
marco
90adaeb652 * routine to transform result of fpsystem to old "shell" convention added.
git-svn-id: trunk@21341 -
2012-05-20 11:29:22 +00:00
marco
a7ee1899bc * Patch from Mark Morgan Lloyd to add subcommands to ltelnet. Mantis #22032
git-svn-id: trunk@21340 -
2012-05-19 22:12:45 +00:00
florian
1294ea4357 * patches by Max Nazhalov to solve some issues with currency formatting, resolves #18704 and #22063
git-svn-id: trunk@21339 -
2012-05-19 14:54:46 +00:00
Jonas Maebe
4a730bd053 * fixed source type for location_force_register() when loading second
parameter of inc/dec into a register

git-svn-id: trunk@21338 -
2012-05-19 14:39:29 +00:00
Jonas Maebe
9d860904fe * merged AIX changes from ncgutil.gen_proc_symbol_end() into
hlcgobj.gen_proc_symbol_end() and removed the routine from ncgutil (it's
    not used anymore)

git-svn-id: trunk@21337 -
2012-05-19 14:39:12 +00:00
marco
725a280059 * sleeper vfork code copied from deleted parts so it is not lost, made
shortstring version call the ansistring one.

git-svn-id: trunk@21336 -
2012-05-19 14:03:20 +00:00