Commit Graph

40569 Commits

Author SHA1 Message Date
Jonas Maebe
4c7605d6bf * fixed duplicate StringToTB definition error in r22467; only kept the
new StringToTB implementation (rawbytestring), because it ensures we
    don't overflow the transfer buffer size

git-svn-id: branches/cpstrrtl@24988 -
2013-06-27 21:37:25 +00:00
Jonas Maebe
b0613d9ec5 * converted Windows FileCreate/FileOpen to use unicode interface instead of
ansistring

git-svn-id: branches/cpstrrtl@24969 -
2013-06-24 21:24:13 +00:00
Jonas Maebe
ff87431565 - removed "PathOnly" field from Unix TSearchRec (deprecated since 2.4.0, not
initialised or used on any target))

git-svn-id: branches/cpstrrtl@24968 -
2013-06-24 21:24:09 +00:00
Jonas Maebe
e65d01a717 * small optimisation for ToSingleByteFileSystemEncodedFileName(rawbytestring):
don't call SetCodePage() if the input already has the correct code page
    (SetCodePage would always make the string unique, which is not necessary)

git-svn-id: branches/cpstrrtl@24962 -
2013-06-24 09:40:06 +00:00
Jonas Maebe
980975ff85 * fixed fpc_UnicodeStr_SetLength for 2.6.x bootstrapping
git-svn-id: branches/cpstrrtl@24961 -
2013-06-24 09:40:03 +00:00
Jonas Maebe
3694b4f003 * moved ToSingleByteFileSystemEncodedFileName() to the system unit and
export it so it can be used in all rtl units

git-svn-id: branches/cpstrrtl@24960 -
2013-06-24 09:40:00 +00:00
Jonas Maebe
e6c812a60a * assume unicode in case of FPC_OS_UNICODE instead of only for WinCE
git-svn-id: branches/cpstrrtl@24959 -
2013-06-24 09:39:57 +00:00
Jonas Maebe
112fafc6fd + paramstr(longint):unicode string function in uuchar
* optimised objpas.paramstr (let the compiler convert the pchar to
    ansistring instead of using an unoptimised loop)

git-svn-id: branches/cpstrrtl@24958 -
2013-06-24 09:39:54 +00:00
Jonas Maebe
5a72bc3656 * export filerec/textrec from the system unit and use them in the compiler
to determine their size, rather than hardcoding the size for all possible
    configurations

git-svn-id: branches/cpstrrtl@24957 -
2013-06-24 09:39:50 +00:00
Jonas Maebe
eae1cd6cca * msdos target was added after the cpstrrtl branch was created; no special
defines

git-svn-id: branches/cpstrrtl@24914 -
2013-06-18 10:57:49 +00:00
Jonas Maebe
ecd3cba02b * synchronised with trunk up to r24912
o resolved conflict in updated morphos sysutils unit
   o moved code that had been added to the now deleted  sysunix.inc to the
     unix-specific block of the fpwidestring unit's init code

git-svn-id: branches/cpstrrtl@24913 -
2013-06-17 20:50:02 +00:00
pierre
91bc424694 Fix bug report 24612:
hermes package has compile error with introduced at r24910.
  Solved by checking that the procdef is not declared forward.

git-svn-id: trunk@24912 -
2013-06-17 15:21:07 +00:00
pierre
4892461009 Fix error in script about check if C compiler is GNU
git-svn-id: trunk@24911 -
2013-06-17 08:18:30 +00:00
florian
37df6f6455 * nostackframe now results in an error if used on pascal subroutines
git-svn-id: trunk@24910 -
2013-06-16 18:59:03 +00:00
florian
fc72490166 * handle LOC_*FPUREGISTER correctly when using sse2 sqr, resolve #26408
git-svn-id: trunk@24909 -
2013-06-16 18:48:08 +00:00
mazen
9c4052b505 + Added a new directive, CFGDIR, to configuration file allowing user to add a directory to a list where included configuration files are searched.
git-svn-id: trunk@24908 -
2013-06-16 15:43:10 +00:00
florian
9b6094a58c + added a few BMI instructions to see if they can be encoded
git-svn-id: trunk@24907 -
2013-06-16 09:35:21 +00:00
florian
0a84f1f10c + avx uses add to multiply by 2
* formatting

git-svn-id: trunk@24906 -
2013-06-15 21:18:40 +00:00
michael
7e72f856ce * Fix for bug ID #24603 (initialize result of TJSONObject.DoFormatJSON)
git-svn-id: trunk@24905 -
2013-06-15 16:14:35 +00:00
sergei
121271c38f * MIPS case node: simplified code a bit.
* Moved jump tables into data segment. For disassembly-based stack unwinding to work properly, MIPS ABI expects text segment to contain instructions only.

git-svn-id: trunk@24904 -
2013-06-15 12:36:21 +00:00
sergei
5bcae5a80a - Removed TMIPSParaManager.getintparaloc method, its generic implementation from r24716 works without issues.
git-svn-id: trunk@24903 -
2013-06-15 12:24:19 +00:00
nickysn
e291805880 * i8086 compilation fixed after r24896
git-svn-id: trunk@24902 -
2013-06-15 10:33:18 +00:00
sergei
a4217da7df * Factored repeating code into separate procedure (IsJumpToLabel)
- Assigned(x) check before "x is y" is redundant because "is" operator does the same check.

git-svn-id: trunk@24901 -
2013-06-15 07:02:47 +00:00
sergei
8b8553991a + MIPS: prevent coalescing written-to registers with $sp,$fp,$zero and $at.
+ Implemented subset of "spill replace" functionality, replacing moves from/to spilled registers with loads/stores to spill locations. This helps to reduce amount of instructions.

git-svn-id: trunk@24900 -
2013-06-15 04:04:08 +00:00
florian
0af7a6f92c + has_life_info
* successor info for for nodes fixed

git-svn-id: trunk@24899 -
2013-06-14 20:52:40 +00:00
florian
3016d48521 * clear optinfo after allocating it
git-svn-id: trunk@24898 -
2013-06-14 20:52:38 +00:00
florian
d8ff85846f * don't reuse mm registers used by child nodes
git-svn-id: trunk@24897 -
2013-06-14 20:52:36 +00:00
florian
e81d2d1f3b * basic avx support for floating point operations (use -Cfavx to activate)
git-svn-id: trunk@24896 -
2013-06-14 20:03:01 +00:00
sergei
6a8e4f0381 * MIPS: generate real instructions, not macros, for comparisons with $zero.
* g_concatcopy, g_concatcopy_unaligned: call a_cmp_reg_reg_label instead of duplicating code.

git-svn-id: trunk@24895 -
2013-06-14 07:27:48 +00:00
sergei
fb88cc4257 * TCGMIPS.a_load_reg_reg: reduce code duplication, and don't generate same register move for OS_32->OS_S32 and vice versa. Such moves explode into at least 4 instructions if register needs spilling, after which they are no longer recognized and cannot be removed by reg.allocator. So it's much better not to generate them in first place.
* Implemented overflow checking for multiplication, no longer generate MULO and MULOU macros.

git-svn-id: trunk@24894 -
2013-06-14 00:12:17 +00:00
sergei
7e0ae2e984 * MIPS: fixed cgsize2subreg to return correct result for float registers.
- TCGMIPS.getfpuregister override is no longer necessary with the above fix.

git-svn-id: trunk@24893 -
2013-06-13 23:50:20 +00:00
svenbarth
b6bfa864d4 Disallow the usage of the inline assembler inside generics, because there are currently two problems:
1. At least on x86 the assembler reader initializes the parameter location informations which results in InternalError 200301231
2. Assembler tokens are not stored in the token stream and thus won't be reproduced during specialization

x86/rax86int.pas, tx86intreader.Assemble:
  * check for "parse_generic" before calling generate_parameter_info
pstatmnt.pas, assembler_block & statement:
  * generate an error message if an asm statement should be parsed inside a generic

+ added test

git-svn-id: trunk@24892 -
2013-06-13 19:42:49 +00:00
florian
caef53e63b * another patch by Max Nazhalov to fix missing exits in the softfpu code
git-svn-id: trunk@24891 -
2013-06-13 19:40:17 +00:00
florian
7f6aa98553 * restored changes made in r24864 which I accidently overwrote with r24871
git-svn-id: trunk@24890 -
2013-06-13 18:38:35 +00:00
michael
30621e2e06 * Patch from Reinier OlieSlagers to correct message in case of not equals (bug ID 24433)
git-svn-id: trunk@24889 -
2013-06-13 14:43:21 +00:00
lacak
f95f42d72b fcl-db: tests: introduce TDBBasicsTestCase as ancestor for other test cases (call DBConnector.StartTest and StopTest from him)
git-svn-id: trunk@24888 -
2013-06-13 11:46:42 +00:00
svenbarth
2e186a91fa Add support for integer constants to SetPEFlags and SetPEOptFlags. This is Delphi compatible.
scandir.pas:
  + add function "get_peflag_const" to retrieve the value of a constant
  * dir_setpeflags & dir_setpeoptflags: first check for an identifier (value is retrieved through "get_peflag_const") and then read a value

+ added messages for illegal parameters for SetPEFlags and SetPEOptFlags respectively
+ added tests

git-svn-id: trunk@24887 -
2013-06-13 10:51:42 +00:00
nickysn
4840a33b80 * also return true in is_calljmp() for the A_JCXZ instruction on the i8086
git-svn-id: trunk@24886 -
2013-06-12 23:42:45 +00:00
sergei
6cb66faffe * Removed redundant assignments to result in UniversalTimeToLocal and LocalTimeToUniversal, Mantis #24582.
git-svn-id: trunk@24884 -
2013-06-12 14:33:23 +00:00
lacak
812efbad13 fcl-db: tests: add TestSQLDB to dbtestframework
git-svn-id: trunk@24883 -
2013-06-12 12:54:37 +00:00
sergei
64cf141f0c * Fix building for WinCE (KEY_WOW64_xx constants do not exist there), resolves #24587
git-svn-id: trunk@24882 -
2013-06-12 12:42:42 +00:00
lacak
5e1b3b303a fcl-db: tests: formatting (order methods)
git-svn-id: trunk@24881 -
2013-06-12 12:30:56 +00:00
lacak
ee2fee4259 fcl-db: sqldb:
- handle quoted table names when retrieving server index informations for quoted TableName
- reset updated flag of ServerIndexDefs when SQL.Text changes
- new tests unit for sqlDB
- tested for FB, MSSQL, MySQL, PostgreSQL, Sqlite, odbc_MSSQL, odbc_PostgreSQL, odbc_Firebird, odbc_MySQL

git-svn-id: trunk@24880 -
2013-06-12 11:01:59 +00:00
nickysn
511b1f37c1 * write the segment of aitconst_farptr on a separate line to avoid long symbol truncation, due to line length limit; this fixes compilation of sysutils in the medium memory model
git-svn-id: trunk@24879 -
2013-06-12 01:32:18 +00:00
nickysn
70cd05caa8 * fpc_setjmp and fpc_longjmp updated to support far code memory models
git-svn-id: trunk@24878 -
2013-06-11 23:59:30 +00:00
nickysn
0de550c2c9 * use an indirect jmp in fpc_longjmp
git-svn-id: trunk@24877 -
2013-06-11 23:47:30 +00:00
nickysn
07b9019c94 * jmp_buf.pc renamed to .ip and also changed to word
git-svn-id: trunk@24876 -
2013-06-11 22:51:06 +00:00
nickysn
8392c492cc * jmp_buf.bp and .sp changed to word, because pointer will become 32-bit in far data memory models
git-svn-id: trunk@24875 -
2013-06-11 22:47:42 +00:00
nickysn
baa4d39ea3 + apply extra_param_offset to all i8086 asm routines that use nostackframe
git-svn-id: trunk@24874 -
2013-06-11 21:10:47 +00:00
nickysn
5d4ebf0dca + added extra_param_offset constant for accessing parameters in asm routines with nostackframe
git-svn-id: trunk@24873 -
2013-06-11 21:08:43 +00:00