Jonas Maebe
2b91a9ef37
+ jumptable support for darwin/ppc64
...
git-svn-id: trunk@8285 -
2007-08-14 17:32:24 +00:00
Jonas Maebe
eddc507a13
* disallow widechar sets (Delphi 7 compatible, and were handled wrongly
...
by FPC previously)
* tbs/tb0474 now fails -> renamed to tbf/tb0201 (+ new test tbf/tb0202)
git-svn-id: trunk@8284 -
2007-08-14 14:27:59 +00:00
Jonas Maebe
eec25e454d
* slightly optimized ppc jumptable code (one compare+jump replaced
...
by a subtraction)
git-svn-id: trunk@8283 -
2007-08-14 14:17:09 +00:00
Jonas Maebe
3a7ad5212d
* removed some instructions from the list which considers r0 as 0
...
git-svn-id: trunk@8282 -
2007-08-14 14:15:35 +00:00
Jonas Maebe
1c71bb36a1
* also check for valid min/maxlabel range for jumptable in case
...
of cs_opt_size
git-svn-id: trunk@8281 -
2007-08-14 13:58:56 +00:00
Jonas Maebe
fc53d14e58
* also enable .rodata for ppc64
...
git-svn-id: trunk@8278 -
2007-08-13 15:02:39 +00:00
Jonas Maebe
d73e79f163
* fixed regression of webtbs/tw4254: if a constant (wide)string can't be
...
converted to a pchar at compile time, remove the cstring_to_pchar node
because it expects a stringconstn in pass_generate_code
git-svn-id: trunk@8275 -
2007-08-13 09:13:07 +00:00
Jonas Maebe
815cd2b39d
+ support for widestring manager based widechar conversions
...
(widechar<->char, widechar<>*string), based on patch from
Rimgaudas Laucius (mantis #7758 )
* no longer perform compile-time widechar/string->char/ansi/
shortstring conversions if they would destroy information
(they can't cope with widechars with ord>=128). This means
that you can now properly constant widechars/widestrings
in source code with a {$codepage } set without risking that
the compiler will mangle everything afterwards
* support ESysEINVAL return code from iconv (happens if last
multibyte char is incomplete)
* fixed writing of widechars (were converted to char -> lost
information)
git-svn-id: trunk@8274 -
2007-08-12 20:01:08 +00:00
Jonas Maebe
c408d9bb1d
* fixed regression of webtbs/tw2789 caused by r8270 (setting vs_read
...
without vsf_must_be_valid means that it's not really read, but
only used by sizeof or so)
git-svn-id: trunk@8273 -
2007-08-12 19:52:57 +00:00
Jonas Maebe
a8191abd16
* fixed parsing of "rcl/rcr rm,imm" (mantis #9025 )
...
git-svn-id: trunk@8272 -
2007-08-12 13:50:52 +00:00
Jonas Maebe
12791bf4f1
* avoid spurious uninitialised warnings about array elements used as
...
for-loop counters
git-svn-id: trunk@8270 -
2007-08-12 13:19:30 +00:00
Jonas Maebe
097c2db374
* make sure warnings/hints in set_varstate are always given at the
...
correct position
git-svn-id: trunk@8269 -
2007-08-12 13:18:39 +00:00
Jonas Maebe
3f701c96d4
* explicitly check for stringconstn next to stringdef in nadd, because
...
a stringconstn is often an arraydef. The result is that they again
get the same typeconversion behaviour as string variables, which is
important in case of overloaded operators (#9021/#9026)
git-svn-id: trunk@8268 -
2007-08-12 11:31:19 +00:00
Jonas Maebe
9c90a93932
* fixed bug which caused SSA to be less effective for integer
...
registers on 64 bit cpus
git-svn-id: trunk@8253 -
2007-08-09 11:57:52 +00:00
yury
e7ef9757c9
* Corrected comment.
...
git-svn-id: trunk@8252 -
2007-08-09 10:33:18 +00:00
Jonas Maebe
e205481027
* fixed sparc bootstrap
...
* use -Av9 assembler option so it accepts the memory barrier opcodes
git-svn-id: trunk@8244 -
2007-08-08 09:48:37 +00:00
Jonas Maebe
98ad33a0c7
+ added lwsync instruction to the compiler
...
* fixed compilation of ReadDependencyBarrier
git-svn-id: trunk@8243 -
2007-08-08 09:15:48 +00:00
micha
d95b9082bb
* add memory barrier prototypes + implementation for i386 and sparc + use lwsync for powerpc64
...
git-svn-id: trunk@8240 -
2007-08-07 20:37:08 +00:00
peter
2e9968d46c
* arrays always by addr
...
git-svn-id: trunk@8232 -
2007-08-06 19:44:25 +00:00
peter
f5d5e377d2
* fix linux x86_64 for records and arrays
...
git-svn-id: trunk@8224 -
2007-08-05 19:38:21 +00:00
Jonas Maebe
881f884f4c
* also pass -arch parameter when creating bundles
...
git-svn-id: trunk@8223 -
2007-08-05 11:05:20 +00:00
Jonas Maebe
4cdd590091
* use app_type instead of RelocSection for creating bundles, as
...
RelocSection is automatically set for all shared libraries
git-svn-id: trunk@8219 -
2007-08-04 09:13:34 +00:00
Jonas Maebe
84ddacd017
+ support for creating a bundle instead of a library on Darwin (-Wb)
...
git-svn-id: trunk@8217 -
2007-08-03 12:42:49 +00:00
Jonas Maebe
f1f1299e97
* generalised -W description to "target-specific options"
...
* mention for each -W option to which targets it applies
* show all available -W options for all target architectures they apply to
* reworded some option descriptions
* all option descriptions now start with a capital for consistency
git-svn-id: trunk@8216 -
2007-08-03 12:13:27 +00:00
peter
4e6c57b9ee
* cleanup x86_64 structures in registers
...
git-svn-id: trunk@8214 -
2007-08-02 20:46:48 +00:00
Jonas Maebe
fc70aa545c
* changed boolean fields in ttempinfo to a set for easier
...
extensibility without increasing the size of the record
git-svn-id: trunk@8199 -
2007-07-29 19:37:06 +00:00
Jonas Maebe
70886d0152
* now also disable use8byteconcatcopy by default
...
git-svn-id: trunk@8197 -
2007-07-29 19:09:12 +00:00
florian
70b0bd1c5d
* throw better error when variable values are used as typed consts, resolves #9333
...
git-svn-id: trunk@8188 -
2007-07-29 14:29:19 +00:00
Jonas Maebe
ceeac6e8e4
* don't use 8 byte copies in concatcopy by default, because
...
a misaligned 8 byte load/store is much more expensive than
a misaligned 4 byte load/store
git-svn-id: trunk@8182 -
2007-07-28 15:47:04 +00:00
Jonas Maebe
661c2eba37
* clean up of previous fix
...
git-svn-id: trunk@8177 -
2007-07-28 10:48:12 +00:00
Jonas Maebe
4b62d5e43d
* only create PASCALFINALIZE for programs and libraries
...
git-svn-id: trunk@8176 -
2007-07-28 10:47:31 +00:00
marco
727b68c9b0
* small fix for OS X related typo.
...
git-svn-id: trunk@8175 -
2007-07-28 10:09:23 +00:00
florian
4151029ee5
+ .fini section support
...
git-svn-id: trunk@8174 -
2007-07-28 08:40:10 +00:00
tom_at_work
5428135ca7
* always use the non-dotted name for function calls and disable putting constants into the got (should be: toc) for now; fixing cycle with "-Cg"
...
git-svn-id: trunk@8172 -
2007-07-27 20:28:08 +00:00
Jonas Maebe
62c4f85eb5
* renamed opd section (linux/ppc64) to .opd (same as used by gcc)
...
git-svn-id: trunk@8171 -
2007-07-27 17:32:39 +00:00
florian
c00b667201
* update from Karl-Michael Schindler
...
git-svn-id: trunk@8170 -
2007-07-27 14:17:06 +00:00
Jonas Maebe
9c69c9dcf8
* fixed handling of paths/files with spaces in their name in link.res
...
on platforms where the `cat link.res` trick is used. Those must
/not/ be quoted, because otherwise the shell assumes those quotes
are part of the filename, and will escape the quotes themselves.
Instead, write everything out without quotes, but set IFS to
<newline> before doing the cat, so that only a new line is seen
as a separator between items. The shell will then insert the
necessary quotes to escape the spaces. One disadvantage: this
means that other options, such as e.g. "-arch ppc" under Darwin,
must now be written split over two lines to avoid the shell
passing such parameters (which consist of two separate strings)
as one single parameter (with an escaped space) to ld.
git-svn-id: trunk@8166 -
2007-07-25 16:25:14 +00:00
Jonas Maebe
a3c9dc5ec6
+ support for {$linkframework x} to link to framework x (Darwin only)
...
+ support for {$frameworkpath x} and -Ffx to add x to the directories to
search for frameworks (Darwin only)
git-svn-id: trunk@8165 -
2007-07-25 15:42:30 +00:00
michael
bedf0151cc
* Implemented support for custom RC compiler and .RES linker
...
git-svn-id: trunk@8164 -
2007-07-25 12:06:57 +00:00
peter
c020d709b4
* default widestring-ansistring conversion needs to use the same algorithm
...
as the rtl to behave the same on compile time and runtime
git-svn-id: trunk@8161 -
2007-07-23 21:57:48 +00:00
peter
1249bf70ff
* shorten mangledname names much quicker for nested procedures
...
git-svn-id: trunk@8160 -
2007-07-23 21:36:16 +00:00
peter
1dd62b8686
* write also asmblocklabel for a connected labelsym
...
git-svn-id: trunk@8159 -
2007-07-23 21:01:32 +00:00
peter
0fc65c5eec
* for tp mode don't allow unitname reuse
...
git-svn-id: trunk@8158 -
2007-07-23 20:38:05 +00:00
florian
5e60b52f28
* ignore pic directive/switch if the platform doesn't support pic, resolves #9281
...
git-svn-id: trunk@8157 -
2007-07-23 20:25:04 +00:00
florian
8b11f99765
* let the dfa do the detection of unset function results if possible
...
git-svn-id: trunk@8156 -
2007-07-23 20:23:50 +00:00
florian
a2ac6c698d
* fixed dfa for raise nodes
...
git-svn-id: trunk@8155 -
2007-07-23 20:22:36 +00:00
peter
89eddc7504
* check for valid reference before parsing extra constant values
...
git-svn-id: trunk@8154 -
2007-07-23 20:16:23 +00:00
peter
703b8855cc
* allow local procsym in delphi mode
...
git-svn-id: trunk@8148 -
2007-07-23 09:15:32 +00:00
florian
b6cca14944
* proper handling of dummy result node in dfa, resolves #8717 and #8079
...
+ tests
git-svn-id: trunk@8147 -
2007-07-23 08:57:31 +00:00
peter
ad4846a50e
* don't allow generics as parent classes
...
git-svn-id: trunk@8144 -
2007-07-22 23:10:24 +00:00
peter
8bd95f4dd4
* keep signess of orginal variable in shl/shr operation
...
git-svn-id: trunk@8143 -
2007-07-22 22:56:35 +00:00
peter
725f1d7176
* remove wrong $esle x86_64 causing uninitialized variable
...
git-svn-id: trunk@8141 -
2007-07-22 20:57:05 +00:00
peter
67e16340be
* revert r8118
...
git-svn-id: trunk@8139 -
2007-07-22 19:59:00 +00:00
peter
5e36a73b80
* create a new vmt entry also if return type differs
...
* search all parent classes for matching interface implementations
git-svn-id: trunk@8138 -
2007-07-22 19:47:55 +00:00
peter
98cc116dd2
* fix passing string to open array of string
...
git-svn-id: trunk@8137 -
2007-07-22 19:44:56 +00:00
florian
be6d2dd0f9
* reverted wrong commit in r8133
...
git-svn-id: trunk@8135 -
2007-07-22 17:00:51 +00:00
florian
447276c5bb
* Jcc reads the flags, this was not in the dat yet, resolves #9278
...
* disabled 4 ops variant of insertq for now
git-svn-id: trunk@8133 -
2007-07-22 16:40:44 +00:00
peter
f70a4a64a0
* swapendian for 2.0.x
...
git-svn-id: trunk@8132 -
2007-07-22 16:13:43 +00:00
daniel
5add416dab
* Fix mul opsize
...
git-svn-id: trunk@8131 -
2007-07-22 11:48:10 +00:00
daniel
6065bee1c2
* qword(-int64) can cause an overflow error in case of low(int64). Harmless, so
...
disable overflow checking around it.
git-svn-id: trunk@8124 -
2007-07-22 08:32:49 +00:00
florian
4b9669a081
* give proper error location if something is wrong with the type argument list, resolves #9112
...
git-svn-id: trunk@8122 -
2007-07-21 21:49:59 +00:00
daniel
21293f5818
+ Add common type integer promotion.
...
- {$intpromotion common_type} or -CIcommon_type switches to common type promotion.
- {$intpromotion native_integer} or -CIcommon_type switches to current behaviour.
- Default in tp mode is common_type, native_integer in other modes
- Compiler can cycle with -CIcommon_type
- Still needs checking on other architectures than i386
git-svn-id: trunk@8118 -
2007-07-21 19:16:24 +00:00
florian
fa2a2b0bd0
* generics without specialization can't be used as a type, resolves #9225
...
git-svn-id: trunk@8116 -
2007-07-21 17:39:49 +00:00
daniel
4c81c227fa
- Remove long2hex, replace by hexstr.
...
git-svn-id: trunk@8111 -
2007-07-21 10:29:09 +00:00
daniel
5ce54c6a20
+ For muln, don't load left operand in register unless necessary.
...
(mul supports memory operands).
git-svn-id: trunk@8110 -
2007-07-21 09:20:33 +00:00
Jonas Maebe
49a2084ea0
* fixed calling inline functions (with exit statements) from inside
...
finally blocks
* fixed the handling of function results of inlined functions with
exit statements
+ test for the above two issues and for bug fixed in r8091
* copy may_be_in_reg field inside ttempcreatenode.dogetcopy (allows
some more temps which were needlessly forced into memory to be in
registers)
git-svn-id: trunk@8108 -
2007-07-20 16:49:35 +00:00
Jonas Maebe
20dbda751a
* fixed sparc compilation after addr_lo/hi changes
...
git-svn-id: trunk@8107 -
2007-07-20 12:30:16 +00:00
michael
61dae2cf4f
* Patch from Ido Kanner to update translations
...
git-svn-id: trunk@8098 -
2007-07-18 21:12:15 +00:00
Jonas Maebe
1a522594ec
* fixed tonnode.getcopy crash in case there is no exception variable
...
git-svn-id: trunk@8091 -
2007-07-18 19:03:49 +00:00
Jonas Maebe
71193c0f2c
* fixed bootstrapping with 2.0.4
...
* fixed ppc64 compilation (by reintroducing a bogus ptrint warning, that
code really is correct)
git-svn-id: trunk@8090 -
2007-07-18 12:15:55 +00:00
joost
787b968e70
* Replaced "uname m" from which the output was not very consistent with "fpc -PP"
...
git-svn-id: trunk@8084 -
2007-07-17 17:39:35 +00:00
Jonas Maebe
28bab3fb4f
- removed some unused variables
...
* fixed some (harmless) ptrint warnings
- removed some commented code in agppcmpw
* added one missing field in a typed constant in cp1251
git-svn-id: trunk@8081 -
2007-07-17 13:57:15 +00:00
florian
2b2c6f7f53
* don't add empty symtables when specializing generics
...
git-svn-id: trunk@8066 -
2007-07-15 17:16:21 +00:00
daniel
a05d228679
- Remove IE from g_concatcopy again.
...
git-svn-id: trunk@8065 -
2007-07-15 16:15:13 +00:00
yury
3e60b4a8dd
* Don't optimize (eliminate) arm fpu move instruction if it performs float type conversion. It fixes tb0519.pp on arm-linux.
...
git-svn-id: trunk@8059 -
2007-07-14 21:52:15 +00:00
daniel
f0633187f4
+ Change constants in g_concatcopy to make the right decisions on x86_64.
...
* Fix move copy in g_concatcopy for x86_64.
git-svn-id: trunk@8058 -
2007-07-14 21:29:57 +00:00
daniel
4a3870eb12
* Fix bug #9261 .
...
git-svn-id: trunk@8056 -
2007-07-14 20:57:56 +00:00
tom_at_work
49b84c3116
* remove obsolete code
...
git-svn-id: trunk@8053 -
2007-07-14 19:18:15 +00:00
daniel
4f6eb50391
+ Internalerror if g_concatcopy is called with len=0.
...
git-svn-id: trunk@8052 -
2007-07-14 18:56:16 +00:00
yury
afdd053172
* fixed unary minus in softfloat mode (bug #8737 ).
...
git-svn-id: trunk@8047 -
2007-07-14 10:09:37 +00:00
yury
bd0cafd545
* fixed ARM stackframe optimization when float registers are used.
...
git-svn-id: trunk@8032 -
2007-07-12 21:55:34 +00:00
tom_at_work
1cc1d4ebf2
* use automatic ppc64/linux got/toc entry generation by the linker if possible - removes the need of some workarounds
...
git-svn-id: trunk@8031 -
2007-07-12 21:00:55 +00:00
yury
1782305ae2
* Completely fixed float constants in softfloat mode when compiler was compiled in hardfloat mode on arm-linux host.
...
git-svn-id: trunk@8015 -
2007-07-10 21:05:12 +00:00
Tomas Hajny
aadcefe08f
* correction for typo in licence information
...
git-svn-id: trunk@8014 -
2007-07-10 20:39:44 +00:00
Legolas
cdf4841517
* Changed .elf extension to .nef (Not Executable File) for intermediate file builds in the NDS compiler (used on no$gba debugger for symbol table)
...
* Added nds target to ppudump.pp
* Fixed rtl compilation for nds target
* Changes in prt09.as
git-svn-id: trunk@8002 -
2007-07-09 22:17:36 +00:00
yury
e14906c484
* Handle .fpc section by internal elf obj writer the same way as external assembler handles this section.
...
git-svn-id: trunk@8001 -
2007-07-09 22:05:08 +00:00
yury
fd6862acb9
* fixed debugging problem on arm-linux.
...
git-svn-id: trunk@7997 -
2007-07-09 21:17:07 +00:00
Almindor
7f548cf517
* adds amd64 to the list of uname -m possible results in samplecfg
...
git-svn-id: trunk@7996 -
2007-07-09 21:14:59 +00:00
Almindor
bfb7294e19
* exchange "arch" with "uname -m" in samplecfg to work on non-linux
...
git-svn-id: trunk@7995 -
2007-07-09 21:09:26 +00:00
yury
658853c139
* Initialize fpu regvars from staticsymtable by loading initial value from memory location.
...
git-svn-id: trunk@7988 -
2007-07-09 13:27:19 +00:00
tom_at_work
2d1f9b20a3
* merged trefaddr.addr_lo/addr_hi with trefaddr.addr_low/addr.high; some related bugfixing/cleanup
...
git-svn-id: trunk@7983 -
2007-07-08 20:50:58 +00:00
daniel
f31889df57
* Pass const params by pointer if calling convention<>register. This is
...
needed for the windows unit as Delphi compatibility requires const
parameters for some procedures and Delphi assumes parameters > 4 to be
passed as pointer.
git-svn-id: trunk@7982 -
2007-07-08 17:26:08 +00:00
daniel
20a804152d
* Don't assume pointers are 8 bytes.
...
git-svn-id: trunk@7981 -
2007-07-08 09:36:27 +00:00
yury
09fa6b5893
* Fixed Abs and Sqrt in hardfloat mode on arm.
...
git-svn-id: trunk@7980 -
2007-07-08 08:17:32 +00:00
daniel
44e07cd098
* Fix bug #9141 and pass const params <=16 in by value.
...
git-svn-id: trunk@7979 -
2007-07-07 21:01:46 +00:00
daniel
6e0a7bb0eb
* Nil constants that are type converted to a method procvar are now
...
properly converted. The conversion is done at runtime to generate
a two pointer memory reference as result location, something
which the code generator can handle very well, which minimizes
the chance of side effects.
git-svn-id: trunk@7978 -
2007-07-07 20:57:05 +00:00
yury
b86574cf36
* Fixed float constants in softfloat mode when compiler was compiled in hardfloat mode on arm-linux host.
...
git-svn-id: trunk@7977 -
2007-07-07 19:19:49 +00:00
florian
499cbcbbe1
* make cycle OPT=-gwl -Co -Cr on x86-64 fixed
...
git-svn-id: trunk@7976 -
2007-07-07 19:16:49 +00:00
yury
2829f4e46f
* Fixed arm optimizer bug (mantis #9209 ). No testsuite regressions with -O2.
...
* Removed unused local vars.
+ test.
git-svn-id: trunk@7970 -
2007-07-06 13:09:28 +00:00
sekelsenmat
6096874424
Removed winlikewidestrings from symbian
...
git-svn-id: trunk@7969 -
2007-07-06 11:22:08 +00:00