Commit Graph

14889 Commits

Author SHA1 Message Date
florian
d4613fe961 * update init_settings.setalloc in SetCompileMode if changeinit is set
git-svn-id: trunk@23898 -
2013-03-17 16:42:34 +00:00
florian
5a6e879248 * patch by Aleksa Todorovic: store relative include paths in PPUs, resolves #9961
git-svn-id: trunk@23897 -
2013-03-17 16:22:00 +00:00
florian
fdde11fcc8 - -CPPAKCSET=NORMAL and CPPAKCSET=DEFAULT should set setalloc to 0 as $PACKSET=... with the same parameters does
git-svn-id: trunk@23893 -
2013-03-17 15:10:33 +00:00
florian
7511968f2b + warn if one of the linux libc startup code files is not found
git-svn-id: trunk@23892 -
2013-03-17 14:51:19 +00:00
florian
20a534e63f * fixed code which causes range check errors when compiled with -Cr
git-svn-id: trunk@23889 -
2013-03-17 14:24:50 +00:00
Jonas Maebe
e1e11f81e3 * fixed using readstr/writestr inside routines called from the parameter
list of another readstr/writestr expression (mantis #23912)

git-svn-id: trunk@23888 -
2013-03-17 14:23:33 +00:00
florian
784641ec46 * delay parsing of the closing SEMICOLON of a uses clause till the
unit map is updated to avoid symbols not being found, resolves #8611

git-svn-id: trunk@23886 -
2013-03-17 11:06:04 +00:00
sergei
1c652eb8f9 MIPS procinfo improvements:
- Removed TMIPSProcInfo.needs_frame_pointer, it duplicates pi_needs_stackframe flag.
- Don't save RA for leaf procedures.
* GP is caller-saved register, it does not need saving/restoring as nonvolatile registers. Handle its restore position as a "normal" temp, whose offset is known before secondpass. This allows to handle PIC calls without involving GAS macro processing.

git-svn-id: trunk@23885 -
2013-03-17 08:43:39 +00:00
florian
d5985b4f0e * patch by Christophe Staïesse to implement more ISO-like read behaviour in iso mode, resolves #24060
git-svn-id: trunk@23884 -
2013-03-17 08:27:21 +00:00
florian
380bc56e32 + create a default heap on embedded targets and register this default heap
* sysutils for the embedded target depends on a working heap manager

git-svn-id: trunk@23853 -
2013-03-16 10:37:18 +00:00
masta
d60049a1fd Removing duplicated hash functions in compiler/cclasses.pas
FPHash was duplicated 4 times for different input types. I've
consolidated it to a single function with 3 proxy-functions which can be
inlined.

I've also modified the hash function itself slightly, it now resembled
the original DJB hash and seems to perform a tiny bit better.

git-svn-id: trunk@23850 -
2013-03-16 00:50:45 +00:00
pierre
8e2fcd6bfe Enable use of dllprt0 for netbsd
git-svn-id: trunk@23848 -
2013-03-15 16:21:22 +00:00
pierre
18ece9cf75 Also use VERSION in scripts for openbsd and netbsd
git-svn-id: trunk@23844 -
2013-03-15 15:39:32 +00:00
pierre
1ad6aacb78 * Also use dllprt0 for openbsd
git-svn-id: trunk@23829 -
2013-03-14 13:51:16 +00:00
sergei
6245bfd74f + ELF linker: load e_ident and e_flags from ELF header into properties of TElfObjData, necessary for targets that must be able to link together object files of different flavors.
git-svn-id: trunk@23821 -
2013-03-14 08:34:17 +00:00
paul
e379daaf9c compiler, rtl: move cpXXXX.pas files from compiler to RTL\charmaps directory and cleanup them, enable charmaps building for the majority of targets
git-svn-id: trunk@23799 -
2013-03-12 01:35:25 +00:00
paul
3682fddc49 compiler: minor optimization of tscannerfile.recordtoken
git-svn-id: trunk@23798 -
2013-03-12 01:32:07 +00:00
florian
2c7b34cda1 * don't apply cse on static variables being regable
git-svn-id: trunk@23785 -
2013-03-10 20:29:52 +00:00
florian
c2baf7b4c0 Merge r23058
git-svn-id: trunk@23776 -
2013-03-10 16:37:57 +00:00
florian
c0d4f189e9 * and takes three operands
git-svn-id: trunk@23775 -
2013-03-10 16:16:50 +00:00
florian
be81b89147 * fix bugs in previous commit
git-svn-id: trunk@23774 -
2013-03-10 14:33:10 +00:00
florian
086ae4b999 Merge r22905 and r22906
git-svn-id: trunk@23773 -
2013-03-10 10:45:34 +00:00
sergei
5e46732bc8 + One more missing call to unget_para (MIPS-specific)
git-svn-id: trunk@23766 -
2013-03-10 04:08:43 +00:00
florian
21c154d60a Merged r22903
git-svn-id: trunk@23757 -
2013-03-09 20:56:07 +00:00
florian
08bf826334 Merges 22828,22829
git-svn-id: trunk@23756 -
2013-03-09 20:49:57 +00:00
svenbarth
364a874623 Addendum to 23746: use FPC_FULLVERSION instead of FPC_VERSION/FPC_RELEASE
git-svn-id: trunk@23747 -
2013-03-09 15:45:24 +00:00
svenbarth
b298483bb8 Allow compilation of the compiler with 2.6.x again on Unix systems.
compiler.pas:
	check for "FPC_VERSION>2 or FPC_RELEASE>6" before using unixcp

git-svn-id: trunk@23746 -
2013-03-09 15:33:13 +00:00
Jonas Maebe
1244cdff70 * don't treat bitpacked arrays of subranges of char that can be represented
using less than 8 bits per element the same as regular char arrays as far
    as automatic type conversions are concerned (they have to be explicitly
    packed/unpacked) (mantis #24013)

git-svn-id: trunk@23739 -
2013-03-09 10:37:30 +00:00
sergei
2caa05ccd1 * Make Win64 SEH support enabled by default. If necessary to disable, compiler should be cycled with OPT=-dDISABLE_WIN64_SEH. Mantis #24012.
git-svn-id: trunk@23732 -
2013-03-08 16:58:05 +00:00
paul
43e0116f61 compiler: update charset, cruemap and cpXXX.pas files from Inoussa (part of issue #0022909)
git-svn-id: trunk@23727 -
2013-03-08 13:10:39 +00:00
paul
1481a6a066 compiler: rename cp1252, cp1253 pp files to pas for consistency
git-svn-id: trunk@23726 -
2013-03-08 12:25:18 +00:00
Jonas Maebe
3cde2b2d84 * fixed check for bitpacked accesses (mantis #24007)
git-svn-id: trunk@23705 -
2013-03-07 15:44:41 +00:00
Jonas Maebe
5d628b29bb * set the subregsize of OS_M64 SSE registers to R_SUBQ so we can
differentiate between 64 bit and 128 bit (R_SUBMMWHOLE) SSE vector regs,
    and support spilling/assembling for R_SUBQ SSE registers (8 bytes)
    (mantis #23962)

    We currently never use the full 128 bit of an SSE register, and
    spilling for those hasn't been implemented yet either (R_SUBMMWHOLE
    SSE regs are spilled into a 4-byte temp currently -> can overwrite data)

git-svn-id: trunk@23700 -
2013-03-06 12:42:46 +00:00
sergei
823e3ea398 MIPS: reworked PIC/call code:
+ Favor 'weak' parameter in a_call_name of both thlcgmips and TCGMIPS.
* make_simple_ref and a_loadaddr_ref_reg: require input references to be 'raw' (no refaddr=addr_pic, etc) and do not use GP as base/index. If it's not true, raise an internal error. When addr_pic_call16 or so needs to be generated, it must be done without calling the mentioned methods.
* thlcgmips.a_call_name: generate PIC sequence for procedures declared as 'external', instead of 'cdecl', this is more correct because ABI has only one calling convention.
- make_simple_ref_fpu removed, there's no reason to handle references to floating-point data in different way.
- a_loadaddr_ref_cgpara override also removed, generic method does the job just well.
- thlcgmips.a_call_ref and a_call_reg overrides removed because indirect calls are now always done using $t9.

git-svn-id: trunk@23698 -
2013-03-05 19:31:20 +00:00
sergei
a1b50f643e - removed never used function.
git-svn-id: trunk@23697 -
2013-03-05 18:05:52 +00:00
yury
63d1c3aa94 * Set default CPU armv5t for arm-android. Issue #23973.
git-svn-id: trunk@23693 -
2013-03-04 21:46:36 +00:00
sergei
6fcd9979dd + MIPS: doing progress with linker, implemented processing of local symbols in PIC code and stuff needed to link shared libraries.
git-svn-id: trunk@23690 -
2013-03-04 20:48:33 +00:00
yury
268b2d56d7 * Fixed displaying of compilation time in some cases. For example, if the compilation time is 0.99 seconds, it has been displayed as 0.10. Now it is correctly displayed as 1.0.
git-svn-id: trunk@23689 -
2013-03-04 16:02:51 +00:00
svenbarth
168c9d152f Small optimization for the search of operator overloads. Add a flag "sto_has_generic" to all symtables that contain an operator overload (the flag propagates up the owning symtables) and check this flag when searching for units with operators.
symconst.pas:
  + add "sto_has_operator" to "tsymtableoption"
pdecsub.pas:
  + include the flag "sto_has_operator" for all operator declarations and their owning symtables
htypechk.pas, tcallcandidates:
  * create_candidate_list: only check for operator overloads if the record does indeed declare some
  * collect_overloads_in_units: only check for operator overloads if the unit does indeed declare some
utils/ppudump.pp:
  + respect the new "sto_has_operator" flag

git-svn-id: trunk@23688 -
2013-03-04 16:02:18 +00:00
florian
9198630ce3 * fix armv7m compiler
git-svn-id: trunk@23686 -
2013-03-03 21:59:34 +00:00
sergei
6484911f05 * TExeOutput.FixupRelocations method made virtual.
* TElfExeOutput.MemPos_Start split into four smaller methods.

git-svn-id: trunk@23684 -
2013-03-03 20:01:54 +00:00
florian
1eeeb309c7 * intial armv6m support, it is not working yet, constant pool insertation and conditional branch fixup is not working yet
git-svn-id: trunk@23682 -
2013-03-03 12:20:10 +00:00
sergei
1421998752 * MIPS register spilling: relocations are not needed to load constant values, and offset limit is 32767, not 4095.
git-svn-id: trunk@23675 -
2013-02-28 20:43:38 +00:00
yury
ee0a338127 * Use the unixcp unit to set a default code page for ansistrings on unix-like systems.
git-svn-id: trunk@23671 -
2013-02-28 18:24:29 +00:00
sergei
5812cf3b46 * MIPS: allocate 16-byte outgoing parameter area also for procedures declared as 'assembler' without 'nostackframe'. This is a half-measure because there is no way to determine correct size to allocate for such procedures (probably we must add some directive to specify it). The same generally applies to all targets with fixed stack, not just MIPS.
git-svn-id: trunk@23663 -
2013-02-25 22:47:09 +00:00
sergei
d2995cbf14 - Removed ConcatPasString procedure, it duplicates ConcatString (it the past they probably used to differ, but today both preserve null characters).
git-svn-id: trunk@23662 -
2013-02-25 22:09:39 +00:00
sergei
d190d4676b - MIPS: removed comment generation in function prologues, it clutters listing more than it helps. Also removed some unused variables.
git-svn-id: trunk@23661 -
2013-02-25 21:40:03 +00:00
sergei
354ebb822a * MIPS: fixed layout of stack frame in case procedure does only low-level calls (via a_call_name, etc.). A 16-byte outgoing parameter area must be allocated regardless of actual parameter count.
* Abort if attempting to emit a call without pi_do_call flag set, because the outgoing parameter area determines layout of temps and therefore cannot be created/changed during pass 2.
* Bypass g_concatcopy_move if procedure is a leaf one, due to the restriction mentioned above.

git-svn-id: trunk@23644 -
2013-02-21 20:57:38 +00:00
sergei
69c8f6cf7d * Typo in previous commit
git-svn-id: trunk@23639 -
2013-02-20 23:03:45 +00:00
sergei
d7c96dea8b * MIPS: refactoring: removed handle_load_store and handle_load_store_fpu.
git-svn-id: trunk@23637 -
2013-02-20 20:59:33 +00:00