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 -
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 -
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 -
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 -
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 -
(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 -
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 -