Commit Graph

16956 Commits

Author SHA1 Message Date
Jonas Maebe
00ea5e1636 * made maybequoted_for_script() public
* added script_fpcres identifier
  * always quote file names for fpcres using double quotes, as it doesn't
    support single quotes (mantis #26866)

git-svn-id: trunk@28881 -
2014-10-19 16:34:43 +00:00
Jonas Maebe
7398f8d507 * fixed defines separator
git-svn-id: trunk@28877 -
2014-10-19 10:25:07 +00:00
Jonas Maebe
f1c45eeae3 * support passing [nil] to an array of class/objcclass/javaclass/intf/...
in {$mode objfpc} (mantis #19452)

git-svn-id: trunk@28862 -
2014-10-17 16:10:55 +00:00
Jonas Maebe
b0639405ac * compare the actual target nodes when checking whether the result of an
inline function is getting assigned to one of its parameters, so that
    typecasts etc. are dealt with correctly (mantis #26536)

git-svn-id: trunk@28834 -
2014-10-16 17:49:02 +00:00
joost
7c9d32b3ce * Dwarf: Write zero as line-nr for instructions with no real corresponding
line. This way a debugger will not show invalid line-information in this
   case.
 * Dwarf: Set IsStatement false for line-info for instructions that do not
   correspond to the start of a line/instruction.

git-svn-id: trunk@28824 -
2014-10-15 20:45:33 +00:00
Jonas Maebe
f6f304e0ca * check for duplicate identifiers when inserting union symtables into the
parent record symtable (mantis #26704)

git-svn-id: trunk@28820 -
2014-10-14 20:30:14 +00:00
Jonas Maebe
c43475522e * fixed uninitialized helper procedure name in case setstring() was not
called for a string after r28813

git-svn-id: trunk@28817 -
2014-10-14 18:46:16 +00:00
Jonas Maebe
ff583bde6c * made setstring() a compiler intrinsic so it can set the compile-time
code page of ansistrings (mantis #26735)

git-svn-id: trunk@28813 -
2014-10-12 20:27:06 +00:00
Jonas Maebe
5c8ae259c4 * handle GOT-relative loads in the assembler reader as reads of
sizeof(pint) bytes (mantis 23109)

git-svn-id: trunk@28789 -
2014-10-08 18:38:06 +00:00
florian
6e671e2e85 * gen_load_cgpara_loc with OS_(S)32 for 8 bit ALUs fixed
git-svn-id: trunk@28746 -
2014-10-04 18:28:21 +00:00
florian
c72d5a557a * improve spilling_get_operation_type for avr
git-svn-id: trunk@28745 -
2014-10-04 18:14:40 +00:00
florian
6b7557924e * fix assignintreg on avr
git-svn-id: trunk@28744 -
2014-10-04 18:14:11 +00:00
florian
ed11244632 * improved formatting
git-svn-id: trunk@28742 -
2014-10-04 17:52:17 +00:00
marco
ff2186ce00 * OpenBSD gets no pie. (add -nopie)
git-svn-id: trunk@28736 -
2014-10-04 11:12:14 +00:00
pierre
aa6b62cf4c Add new procedure option: po_syscall_has_libsym,
include this option only of libsym field
 is non NIL.
 Use this option to only write redef of libsym if needed.
 Adapt ppudump source to this new procedure option.

git-svn-id: trunk@28732 -
2014-10-03 19:26:16 +00:00
sergei
de42f2f2f7 * Fixed handling of sign in constant expressions in Intel x86 assembler reader. Mantis #26668.
git-svn-id: trunk@28731 -
2014-10-03 15:51:38 +00:00
sergei
d88e0df1ba * Fixed another case of emitting data without defining a section. Mantis #26473.
git-svn-id: trunk@28730 -
2014-10-03 11:19:25 +00:00
pierre
fa8d44c523 Add missing generic/specialization parameter listing
git-svn-id: trunk@28728 -
2014-10-01 12:56:51 +00:00
nickysn
c3a58bf5a8 * fixed indentation in ptype.expr_type. Prevously it looked like the 'if' is
part of the 'else' clause of the previous 'if', but it actually isn't.

git-svn-id: trunk@28727 -
2014-09-30 21:42:35 +00:00
nickysn
d1ac1bf1e0 * fixed writing rtti published property getter/setter/stored proc info in the
i8086 far code/data memory models

git-svn-id: trunk@28726 -
2014-09-30 01:47:17 +00:00
nickysn
366dc179b6 * use tai_const.Create_int_code/dataptr(0) in tai_const.Create_nil_code/dataptr
git-svn-id: trunk@28725 -
2014-09-30 01:34:20 +00:00
nickysn
27a7c0863b + added constructors tai_const.Create_int_codeptr and .Create_int_dataptr. To be
used for emitting magic consts with the size of a code or data pointer (used
  in e.g. rtti data).

git-svn-id: trunk@28724 -
2014-09-30 01:26:16 +00:00
sergei
b70c5efa65 * SPARC peephole: check that result of GetNextInstructionUsingReg is actually an instruction, because GetNextInstruction can stop at a label. Resolves #26798.
The same issue on MIPS targets was fixed by r28380, but I forgot to apply it also to SPARC.

git-svn-id: trunk@28722 -
2014-09-28 22:18:59 +00:00
sergei
beeb85f11c * Don't force CORBA (unmanaged) interfaces to be returned in parameter. All managed types including Variant and COM interfaces are already checked by handle_common_ret_in_param, superfluous checks removed.
Mantis #26593.

git-svn-id: trunk@28716 -
2014-09-26 16:03:13 +00:00
sergei
a3c439c60f - No longer insert BlockStart markers into asmlists. The presence of these markers disrupts peephole optimizations and require additional checks all over the place, causing various workarounds/hacks (like TAsmList.Create_without_marker) to start building up.
A more radical approach is to remove them altogether. Tested with i386-win32 (the oldest peephole optimizer), mips-linux (the newest one) and arm-linux (the most complex one) targets. The fallout was limited to two minor issues fixed in r28629 and r28708, respectively.

git-svn-id: trunk@28711 -
2014-09-22 21:33:50 +00:00
sergei
d37e72dbf9 * ARM: instructions do modify the base register of pre/postindexed references. Report this fact in spilling_get_operation_type_ref and RegModifiedByInstruction functions.
git-svn-id: trunk@28708 -
2014-09-22 16:18:16 +00:00
nickysn
2e0707f465 * fixed writing of dynarray rtti in the i8086 far data memory models
git-svn-id: trunk@28707 -
2014-09-22 16:12:11 +00:00
svenbarth
16774350d7 Fix for Mantis #26749 .
pgenutil.pas, generate_specialization:
  * first check whether we can reuse the current specialization or another specialization and only /then/ retrieve the symtable to specialize to

+ added test

git-svn-id: trunk@28705 -
2014-09-21 19:15:37 +00:00
sergei
b08ffa0a87 * ARM: fixed detecting Thumb-style jump tables in insertpcrelativedata() after r28546.
git-svn-id: trunk@28702 -
2014-09-21 01:59:25 +00:00
Jonas Maebe
d26e6278ba * don't free node before using its resultdef in an error message
git-svn-id: trunk@28699 -
2014-09-20 23:08:22 +00:00
sergei
4a90d7e3de + ARM internal linker: very initial support for Thumb mode, helloworld-class programs compiled with "-Cparmv6m -CIthumb" can now run.
git-svn-id: trunk@28697 -
2014-09-19 22:33:37 +00:00
sergei
ba324b1bf0 * Set default CPU type to cpu_pic32mx and FPU type to fpu_soft when compiling for mipsel-embedded, patch from Michael Ring.
git-svn-id: trunk@28692 -
2014-09-19 15:58:56 +00:00
Károly Balogh
c22dd6f022 PowerPC: in MorphOS syscalls the explicit paraloc size should always be OS_ADDR
git-svn-id: trunk@28686 -
2014-09-18 10:25:28 +00:00
Károly Balogh
8acc260a09 m68k: added the byterev and ff1 CF ISAA+/ISAC instructions, also added byterev as a CPU capability
git-svn-id: trunk@28679 -
2014-09-16 01:39:02 +00:00
sergei
f85a8159ef * compiler/mips/cpuinfo.pas: removed "FPU_" prefixes from FPU names, not necessary because compiler inserts one itself.
* rtl/embedded/system.pp: removed (commented out) FPU initialization from initialization of system unit, was dead code anyway because FPC_HAS_FEATURE_FPU is never defined and "feature FPU" does not exist.
* rtl/mips/*.inc: don't compile FPU instructions if compiling RTL with -CfNONE or -CfSOFT (however, handling these switches for MIPS targets in compiler needs further fixing).

git-svn-id: trunk@28670 -
2014-09-15 18:24:23 +00:00
Károly Balogh
3b205742b6 m68k: also try to optimize a special case of OP_SAR using the SWAP instruction
git-svn-id: trunk@28657 -
2014-09-14 12:47:07 +00:00
Károly Balogh
1b0a1f4508 ARM: mimic what GNU C does while calling the profiling mcount on ARM
git-svn-id: trunk@28648 -
2014-09-13 00:17:10 +00:00
sergei
0b4d54fcb9 - Delete all position markers from assembler code before optimization. Markers of this kind are not used by optimizer and are expected to be ignored, but ignoring them requires numerous checks in all target-specific optimizers and currently isn't done correctly. In turn, failure to ignore markers prevents optimization of procedure prologues and epilogues.
git-svn-id: trunk@28647 -
2014-09-12 23:15:23 +00:00
Károly Balogh
739c66291d ARM: first naive attempt to get gprofiling work for arm-linux. (Work-In-Progress, but at least for me it doesn't explode)
git-svn-id: trunk@28645 -
2014-09-12 18:51:02 +00:00
sergei
11201164e7 * Fixed type of parameter passed to FPC_CHECKPOINTER after r23325, must be the pointer itself, not what it points to. Was causing IE 200306031 when compiling for i386 with -gc.
git-svn-id: trunk@28644 -
2014-09-12 18:50:09 +00:00
sergei
6fd8a26ae1 + internal assembler: early check for empty asmlists.
git-svn-id: trunk@28629 -
2014-09-08 23:26:20 +00:00
sergei
84245a6e0c * MIPS: doing progress with peephole optimizer.
git-svn-id: trunk@28628 -
2014-09-08 23:24:43 +00:00
sergei
8f1e058ac2 * Don't place symbols with vo_force_finalize flag into read-only sections, resolves #26691.
git-svn-id: trunk@28626 -
2014-09-08 19:41:24 +00:00
sergei
5479b6e722 * Provide initialization of all variables, fixes cycling with OPT="-dTEST_WIN32_SEH -OoDFA".
git-svn-id: trunk@28622 -
2014-09-08 18:08:12 +00:00
Károly Balogh
d561e8ab57 m68k: generate smarter shifting/rotation code on 68k, for example by utilizing the SWAP instruction
git-svn-id: trunk@28617 -
2014-09-07 23:46:46 +00:00
Károly Balogh
f91ae2700c m68k: added CPUM68K_HAS_ROLROR capability flag
git-svn-id: trunk@28616 -
2014-09-07 23:45:51 +00:00
svenbarth
684c8842e7 Fix for Mantis #26599.
pgenutils.pas, check_generic_constraints:
  * correctly handle forward defs if the constraint is either a single IInterface/IUnknown or a TObject/class

+ added tests

git-svn-id: trunk@28601 -
2014-09-05 14:42:22 +00:00
Károly Balogh
77088cf723 * bumped PPU version because r28596 breaks compatibility on Amiga/68k and MorphOS
git-svn-id: trunk@28597 -
2014-09-05 02:39:35 +00:00
Károly Balogh
05b3a94843 * changed explicit paraloc handling to use ppuload/ppuwrite functions in paraloc instead of directly writing the data. this hopefully fixes some endian issues when using crosscompiled-on-littleendian PPUs with explicit paralocs on bigendian systems (this means Amiga/68k and MorphOS)
git-svn-id: trunk@28596 -
2014-09-04 23:09:05 +00:00
sergei
3ede5ec99b * MIPS peephole: refactored/simplified and added (another) couple of optimizations.
git-svn-id: trunk@28591 -
2014-09-03 20:00:42 +00:00