sergei
9b9ea15d68
+ m68k: initial implementation of do_spill_replace (supports only MOVE instructions for now). Tested with qemu for Coldfire target.
...
git-svn-id: trunk@28274 -
2014-07-30 01:20:59 +00:00
Károly Balogh
1a4d6d79c5
new division helpers for ARM by Nico Erfurth. on our ARMv5 core hardware they're 22%-36% faster than the generic ones for the most common case.
...
git-svn-id: trunk@28273 -
2014-07-29 17:39:55 +00:00
marco
968ddb6ad9
* add two implicit units, mantis #26533
...
git-svn-id: trunk@28272 -
2014-07-28 14:40:07 +00:00
nickysn
235a37fad4
* moved the pass_1 handling of vecnodes for arraydefs to a new virtual method
...
tvecnode.first_arraydef. This will allow overriding it in the i8086 code
generator in order to handle huge arrays.
git-svn-id: trunk@28271 -
2014-07-26 16:18:57 +00:00
nickysn
36d63b953e
+ added an i8086 specific boolean property is_huge to the tarraydef. For now it
...
will only be used for indexing huge pointers (i.e. only huge arrays with the
ado_IsConvertedPointer array option will be supported). In the distant future,
regular huge arrays may be supported as well (but that would require
substantially more work, including adding hugeness support to other structures
such as records, objects and classes, so I'm not planning on doing it anytime
soon).
git-svn-id: trunk@28270 -
2014-07-26 13:27:46 +00:00
nickysn
4b1e5f1c9a
* in the vecnode, when indexing a pointer[], convert right to
...
tpointerdef.pointer_arithmetic_int_type instead of sinttype
git-svn-id: trunk@28269 -
2014-07-26 12:24:50 +00:00
nickysn
e6c5c35d65
* tarraydef.create_from_pointer changed to require the actual pointerdef as a
...
parameter, instead of the element def. This will allow e.g. creating huge
arrays from huge pointers on i8086.
git-svn-id: trunk@28268 -
2014-07-26 10:39:18 +00:00
svenbarth
d46ae01589
Fix inlining of record methods across units if the unit with the method definitions is already compiled.
...
symdef.pas:
+ tabstractrecorddef: implement buildderefimpl and derefimpl which works on the symtable (especially derefimpl is important here)
- trecorddef & tobjectdef: remove buildderefimpl; it's already handled by the tabstractrecorddef one now
- tobjectdef: remove the part of derefimpl that's already handled by tabstractrecorddef
git-svn-id: trunk@28267 -
2014-07-25 22:01:23 +00:00
sergei
0d96963459
* Do not promote integer comparison operations to native size if one side is a constant and its value is within range of opposite side. Instead, cast the constant to type of the opposite side.
...
Comparisons are already not promoted if sides are equally signed, but this wasn't true for "unsigned vs constant" case, because constants are preferably parsed as signed.
The change considerably improves generated code for i386 and even more considerably for m68k. Tested on i386-win32.
git-svn-id: trunk@28266 -
2014-07-25 21:40:22 +00:00
sergei
a0934e897e
* i386: improvements to 64-bit comparison code, also serves as a good base for m68k target:
...
* Better handling of LOC_CREGISTER locations.
+ Support direct compares of constants with references.
+ Optimize away comparison of low dword when its result is constant (cases of "less" and "greater or equal" comparing against a constant with zero low dword).
git-svn-id: trunk@28263 -
2014-07-25 13:21:44 +00:00
Károly Balogh
88b58c3580
i386: added signed 64bit div/mod helpers in assembly. we have some 64bit heavy code where a direct helper results in about 8-10% of performance advantage compared to going through the generic wrapper + the unsigned function
...
git-svn-id: trunk@28261 -
2014-07-24 21:06:23 +00:00
sergei
bd5ce35130
* m68k: completely replaced 64-bit comparison code with a clone of i386 implementation. No optimizations yet, but it already makes system unit about 300 instructions shorter due to changing node location to LOC_JUMP.
...
* Cleaned up 32-bit comparison code and implemented one of the optimizations (TST instruction for comparison with constant zero which can act directly on references). This makes system unit shorter by about 1000 instructions.
git-svn-id: trunk@28260 -
2014-07-24 19:44:41 +00:00
nickysn
86726a5dc8
* return ptrsinttype instead of sinttype in pointerdef.pointer_arithmetic_int_type
...
git-svn-id: trunk@28259 -
2014-07-24 15:17:15 +00:00
nickysn
33dac14554
* defutil.get_int_type_for_pointer_arithmetic replaced with a virtual method
...
tpointerdef.pointer_arithmetic_int_type
git-svn-id: trunk@28258 -
2014-07-24 14:18:57 +00:00
nickysn
bb48761652
* taddnode.pass_typecheck_internal: always pass a tpointerdef to
...
get_int_type_for_pointer_arithmetic, even when adding a zero-based array with
a number
git-svn-id: trunk@28257 -
2014-07-24 13:28:19 +00:00
sergei
dac52f503c
* m68k: fixed extension in a_load_ref_reg. Existing code cleans only bits 16-31 when loading a 8-bit register from 16-bit reference, and leaves garbage in bits 8-15.
...
git-svn-id: trunk@28256 -
2014-07-24 12:17:29 +00:00
sergei
4d73dd4977
* Report all failed cases instead of halting at the first failure.
...
git-svn-id: trunk@28255 -
2014-07-24 12:05:33 +00:00
sergei
a61321b4bd
* m68k "rts" instruction has code $4e75 ($4e74 is "rtd" which is wrong here)
...
git-svn-id: trunk@28254 -
2014-07-24 12:03:34 +00:00
sergei
4e9500fee8
* Extended the test for m68k.
...
git-svn-id: trunk@28253 -
2014-07-23 19:34:15 +00:00
Jonas Maebe
5836478bce
* add alignment for .lcomm data in AIX, required for int64 data put in bss
...
in case it's passed to interlocked* (requires 8 byte alignment, default
is 4). Supported in AIX 5.3 and later
(http://www-01.ibm.com/support/docview.wss?uid=isg1IY90802 ) and
GNU binutils 2.24 or later
git-svn-id: trunk@28252 -
2014-07-23 14:06:09 +00:00
Jonas Maebe
2c7a1b4e91
* fixed optimisation from r25067 for the generic case where a signed value
...
is converted to a larger unsigned value (e.g. OS_S16 -> OS_32)
git-svn-id: trunk@28251 -
2014-07-23 14:06:06 +00:00
Jonas Maebe
d5895a4d98
- removed ppc-specific a_load_const_cgpara: not necessary, and in fact wrong
...
in case the para location size is larger than the source size
git-svn-id: trunk@28250 -
2014-07-23 14:06:03 +00:00
sergei
ad2963783e
* m68k-linux startup code:
...
+ initialize __stkptr variable (was missing, causing any stack check to fail)
+ non-executable stack marker.
git-svn-id: trunk@28249 -
2014-07-23 13:55:38 +00:00
nickysn
9a569b9e57
* use P/TTinyHeapMemBlockSize in RegisterTinyHeapBlock as well
...
git-svn-id: trunk@28248 -
2014-07-22 12:51:20 +00:00
nickysn
6f8a329b4c
* use pointer arithmetic for doing address calculations, with a newly introduced
...
pointer type TTinyHeapPointerArithmeticType, instead of using ptruint. This
will allow us to use a huge pointer in i8086 far data memory models, in order
to allow the heap to exceed 64k.
git-svn-id: trunk@28247 -
2014-07-21 23:02:49 +00:00
nickysn
3b9ab33910
* added type TTinyHeapFreeBlockSize, which holds the size of a free memory block
...
in the tiny heap
git-svn-id: trunk@28246 -
2014-07-21 17:05:52 +00:00
nickysn
1dc09538d0
* introduce a type TTinyHeapMemBlockSize, which holds the size of an allocated
...
memory block in the tiny heap
git-svn-id: trunk@28245 -
2014-07-20 16:31:40 +00:00
svenbarth
856ae9d3cf
Fix for Mantis #26482 .
...
pgenutil.pas, generate_specialization:
* also search for the generic type in general if it was previously found in a record/class as there might be a non-generic type (or one with a different number of parameters) defined elsewhere
+ added test
git-svn-id: trunk@28244 -
2014-07-20 15:47:18 +00:00
marco
f0f628798b
* fixes from José Mejuto, mantis #26352 generating a parameter if the tlb says the param is there but the string is empty in the tlb + small cleanups
...
git-svn-id: trunk@28243 -
2014-07-20 14:49:37 +00:00
svenbarth
f1bfb398e4
Fix for Mantis #26456 .
...
symtable.pas, searchsym_in_helper:
* check whether extendeddef is assigned as this function is called when parsing the extended type and it was not found (the second pass is to display a more accurate error message and was added some weeks ago)
+ added test
git-svn-id: trunk@28242 -
2014-07-20 13:40:01 +00:00
marco
2fdb701f9a
* fix for compilation breakage due to windows header fix. (reported by Reinier on ML)
...
git-svn-id: trunk@28241 -
2014-07-20 10:53:25 +00:00
marco
a4a11cb149
* startupinfo was declared with lpTstr. splitted in the usual A/W/- variants
...
git-svn-id: trunk@28240 -
2014-07-19 22:22:49 +00:00
nickysn
84a18e57bc
+ added test for the error checking for nil-number; tests already exist for
...
nil+number and number+nil, so this was the only one missing
git-svn-id: trunk@28235 -
2014-07-18 12:09:27 +00:00
Jonas Maebe
4ff597afae
* call "message" rather than "cgmessage" when throwing fatal errors, because
...
cgmessage won't do anything in case cgerror is already set (and in several
places we assume that the compiler will immediately abort after throwing a
fatal error)
git-svn-id: trunk@28229 -
2014-07-18 09:09:21 +00:00
Jonas Maebe
9e29fd424d
* changed the "laststatement" parameter of internalstatements() from "var"
...
to "out"
git-svn-id: trunk@28228 -
2014-07-18 09:09:16 +00:00
Jonas Maebe
627c83e828
* when creating a bare procdef copy, don't copy the funcret parameter.
...
This is useful if you want to change the calling convention of the copy.
o call insert_funcret_para() after creating a bare copy
* don't copy aliasnames of copied procdefs either (can at best result
in duplicate symbol errors)
git-svn-id: trunk@28227 -
2014-07-18 09:09:11 +00:00
Jonas Maebe
256f2fcf69
* fixed finish_copied_procdef() in case newstruct is nil after support for
...
generics was added to it
git-svn-id: trunk@28226 -
2014-07-18 09:09:03 +00:00
nickysn
6d54046300
* output a proper error message in case number+nil is encountered (just like
...
it's already done for nil+number and nil-number)
git-svn-id: trunk@28225 -
2014-07-15 22:26:58 +00:00
reiniero
0cb92962e3
* fcld-db: oracle: cosmetic
...
git-svn-id: trunk@28224 -
2014-07-15 11:35:29 +00:00
reiniero
0ebd33180e
* fcl-db: oracle connection: speed up getting indexes in TOracleConnection.UpdateIndexDefs; issue #25247
...
git-svn-id: trunk@28223 -
2014-07-15 11:28:07 +00:00
reiniero
cc90409dc9
* fcl-db: cosmetic: Oracle connection description/copyright
...
git-svn-id: trunk@28222 -
2014-07-15 11:13:40 +00:00
marco
9c5e150965
* patch from #26485 , haiku builds character units (and dependencies)
...
git-svn-id: trunk@28221 -
2014-07-15 10:27:22 +00:00
nickysn
9b3d41d9c7
* the default value of tpointerdef.pointer_subtraction_result_type changed to
...
ptrsinttype
git-svn-id: trunk@28220 -
2014-07-15 06:51:56 +00:00
nickysn
d86a8ebc99
* defutil.get_int_result_type_from_pointer_subtraction moved to a virtual
...
method tpointerdef.pointer_subtraction_result_type
git-svn-id: trunk@28219 -
2014-07-14 23:30:29 +00:00
nickysn
99c555cea8
+ implemented huge pointer subtraction
...
* the result of far pointer subtraction changed to word (for TP7 compatibility)
git-svn-id: trunk@28218 -
2014-07-13 23:40:43 +00:00
nickysn
200df7a136
* set expectloc correctly for far pointer comparison as well
...
git-svn-id: trunk@28217 -
2014-07-13 16:25:20 +00:00
nickysn
04234c733f
* set expectloc correctly (LOC_JUMP instead of LOC_FLAGS) for non-normalized
...
huge pointer comparison
git-svn-id: trunk@28216 -
2014-07-13 15:20:58 +00:00
nickysn
6770301fe7
+ added a normalized huge pointer comparison test
...
git-svn-id: trunk@28215 -
2014-07-13 13:07:01 +00:00
nickysn
5818451bb5
* non-normalized huge pointer comparison made unsigned
...
git-svn-id: trunk@28214 -
2014-07-13 12:54:12 +00:00
nickysn
ba1ee49b64
+ added non-normalized huge pointer comparison test
...
git-svn-id: trunk@28213 -
2014-07-13 12:39:24 +00:00