Commit Graph

39109 Commits

Author SHA1 Message Date
florian
81e0e3114c * throw an error if threadvars are used but not supported
* fix building for arm-embedded

git-svn-id: trunk@23452 -
2013-01-19 15:17:47 +00:00
pierre
9e6a2b868c Fix -Cp option failure due to cputypestr array that must be uppercased
git-svn-id: trunk@23446 -
2013-01-18 17:09:28 +00:00
michael
5df0afb5c6 * Corrected statements for tables and system tables
git-svn-id: trunk@23445 -
2013-01-18 16:38:04 +00:00
pierre
bb418a1c94 Try to convert dllprt0.as code to PIC
git-svn-id: trunk@23444 -
2013-01-18 15:02:26 +00:00
pierre
5d3a94f9e4 Regenerated after: Use -KPIC option for dllprt0.as for mips/mipsel
git-svn-id: trunk@23443 -
2013-01-18 15:01:45 +00:00
pierre
84d21fad21 Use -KPIC option for dllprt0.as for mips/mipsel
git-svn-id: trunk@23442 -
2013-01-18 15:01:22 +00:00
michael
164c677cfd * Enable property setter by default
* Fixed index in list class

git-svn-id: trunk@23440 -
2013-01-18 14:43:34 +00:00
michael
49e3d2734e * Added possibility to force use of setter/getter for properties.
* Added possibility to add a line of text in the property setter. (%PROPNAME%)
* Fixed TCodeOptions.Assign, missing a couple of properties.
* Fixed name of setter routine

git-svn-id: trunk@23439 -
2013-01-18 14:42:13 +00:00
paul
7c663af588 compiler: also don't allow record constructors with only default arguments
git-svn-id: trunk@23438 -
2013-01-18 11:59:25 +00:00
paul
fe338013a5 compiler: calculate offset of record fields in taddrnode also for bitpacked structures (Jonas comment in bug #0019357)
git-svn-id: trunk@23437 -
2013-01-18 01:56:55 +00:00
paul
1b8369dd99 compiler: don't allow parameterless constructors
git-svn-id: trunk@23436 -
2013-01-18 01:24:04 +00:00
svenbarth
83af4e93f7 rtl/m68k/m68k.inc:
* InterlockedIncrement & InterlockedDecrement: return the modified value, not the original one

git-svn-id: trunk@23432 -
2013-01-17 21:19:27 +00:00
svenbarth
f5e94a02cd rtl/m68k/m68k.inc:
* fillchar & fillword: check whether the count is 0 before filling anything

This fixes cases like "Writeln('')" which is used inside InternalExit if an unhandled exception happened.

git-svn-id: trunk@23431 -
2013-01-17 21:17:13 +00:00
Jonas Maebe
583eb3f9a4 * re-enabled loadvmtaddrnode for records on JVM targets, fixes
tests/test/jvm/tpvar.pp after r23417

git-svn-id: trunk@23430 -
2013-01-17 19:45:09 +00:00
paul
65cbb4e9ba compiler: calculate offset of record fields in taddrnode (based on patch of Jeppe Johansen, fixes bug #0019357)
git-svn-id: trunk@23428 -
2013-01-17 14:30:55 +00:00
paul
3a3c10a474 compiler: don't allow constants, methods, class members and properties for local or anonymous records (fixes bug #0023000)
git-svn-id: trunk@23421 -
2013-01-17 09:05:59 +00:00
marco
146011d523 * two constants added.
git-svn-id: trunk@23420 -
2013-01-17 08:46:39 +00:00
pierre
53b65300a6 + Add mips-linux gcc compiled objects
git-svn-id: trunk@23419 -
2013-01-17 08:24:07 +00:00
pierre
dcd3783c6e + mispel-linux gcc compiled objects added
git-svn-id: trunk@23418 -
2013-01-17 08:21:24 +00:00
paul
4d79a44e4c compiler: don't create loadvmtaddrnode for record references, they have no VMT (fixes bug #23130)
git-svn-id: trunk@23417 -
2013-01-17 07:30:00 +00:00
paul
890e91ab8c tests: fix test after allowing record helpers to have constructors
git-svn-id: trunk@23416 -
2013-01-17 01:45:05 +00:00
florian
cad1309935 * don't write directly to the function result destination if we are inlining and if the destination is too complex to evaluate (threadvar etc.)
git-svn-id: trunk@23415 -
2013-01-16 20:25:49 +00:00
florian
247d6dd394 + implemented a tcasenode.printnodetree printing all cases
git-svn-id: trunk@23414 -
2013-01-16 20:24:56 +00:00
florian
abfa6c1b43 * redo LsrAnd2Lsr optimization
git-svn-id: trunk@23413 -
2013-01-16 20:24:07 +00:00
sekelsenmat
0921df3191 Fixes a spelling mistake in TFPCustomFont
git-svn-id: trunk@23411 -
2013-01-16 15:10:42 +00:00
masta
fe520c215b New ARM Peephole optimizer FoldShiftLdrStr
This one folds
      mov r1, r2, lsl #2
      ldr/ldrb r0, [r0, r1]
into
      ldr/ldrb r0, [r0, r2, lsl #2]

There is still some room for improvement, maybe it would be better to do this before
the register allocator runs, as we'll currently waste a register (r1 in the above example)
in many cases. That would also allow to to fold more operations, because currently if r2
gets reused between the mov and ldr we'll not be able to do the optimization.

git-svn-id: trunk@23408 -
2013-01-16 14:37:28 +00:00
paul
e9615716c1 compiler: allow constructors in helpers for records
git-svn-id: trunk@23407 -
2013-01-16 13:47:22 +00:00
michael
cce67cf5ae * Fixed case where connection is closed gracefully (Bug ID 23386)
git-svn-id: trunk@23403 -
2013-01-16 10:57:47 +00:00
pierre
2b300ec2b4 Add breakpoint at Verbose.GenerateError procedure
git-svn-id: trunk@23399 -
2013-01-16 09:46:34 +00:00
pierre
6d8b1e03d7 Increase status.errorcount only inside GenerateError procedure, to simplify debugging
git-svn-id: trunk@23398 -
2013-01-16 09:45:57 +00:00
Almindor
235bda8746 * remove old cdecl record hack, fixes linker errors with aspell on mac os x
git-svn-id: trunk@23397 -
2013-01-16 04:44:49 +00:00
paul
38da152b11 tests: fixed test
git-svn-id: trunk@23396 -
2013-01-16 03:46:35 +00:00
paul
b2a613c17f compiler: implement record constructors + tests
git-svn-id: trunk@23395 -
2013-01-16 02:07:42 +00:00
paul
51825b6f2e compiler: change ret_in_param to accept tabstractprocdef instead of tproccalloption to allow check more options (required for record constructor implementation)
git-svn-id: trunk@23394 -
2013-01-16 01:14:23 +00:00
sergei
4c84febfae * InterlockedIncrement/Decrement must return the modified value, not the initial one. Fixes a number of interface memory leaks in MIPS test suite. The functions remain not thread-safe yet.
git-svn-id: trunk@23393 -
2013-01-15 19:17:57 +00:00
sergei
b35d04ffa8 * MIPS: methodpointers must be compatible with records; since records are never passed by address in this ABI, so must be methodpointers. Fixes webtbs/tw9141.pp.
git-svn-id: trunk@23392 -
2013-01-15 19:09:19 +00:00
sergei
d2758265e3 * MIPS int->real conversion: When converting unsigned to single, load it into 64-bit FP register, otherwise further subtracting a 64-bit offset leads to invalid result. Fixes tw17714.pp.
* The addend is endian-dependent, fixes tcnvint4.pp on big-endian targets.

git-svn-id: trunk@23388 -
2013-01-15 10:49:37 +00:00
sergei
b5eecab582 * Procvars (methodpointers) must be treated as records, too. Fixes tw12318.pp and tw14155.pp after r23377.
* Factored related code into a separate method, as it will probably need further refinement.

git-svn-id: trunk@23387 -
2013-01-15 10:39:14 +00:00
svenbarth
c7a9e17bc5 Patch by Vasiliy Kevroletin. Fixes Mantis #23655.
compiler/node.pas, tnode.printnodeinfo:
  * write flags to file "t" instead of stdout

git-svn-id: trunk@23384 -
2013-01-15 06:04:10 +00:00
svenbarth
ccecf2c13c Fix comparisons (aka usage of flag/CCR register)
m68k/aasmcpu.pas, taicpu.spilling_get_operation_type:
  * add all Sxx instructions as "operand_write" instructions

m68k/n68kadd.pas, t68kaddnode.getresflags:
  * use the correct operation in case of swapped nodes

m68k/cgcpu.pas, tcg68k.g_flags2reg:
  - don't move a 0 to the register, because this will CLR it and thus the flags won't be valid anymore...
  - NEG would have been the wrong operation (NOT would have been correct), but it isn't needed anyway...
  * simplify the method by handling the address register case only when necessary

git-svn-id: trunk@23383 -
2013-01-14 20:31:15 +00:00
svenbarth
741992bae4 m68k/n68kmat.pas, tm68kshlshrnode.first_shlshr64bitint:
use RTL helper functions (through the inherited method) if we're not shifting by a constant

This fixes test/cg/tshlshr

git-svn-id: trunk@23378 -
2013-01-13 19:33:23 +00:00
sergei
162896e7d7 * MIPS code generator fixes and improvements:
- removed a_jmp_cond, it's not virtual and not applicable to this CPU.
* a_loadfpu_reg_cgpara: use direct register moves for simple destinations.
* g_concatcopy: don't take address of source/destination for small amounts of data if possible, for single 32-bit moves this reduces number of generated instructions from 4 to 2.
* g_intf_wrapper: 'Self' is in R4 (a0), not R2. Fixes test/tinterface1.pp.

* mips/cpupara.pas: for functions with result returned in parameter, pass its address in a0 only if result is a record. ABI does not specify behavior for types except records/unions. At the same time, Pascal code relies on the fact that results like strings/interfaces does not change their locations, i.e. "function foo(<self>): IInterface" can be invoked as "procedure foo(<self>, out obj)". This fixes test/tdel1.pp and some Variant-related tests.

git-svn-id: trunk@23377 -
2013-01-13 18:24:06 +00:00
sergei
32ffddaad8 + ELF linker back-ends for ARM and MIPS.
ARM status: roughly corresponds to i386 one, passes the test suite. Handles libraries, can link static libc code including basic PIC and TLS IE/LE stuff. Completely misses Thumb support. Also does not handle ABI-specific stuff, for this reason internally linked .so cannot be used for linking executables with ld. Little-endian only. Tested only on "versatilepb" QEMU virtual machine.

MIPS status: can link the compiler and at least some dynamic executables including fpmake. Some PIC support is present but almost untested. Specific header flags and sections are also not handled yet. Written to handle both endian, but tested for big-endian only ("malta" QEMU VM), including cross-linking from x86_64.

git-svn-id: trunk@23376 -
2013-01-13 18:05:19 +00:00
sergei
af4935e346 + Support dynamic copy relocations.
* For unresolved weak symbols, provide dynamic binding only if they are referenced via GOT or PLT (ld-compatible behavior).
* Made more TElfExeOutput properties/methods usable by descendant classes.
* x86_64/cpuelf.pas: some refactoring, handle DTPOFF relocations, prohibit TPOFF relocations in shared objects.
* i386/cpuelf.pas: set symref_from_text flags for copy relocations to work correctly.

git-svn-id: trunk@23375 -
2013-01-13 17:44:14 +00:00
sergei
a1503b51f2 + chmod 755 on executable files produced by internal linker. I missed this "small" detail for half a year because all development was going on a NTFS drive where everything is executable.
git-svn-id: trunk@23374 -
2013-01-13 17:18:11 +00:00
svenbarth
252744ad24 m68k/cgcpu.pas, tcg68k.g_concatcopy:
use the correct flag for the copy loop: we jump back to the copy code as long as the value is positive aka BPL instead of BMI

This fixes around 30 tests (it fixes a quite bit more, but now some other tests seem to be broken...)

git-svn-id: trunk@23373 -
2013-01-13 16:21:59 +00:00
marco
72d1b249db * Unblockfile to programmatically unblock MSIE downloads
git-svn-id: trunk@23372 -
2013-01-13 12:55:31 +00:00
marco
f08a1ed7c9 * fixed minor mistake in comment. Mantis #23631
git-svn-id: trunk@23371 -
2013-01-13 12:46:56 +00:00
sergei
4b925763c3 + Enable CPU-specific descendants to write specific dynamic tags.
+ Read version definitions from shared objects.

git-svn-id: trunk@23370 -
2013-01-13 06:36:39 +00:00
michael
0ee95ca5f9 * Undid patch to resolve dotted unit names, it breaks generation of FPC documentation
git-svn-id: trunk@23369 -
2013-01-12 16:08:40 +00:00