Commit Graph

36059 Commits

Author SHA1 Message Date
florian
e84a43768e * typo fixed
git-svn-id: trunk@20511 -
2012-03-11 08:24:44 +00:00
florian
891d7b9349 * comitted wrong patch in r20491, fixed with this revision
git-svn-id: trunk@20510 -
2012-03-11 07:38:21 +00:00
paul
fc8692e7c9 win rtl: add BM_SETDONTCLICK message
git-svn-id: trunk@20509 -
2012-03-11 01:45:35 +00:00
Jonas Maebe
5c56b1bc3d * give an error when trying to take address of a global label declared in
another scope instead of crashing (mantis #21078)

git-svn-id: trunk@20508 -
2012-03-10 23:24:43 +00:00
Jonas Maebe
3589f90cf8 * also show the valid bounds in most cases when signalling a range check
warning/error while evaluating constants (mantis #21299)

git-svn-id: trunk@20507 -
2012-03-10 21:53:36 +00:00
florian
18866623cd o patch by Nico Erfurth: Optimize some ARM-RTL functions
Use "nostackframe" for:
  - Sptr (broken without nostackframe)
  - get_caller_addr
  - get_caller_frame

Use cmp+ldrne instead of movs+beq+ldr, its a bit more pipeline-friendly
and takes burden of the BPU.

git-svn-id: trunk@20506 -
2012-03-10 21:52:06 +00:00
florian
3b1df45c28 * version update
git-svn-id: trunk@20505 -
2012-03-10 21:06:06 +00:00
florian
2f5ce095ce * RefsHaveIndexReg -> cpurefshaveindexreg
* cpurefshaveindexreg defined properly in fpcdefs.inc

git-svn-id: trunk@20504 -
2012-03-10 19:43:52 +00:00
Jonas Maebe
eb2cccffda + -WM<X> and -WP<x> command line parameters to specify the minimally required
Mac OS X/iOS version for the compiler code
   o such a parameter is not passed, extract the information from the
     environment variables MACOSX_DEPLOYMENT_TARGET/IPHONEOS_DEPLOYMENT_TARGET,
     like gcc
   o if neither the parameter nor the environment variable is used, use preset
     default values
   o pass on this version setting on to the Darwin linker
   o use this setting to determine which version of the startup code (crt1.o
     etc) to use, if any (based on information gathered from the GCC sources)
   o define a symbol called MAC_OS_X_VERSION_MIN_REQUIRED/
     IPHONE_OS_VERSION_MIN_REQUIRED based on this parameter
   o for usage information, see
     http://wiki.freepascal.org/FPC_New_Features_Trunk#Support_for_specifying_and_querying_the_deployment_version

git-svn-id: trunk@20503 -
2012-03-10 19:31:57 +00:00
Jonas Maebe
d95d0e588d - removed a sanity check for the output of nm, because it doesn't hold
on Darwin in some cases: it sometimes has a "symbol" with the name
    " stub helpers" (including the leading space)

git-svn-id: trunk@20502 -
2012-03-10 19:22:44 +00:00
Jonas Maebe
34df763ab1 * allocate space for the explicitly allocated assert parameter
git-svn-id: trunk@20501 -
2012-03-10 19:20:07 +00:00
florian
7ea7031017 + cpu type armv5t
git-svn-id: trunk@20500 -
2012-03-10 19:04:22 +00:00
Jonas Maebe
188677ea91 * fixed the offset of memory parameters allocated via getintparaloc():
the register parameters are not put on the stack, so don't count them
    (only makes a practical difference for fixed stack targets, fixes
     random crashes with webtbs/tw3870 on Darwin/i386)

git-svn-id: trunk@20499 -
2012-03-10 18:01:22 +00:00
michael
c0807b4023 * Added readme
git-svn-id: trunk@20498 -
2012-03-10 17:17:39 +00:00
florian
9c6e3d317a * reenabled ldr/ldr and ldr/str optimization
git-svn-id: trunk@20497 -
2012-03-10 17:09:42 +00:00
michael
aa45ca8e0e * First version of fpindexer engine
git-svn-id: trunk@20496 -
2012-03-10 16:04:12 +00:00
michael
6c671917ec * Added PreferModuleName
git-svn-id: trunk@20495 -
2012-03-10 14:58:14 +00:00
michael
7ab32986ef * (Modified) Patch from Sven Barth to add AfterInitModule
git-svn-id: trunk@20494 -
2012-03-10 14:19:00 +00:00
andrew
b50bd10818 Fixed chm search results for large chm search databases with > 2 node levels
git-svn-id: trunk@20493 -
2012-03-10 13:47:43 +00:00
florian
6b94087dd4 * disable alglib tests on architectures without hardware fpu, they take too much time
git-svn-id: trunk@20492 -
2012-03-10 13:45:37 +00:00
florian
5b03826549 o patch by Nico Erfurth: Better Locked* implementation for arm on linux
The following functions where changed to make use of the kernel helper
kuser_cmpxchg:
InterLockedDecrement
InterLockedIncrement
InterLockedExchangeAdd
InterLockedCompareExchange

The previous implementation using a spinlock had a couple of drawbacks:
1.) The functions could not be used safely on values not completly managed
by the process itself, because the spinlock did not protect data but the
functions. For example, think about two processes using shared memory.
They would not be able to share fpc_system_lock, making it unsafe to use
these functions.
2.) With many active threads, there was a high chance that the scheduler
would interrupt a thread while fpc_system_lock was taken, which would
result in the following threads using one of these functions to spinlock till
the end of its timeslice. This could result in unwanted and unnecessary
latencies.
3.) Every function contained a pointer to fpc_system_lock. Resulting in
two polluted DCache-Lines per call and possible latencies through dcache
misses.

The new implementation only works on Linux Kernel >= 2.6.16
The functions are implemented in a way which tries to minimize cache pollution
and load latencies.

Even without Multithreading the new functions are a lot faster. I've did
comparisons on my Kirkwood 1.2GHz with the following template code:

var X: longint;
begin
	X := 0;
	while X < longint(100*1000000) do
		FUNCTION(X);
	Writeln(X);
end.

Function                     New        Old
InterLockedIncrement:        0m3.696s   0m23.220s
InterLockedExchangeAdd:      0m4.034s   0m23.242s
InterLockedCompareExchange:  0m4.703s   0m24.006s

This speedup is most probably because of the reduced memory access,
which resulted in lots of cache misses.

git-svn-id: trunk@20491 -
2012-03-10 11:33:20 +00:00
Jonas Maebe
8c86455965 - removed "inline" from getansistringdef(), it's way too big
git-svn-id: trunk@20489 -
2012-03-10 00:25:58 +00:00
Jonas Maebe
a6a43c71ec * give an error message when including a file starting with an UTF-8 BOM
in a compilation module parsed using a different code page, because this
    changes the default ansistring type and {$codepage xxx} is also not
    allowed in the middle of a unit (mantis #21445)

git-svn-id: trunk@20488 -
2012-03-09 22:50:14 +00:00
Jonas Maebe
2696c1f1d3 * also print fpc-specific help when executed without parameters or with -h
(mantis #21323)
  * don't print a message about the ppc binary exiting with an error if no
    source file is specified (if a no option or -h is used, the help message
    will be printed; in other cases, a source file may not have been specified
    but that's an error like any other in that case -- that message only
    existed because the compiler binary also exits with a non-zero exit code
    in case the help is printed)
  - removed alpha and ia64 support for selecting ppc binary
  + added mips and mipsel support for selecting ppc binary

git-svn-id: trunk@20487 -
2012-03-09 21:38:22 +00:00
Jonas Maebe
524a5683d5 * add /Applications/Xcode.app/Contents/Developer/usr/bin to the default
utilities search path on Darwin (which is where the Xcode 4.3+ utilties
    are located by default)

git-svn-id: trunk@20486 -
2012-03-09 21:12:49 +00:00
Jonas Maebe
d1acb76df8 * don't replace "expr1 or expr1" or "expr1 and expr1" with just "expr1"
if expr1 has sideeffects. This can't be done safely even in case of
    short boolean evaluation, because expr1 may return the inverse the
    second time its called (and "0 or 1" is not the same as "0", and
    neither is "1 and 0"), based on comment by Michael Karcher
  * perform a full string compare when comparing stringconstnodes
    before the string constant labels have been generated (patch by
    Michael Karcher, mantis #21255)

git-svn-id: trunk@20485 -
2012-03-09 20:26:32 +00:00
Jonas Maebe
cca1fe9573 * adjust the name of the external debug and map file when the name of
the output binary is changed via the -o option (patch by Barlone,
    mantis #21171)

git-svn-id: trunk@20484 -
2012-03-09 15:24:46 +00:00
marco
f5a4f6b4af * Patch + test to map integer field with auto_increment property to ftautoinc
Mantis #21438, patch by Lacak2.

git-svn-id: trunk@20483 -
2012-03-08 19:57:20 +00:00
Jonas Maebe
3ebdd64d75 * dereference pchar passed to indexbyte in strecopy (patch by Andrew Haines,
mantis #21443)

git-svn-id: trunk@20481 -
2012-03-08 18:55:49 +00:00
andrew
d289d3d4ce Fixed a bug where large chm search index's would be invalid when multiple index nodes are used
git-svn-id: trunk@20480 -
2012-03-08 16:54:03 +00:00
andrew
4788c38f2c Fixed bug where generating a search for a chm with millions of words would use 4GB of memory!
git-svn-id: trunk@20479 -
2012-03-08 16:04:56 +00:00
florian
a7b46fc36f * don't create a temp. for a dereferenced pointer which is passed to a var parameter of an inline procedure
git-svn-id: trunk@20478 -
2012-03-07 21:17:09 +00:00
Jonas Maebe
d305615132 * fixed compilation with current FPC versions
git-svn-id: trunk@20476 -
2012-03-07 12:38:28 +00:00
florian
841d67ec81 * don't waste an extra register when copying 4 bytes
git-svn-id: trunk@20475 -
2012-03-05 19:12:00 +00:00
sergei
eabc0cb53a * fcl-xml, making progress with streaming API, implemented a few more methods.
git-svn-id: trunk@20474 -
2012-03-05 14:38:05 +00:00
florian
b4907578b0 * temporarily disable LDR/LDR STR/LDR optimizations, let's see if this broke regression testing on fpcarm
git-svn-id: trunk@20473 -
2012-03-04 20:37:06 +00:00
florian
8278271b4e * fix RegInInstruction
+ introduce generic RegModifiedByInstruction

git-svn-id: trunk@20472 -
2012-03-04 20:21:14 +00:00
florian
f33ee60c2e * write ait_varloc into assembler output, it is generated if -sr is passed to the compiler
git-svn-id: trunk@20471 -
2012-03-04 20:15:28 +00:00
marco
d6100fed50 * one letter fix to last commit.
git-svn-id: trunk@20470 -
2012-03-04 18:10:28 +00:00
marco
8f13f13969 * reduce redundant AS in bufdataset.buildindex. Might improve performance,
but main purpose is to increase readability and debugability

git-svn-id: trunk@20469 -
2012-03-04 14:29:15 +00:00
sergei
92f927976e * Rewrote fpc_dynarray_copy to trim out-of-range arguments instead of raising range error. Makes behavior Delphi-compatible and resolves #21396.
* Changed copying the entire array to use range 0..high(sizeint) instead of -1..-2.

git-svn-id: trunk@20468 -
2012-03-04 04:41:52 +00:00
sergei
a417e9d0b6 * fcl-xml, making progress with streaming API, moved DOM-dependent stuff from TXMLTextReader to the TLoader helper object. Now TXMLTextReader class is almost free from direct DOM dependencies (indirect ones like TDOMParser are still present, also entity handling is still intertwined too closely).
git-svn-id: trunk@20467 -
2012-03-03 12:26:52 +00:00
pierre
af66d92faf * Update complete i386-freebsd C objects with gcc 4.2.1 from FreeSBD 8.2 release
git-svn-id: trunk@20466 -
2012-03-03 10:45:04 +00:00
marco
c6da7f726d * change mysql datetime parsing because mysql allows time >24hrs (interval like).
Matnis #21368, Patch by Lacak2.

git-svn-id: trunk@20464 -
2012-03-02 12:26:02 +00:00
marco
d676e18326 * Patch from Luiz. Move state change to calculatefields instead of the
handler. Mantis #20969

git-svn-id: trunk@20463 -
2012-03-02 09:55:06 +00:00
marco
b956e9e52d * add a check to TRecall.store for FStorage=nil. Patch by Luiz, Mantis #21404
git-svn-id: trunk@20462 -
2012-03-02 09:43:12 +00:00
marco
ae1ece93e5 * fix for #21199, changing epsilon to 0.0 instead of 0 helps overload selection of the
right precision. Leave mantis item over for compiler testing.

git-svn-id: trunk@20461 -
2012-03-01 22:31:20 +00:00
marco
39bc3b9dcf * remove empty override tpersist.destroy(), patch by Luiz Americo, Mantis #21387
git-svn-id: trunk@20460 -
2012-03-01 21:47:32 +00:00
marco
49e3a24413 * Modification after feedback on #20454, last patch was a bit conservative.
git-svn-id: trunk@20459 -
2012-03-01 21:43:04 +00:00
marco
4ea56bd875 * Memleak fixes, Patch by Jesus Reyes. Mantis #21403
git-svn-id: trunk@20458 -
2012-03-01 21:39:01 +00:00