Commit Graph

43877 Commits

Author SHA1 Message Date
nickysn
dfcbe03572 + added x86-specific function getx86pointerdef, similar to getpointerdef, but
allows creating the x86 special pointer types as well

git-svn-id: trunk@28329 -
2014-08-07 08:50:01 +00:00
nickysn
4ea551a0f7 * is_farpointer and is_hugepointer moved from defutil to symcpu
git-svn-id: trunk@28328 -
2014-08-06 20:32:41 +00:00
Károly Balogh
3c8b24eead a proposed fix to the qword_to_float64 problem
git-svn-id: trunk@28318 -
2014-08-06 15:14:52 +00:00
masta
b898b169d4 Fixed 0-cmp optimization in tarmaddnode.second_cmp64bit
Commit r28315 prevented "= 0" compare-optimizations. Should be fixed now.

git-svn-id: trunk@28317 -
2014-08-06 15:01:24 +00:00
Károly Balogh
baac5114a7 added a missing comment from the SoftFPU C source. probably explains why qword_to_float64 fails with values which have the uppermost bit set
git-svn-id: trunk@28316 -
2014-08-06 14:11:09 +00:00
masta
c88fdb6a4a Add minor optimization for int64 < 0 on arm
This is a very common construct in normal code and also heavily used in
softfpu code.

The ARM-cg will now just test for the MSB of reghi to be set, instead of
a full comparison against constant 0.

git-svn-id: trunk@28315 -
2014-08-05 21:31:20 +00:00
reiniero
bd37d804fc * fcl-db: cosmetic
git-svn-id: trunk@28314 -
2014-08-05 10:30:23 +00:00
Károly Balogh
6e27aaebbb libndsfpc: regenerated Makefile with -Tall, which is required
git-svn-id: trunk@28313 -
2014-08-05 07:34:25 +00:00
sergei
0dea20d8e7 * softfloat: Fixed int64->double and qword->double conversions to take rounding mode into account (actually, brought them up to date with Softfloat-2b C source). Now test/units/math/troundm.pp is consistent for all targets.
git-svn-id: trunk@28312 -
2014-08-04 21:56:40 +00:00
sergei
ff5410b152 + Expanded test also for qword->double and int32->single conversions.
git-svn-id: trunk@28311 -
2014-08-04 21:45:34 +00:00
Legolas
ca0ff3d2ea * libndsfpc: forgot to commit a file
+ libndsfpc: added two new examples and regenerated makefiles

git-svn-id: trunk@28310 -
2014-08-04 19:39:02 +00:00
reiniero
935a3f1bc9 * fcl-db: cosmetic
git-svn-id: trunk@28309 -
2014-08-04 08:09:40 +00:00
sergei
bf51683e78 * Softfloat: added some typecasts to prevent promotion to 64 bits where it is not intended.
git-svn-id: trunk@28308 -
2014-08-03 12:14:43 +00:00
sergei
96abd7f370 * Softfloat: marked ExtractFloat32*, ExtractFloat64* and PackFloat32 helpers as inline.
* int64_to_float64 and qword_to_float64: call 'function' overload of PackFloat64. Whenever arguments are constant it can be evaluated entirely at compile time (the procedure PackFloat64 does not have this property even if marked as inline because it is too complex, i.e. consists of more than single statement).

git-svn-id: trunk@28307 -
2014-08-03 12:00:38 +00:00
marco
8309a4794d * updated wording helpfile download, mantis #26517
git-svn-id: trunk@28306 -
2014-08-03 11:09:52 +00:00
marco
1ab8e2381f * fix #26007 move size=0 of r27762 to OS specific code, otherwise it prohibits
async reading of the stream. (windows first reads streams, then executes
   readmessage)

git-svn-id: trunk@28305 -
2014-08-03 11:00:53 +00:00
marco
6b01f96034 * Add assigned check to reading fileinfo for case there is no fileinfo section.
Mantis #26549, patch by Reinier.

git-svn-id: trunk@28304 -
2014-08-03 10:48:16 +00:00
sergei
586a9aafe8 * The test must have '.pp' extension, of course.
git-svn-id: trunk@28303 -
2014-08-03 00:16:09 +00:00
sergei
b9763d270a + Enabled section smartlinking for m68k-linux.
git-svn-id: trunk@28302 -
2014-08-02 23:00:36 +00:00
sergei
8910e2f74d + Added a test checking that conversion of 64-bit integers to double-precision floats depends on current rounding mode when integer has more than 53 bits set.
git-svn-id: trunk@28301 -
2014-08-02 22:42:47 +00:00
Legolas
c09d2e2096 * Fixed filesystem handling in libogc
git-svn-id: trunk@28300 -
2014-08-02 15:34:58 +00:00
Legolas
a52e51d0b7 * Updated libndsfpc and nds linkerscript to Ver. 1.5.8
git-svn-id: trunk@28299 -
2014-08-02 15:23:51 +00:00
sergei
a28d6a84a7 + m68k, a_load_const_reg: use MOV3Q if applicable for data registers as well, since it allows spilling replacement of destination.
+ a_load_const_ref: use CLR and MOV3Q if possible.
* a_cmp_reg_reg_label: force size to 32 bits for ISA_A and ISA_A+ targets.
+ support for stack frames larger than 32767 bytes.

git-svn-id: trunk@28298 -
2014-08-02 12:46:34 +00:00
sergei
499ff505c8 * m68k: further improved code generation for comparison nodes, support LOC_REFERENCE for 32-bit compares and omit low dword, when possible, for 64-bit ones.
git-svn-id: trunk@28297 -
2014-08-02 12:37:40 +00:00
sergei
b4d9d97a03 * m68k: don't do replace spilling if spilltemp.offset exceeds 16 bits on Coldfire targets.
git-svn-id: trunk@28296 -
2014-08-02 12:33:32 +00:00
sergei
3da5de0e5f + m68k, do_spill_replace: support more cases.
+ support spilling at offsets >32767, tested only to generate assemble-able code, support of large stack frames needs more changes elsewhere.

git-svn-id: trunk@28295 -
2014-08-01 20:32:48 +00:00
marco
98b4e77b4f * fixed 64-bit issue.
git-svn-id: trunk@28288 -
2014-08-01 10:18:17 +00:00
Mattias Gaertner
0d4fa26c51 fpreadtif: fixed read LZW stream at end of a bit length increase, bug #22724
git-svn-id: trunk@28287 -
2014-08-01 07:41:01 +00:00
lacak
00f85c52ab fcl-db: oracle:
- for ftBlob parameters binding use temporary LOBs instead of long varraw to bypass 64KB limit of current implementation
- initial support for NCLOB data type (if client uses for NCHAR "variable width" charset (like UTF-8) then there is character length <> byte length which is currently not handled correctly)

git-svn-id: trunk@28286 -
2014-08-01 05:48:24 +00:00
masta
7a0c79de60 Fix for AndLsl2Lsl in ARM Peephole optimizer
AndLsl2Lsl assigned the wrong register to the remaining instruction, and
also did not check for the register.

git-svn-id: trunk@28285 -
2014-07-31 23:09:33 +00:00
masta
85d208fea4 Fix ARM LoadScheduler in case of Pre/PostIndexed addressing
There was an interference between the load scheduler and then
Str/LdrAdd/Sub2Str/Ldr peephole optimizer.

ldrb r0, [r2]
ldrb r1, [r2, #1]
orr r3, r0, r1
add r2, r2, #2

got changed pre-regalloc to:
ldrb r1, [r2, #1]
ldrb r0, [r2]
orr r3, r0, r1
add r2, r2, #2

and the peephole optimizer collapsed the add into the second ldrd:
ldrb r1, [r2, #1]
ldrb r0, [r2], #2
orr r3, r0, r1

Then the post-peephole optimizer changed that into:
ldrb r0, [r2], #2
ldrb r1, [r2, #1]
orr r3, r0, r1

so r1 got loaded from a modified base-register.

This patch prevents the scheduler from moving an ldr-instruction if it
uses Pre/Post-indexing and the instruction before it uses the
base-register.

git-svn-id: trunk@28284 -
2014-07-31 19:57:09 +00:00
sergei
2c8264c42b * m68k: partially improved code generation for comparisons.
git-svn-id: trunk@28283 -
2014-07-31 18:44:07 +00:00
sergei
01c8ee158d - removed unused variables
git-svn-id: trunk@28282 -
2014-07-31 18:35:55 +00:00
michael
9efce39e06 * Optimized version of SHA1 and MD5 hashes (speed doubles on x64) by Engkin
git-svn-id: trunk@28281 -
2014-07-31 12:12:54 +00:00
sergei
cf2b4a4dbd * softfpu cleanup: use Pascal boolean types where appropriate, use 64-bit overload of shift64RightJamming() to simplify things.
git-svn-id: trunk@28280 -
2014-07-30 23:39:10 +00:00
masta
66aca1b104 Optimize generic 64-bit division code
FPC_{DIV,MOD}_QWORD now check if both inputs have their upper 32bit set
to zero and in that case use 32-bit division instead, which many
plattforms can either do in hardware or have optimized assembly code
for.

git-svn-id: trunk@28279 -
2014-07-30 17:07:29 +00:00
michael
347742ba80 * For large times, use [[hh:]nn:]ss date/time format
git-svn-id: trunk@28278 -
2014-07-30 14:53:37 +00:00
michael
7a096b20f6 * For large times, use [[hh:]nn:]ss date/time format
git-svn-id: trunk@28277 -
2014-07-30 14:53:29 +00:00
michael
1a6d734ca8 * Correct formatdatetime string
git-svn-id: trunk@28276 -
2014-07-30 14:52:42 +00:00
sergei
a42ecadddf + m68k: implemented overflow checking (does not work for multiplication yet).
+ support references as source operands for 64-bit AND and OR operations.

git-svn-id: trunk@28275 -
2014-07-30 01:46:25 +00:00
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