Commit Graph

40858 Commits

Author SHA1 Message Date
nickysn
6daadff427 * compilation of unit objects in the i8086 medium memory model fixed (via the use of codepointer)
git-svn-id: trunk@25158 -
2013-07-21 17:43:44 +00:00
Jeppe Johansen
d89b9a4311 Add support in ARM assembler reader for ldr reg, =literal syntax
git-svn-id: trunk@25157 -
2013-07-21 16:06:57 +00:00
Jeppe Johansen
fdcc68cfd7 Disabled preindex/postindexed peephole optimizations for Thumb and Thumb2
git-svn-id: trunk@25156 -
2013-07-21 14:21:16 +00:00
Jeppe Johansen
0977d76f42 Mark global symbols with assembler references as non-regable
git-svn-id: trunk@25155 -
2013-07-21 13:41:10 +00:00
sergei
dddc78514d * Internal ELF linker: for MIPS targets, place .got section after .data. This corresponds to behavior of ld, and reduces amount of processing when adding GOT slots for local symbols (which requires re-doing layout for all sections that come after .got)
git-svn-id: trunk@25154 -
2013-07-21 13:10:57 +00:00
nickysn
4953fd0bb0 * use CodePointer in Classes.TReader.FindMethod() and TFindMethodEvent for i8086 medium memory model compatibility
git-svn-id: trunk@25153 -
2013-07-20 22:10:22 +00:00
nickysn
ef2423128f * use CodePointer instead of Pointer in TObject.MethodName() and .MethodAddress() for i8086 medium memory model compatibility
git-svn-id: trunk@25152 -
2013-07-20 22:08:38 +00:00
nickysn
2e97de9522 + added an i8086 specific override of thlcgcpu.location_force_mem, which handles 6-byte (medium/compact memory model) method pointers
git-svn-id: trunk@25151 -
2013-07-20 19:40:27 +00:00
nickysn
f5a0702f9a + added i8086 specific implementation of Tcgtypeconvnode.second_nil_to_methodprocvar, which supports memory models with far code and/or far data
git-svn-id: trunk@25150 -
2013-07-20 16:58:41 +00:00
nickysn
91d7b2bc94 + added i8086 medium/compact model 6-byte (mixed near + far) method pointer support in tcgloadnode and tcgassignmentnode
git-svn-id: trunk@25149 -
2013-07-20 15:06:14 +00:00
sergei
8e6d4b41e2 + MIPS: started the peephole optimizer.
git-svn-id: trunk@25148 -
2013-07-20 13:44:21 +00:00
sergei
9494fadf08 * MIPS: set pi_do_call flag for assembler procedures with stackframes, so in PIC mode it further receives pi_needs_got in PIC mode and allocates the GP save temp.
* Deallocate GP save temp in epilogue to avoid warnings when compiled with -dEXTDEBUG
* g_concatcopy: don't check alignment, this allows single byte or word locations to be copied with 2 instructions. Larger unaligned references are supposed to be handled in g_concatcopy_unaligned instead.

git-svn-id: trunk@25147 -
2013-07-20 13:42:41 +00:00
Károly Balogh
4df92ddc08 dummy GetLastOSerror to make fcl-whatever build, and header cleanup/fixes
git-svn-id: trunk@25146 -
2013-07-19 22:55:44 +00:00
Károly Balogh
4f041157c4 build ctypes on Amiga too
git-svn-id: trunk@25145 -
2013-07-19 22:54:34 +00:00
Károly Balogh
9363585d19 don't try to build SVN on Amiga for now
git-svn-id: trunk@25144 -
2013-07-19 22:49:33 +00:00
Jonas Maebe
1a560e9875 * when concatenating ansistrings, do not map CP_NONE (rawbytestring) to
CP_ACP (defaultsystemcodepage), because if all input strings have the
    same code page then the result should also have that code page if it's
    assigned to a rawbytestring rather than getting defaultsystemcodepage
  * do not consider empty strings to determine the code page of the result
    in fpc_AnsiStr_Concat_multi(), because that will cause a different
    result than when using a sequence of fpc_AnsiStr_Concat() calls (it
    ignores empty strings to determine the result code page) and it's also
    slower
  * do not consider the run time code page of the destination string in
    fpc_AnsiStr_Concat(_multi)() because Delphi does not do so either. This
    was introduced in r19118, probably to hide another bug
  + test

git-svn-id: branches/cpstrrtl@25143 -
2013-07-19 16:33:14 +00:00
Jonas Maebe
9b9252e507 * don't depend on the (non-Delphi-compatible) behaviour that the current
code page of a rawbytestring influences the code page of concatenated
    strings assigned to it (this behaviour will be fixed/changed in the
    next commit)

git-svn-id: branches/cpstrrtl@25142 -
2013-07-19 16:32:49 +00:00
Jonas Maebe
d1c36c464a * fixed r22247 so it does in fact set the destination code page properly
(and use the generic helper so no pointer errors can happen)

git-svn-id: branches/cpstrrtl@25141 -
2013-07-19 16:32:29 +00:00
Jonas Maebe
957854c0ae + test for assign/rename/erase/mkdir/rmdir with utf8/cp866 encoded file
names

git-svn-id: branches/cpstrrtl@25140 -
2013-07-19 16:32:07 +00:00
Jonas Maebe
197b949dfa * fixed chdir/rmdir/mkdir(rawbytestring) on FPCRTL_FILESYSTEM_SINGLE_BYTE_API
when the passed in string has an encoding that is not a subset of
    DefaultFileSystemCodePage

git-svn-id: branches/cpstrrtl@25139 -
2013-07-19 16:31:47 +00:00
Jonas Maebe
aaa5bb48de + ToSingleByteFileSystemEncodedFileName(array of widechar) overload for more
efficient operation in certain platform's dos units (avoid
    array-of-widechar -> unicodestring conversion)

git-svn-id: branches/cpstrrtl@25138 -
2013-07-19 16:31:21 +00:00
Jonas Maebe
df6a2dce00 + unicodestring support for assign/erase/rename
+ codepage support for textrec/filerec and the above routines
  * textrec/filerec now store the filename by default using widechar. It is
    possible to switch back to ansichars using the FPC_ANSI_TEXTFILEREC define.
    In that case, from now on the filename will always be stored in
    DefaultFileSystemEncoding
  * fixed potential buffer overflows and non-null-terminated file names in
    textrec/filerec
  + dodirseparators(pwidechar), changed the dodirseparators(pchar/pwidechar)
    parameters into var-parameters and gave those routines an extra parameter
    that indicates whether the p(wide)char can be changed in place if
    necessary or whether a copy must be made first (avoids us having to make
    all strings always unique everywhere, because they might be changed on
    some platforms via a pchar)
  * do_open/do_erase/do_rename got extra boolean parameters indicating whether
    the passed pchars point to data that can be freely changed (to pass on to
    dodirseparators() if applicable)
  * objects.pp: force assign(pchar) to be called, because
    assign(array[0..255]) cannot choose between pchar and rawbytestring
    versions (and removing the pchar version means that assign(pchar) will
    be mapped to assign(shortstring) in {$h-})
  * fixed up some routines in other units that depend on the format of
    the textrec/filerec.name field

git-svn-id: branches/cpstrrtl@25137 -
2013-07-19 16:30:51 +00:00
Jonas Maebe
d676bbf9af * the filerec.name field is 0-based, not 1-based -> to check for an empty
file name, check character 0

git-svn-id: branches/cpstrrtl@25136 -
2013-07-19 16:29:59 +00:00
Jonas Maebe
a00828e3e2 * fixed buffer overrun in SysPCharToNtStr
git-svn-id: branches/cpstrrtl@25135 -
2013-07-19 16:29:32 +00:00
Jonas Maebe
953e088c14 + unicodestring support for POpen(), and DefaultFileSystemCodePage support
for POpen(RawByteString)

git-svn-id: branches/cpstrrtl@25134 -
2013-07-19 16:29:13 +00:00
Jonas Maebe
8538f48fda * made the ansistring parameters of the fp*() overloads constant, changed
them to rawbytestring and added DefaultFileSystemCodePage conversions

git-svn-id: branches/cpstrrtl@25133 -
2013-07-19 16:28:49 +00:00
Jonas Maebe
e132a77709 - reverted optimisation from r24962, it's already performed in SetCodePage()
git-svn-id: branches/cpstrrtl@25132 -
2013-07-19 16:28:27 +00:00
sergei
f80ce76a69 + MIPS: emulate "flags", i.e. support LOC_FLAGS location. This allows to generate differently optimized code for branching and for conversion to register, typically saving a register and instruction per compare.
git-svn-id: trunk@25131 -
2013-07-19 14:06:47 +00:00
sergei
9a6edd0fb8 * MIPS: handle restoring GP after calls without GAS macro processing, removes ugly workaround for GAS bug.
git-svn-id: trunk@25130 -
2013-07-19 08:04:06 +00:00
michael
4afefd6cbe * Added AddText as suggested in bug ID #24764
git-svn-id: trunk@25129 -
2013-07-19 07:16:06 +00:00
nickysn
4b93fa1323 * set all the i8086 calling conventions' volatile registers to be the same as the 'pascal' calling convention; this should make cdecl compatible with 16-bit C compilers
git-svn-id: trunk@25128 -
2013-07-18 21:01:41 +00:00
sergei
dffe9cbc55 * Output sizes in map files without truncation and without leading zeros, plus a few more tweaks to make it look more like map files generated by ld. Resolves #24747.
git-svn-id: trunk@25127 -
2013-07-17 14:52:02 +00:00
sergei
8b1463aedc * tprocdef.customprocname: fixed bug introduced in r21069 that was causing result to always contain 'procedure' or 'function' word. These should be included only if pno_proctypeoption flag is given. Resolves #24640.
git-svn-id: trunk@25126 -
2013-07-17 12:41:55 +00:00
reiniero
2240c24252 fcl-db: dbase: Remove erroneous language ID $20 Czech as it does not appear in references. Fixes issue #0024730: Incorrect dbf Language ID to Locale convert table for Czech locale Windows
git-svn-id: trunk@25125 -
2013-07-17 11:57:20 +00:00
reiniero
29795e1b30 fcl-db: cosmetic: dbase: add reference to language IDs/codepages for DBaseIV
git-svn-id: trunk@25124 -
2013-07-17 11:48:03 +00:00
sergei
f49be98507 * MIPS: avoid temp if possible also when converting unsigned 32-bit integers to real.
git-svn-id: trunk@25123 -
2013-07-17 11:19:19 +00:00
sergei
c3350d13f9 * MIPS: floating point parameters on stack should be loaded to/from FPU registers directly, without using temp.
git-svn-id: trunk@25122 -
2013-07-17 11:00:46 +00:00
nickysn
3e0cc1e5f6 * fixes for the compilation of unit variants in the i8086 medium memory model
git-svn-id: trunk@25120 -
2013-07-16 15:16:24 +00:00
nickysn
e8005f9485 * fixed compilation of unit typinfo in the i8086 medium memory model
git-svn-id: trunk@25119 -
2013-07-16 15:13:11 +00:00
nickysn
d377ffdbec + added types CodePtrInt and CodePtrUInt, defined as integers with the same size as a CodePointer
git-svn-id: trunk@25118 -
2013-07-16 14:58:58 +00:00
nickysn
79db53b049 * TPropInfo.GetProc, .SetProc and .StoredProc changed to CodePointer for compatibility with the i8086 medium memory model
git-svn-id: trunk@25117 -
2013-07-16 14:50:16 +00:00
Jonas Maebe
155aafc255 * moved SYSUTILS_HAS_ANSISTR/UNICODESTR_FILEUTIL_IMPL define to interface
so declarations can also depend on it and similar defines (not yet the
    case)
  + added SYSUTILS_HAS_ANSISTR_ENVVAR_IMPL/SYSUTILS_HAS_UNICODESTR_ENVVAR_IMPL
    to indicate whether the platform-dependent part of the unit provides
    an ansistring/unicodestring interface to get environment variables
  + Windows version of getenvironmentvariable(unicodestring)
  + generic ansistring/unicodestring versions of GetEnvironmentVariable()
    in case the platform doesn't provide them
  * result of GetEnvironmentString() is ansistring/unicodestring depending
    on the state of the FPC_RTL_UNICODE define

git-svn-id: branches/cpstrrtl@25116 -
2013-07-16 14:16:34 +00:00
Jonas Maebe
09014e8716 * missing SYSUTILS_HAS_ANSISTR_FILEUTIL_IMPL define for wii
* string -> rawbytestring for SYSUTILS_HAS_ANSISTR_FILEUTIL_IMPL routines

git-svn-id: branches/cpstrrtl@25115 -
2013-07-16 14:16:21 +00:00
Jonas Maebe
a0f2d3c12f * don't compile classes for wii, because sysutils doesn't contain a sleep()
which is now required for classes (and neither compile fmtbcd, because it
    depends on classes)
  * fixed stray "\" that caused the implicit units to be parsed wrongly

git-svn-id: branches/cpstrrtl@25114 -
2013-07-16 14:16:10 +00:00
Jonas Maebe
eeb98a0c0f - removed platform-specific implementations of GetCurrentDir, SetCurrentDir,
CreateDir and RemoveDir, and implemented a generic one (based on the OS/2
    version) in the shared sysutils code (so that the filesystem code page
    support for the system unit routines can be reused)
  * include both ansistring and unicodestring versions of the above routines,
    and of ForceDirectories. Exception: GetCurrentDir, which cannot be
    overloaded based on function result and whose return type currently
    dependends on the FPC_UNICODE_RTL define

git-svn-id: branches/cpstrrtl@25113 -
2013-07-16 14:15:55 +00:00
nickysn
59d014dd10 + extended test tfarptr2 to also test comparisons with nil
git-svn-id: trunk@25112 -
2013-07-16 13:44:23 +00:00
nickysn
2a64ba0ad3 * do a 32-bit comparison on far and huge pointers
git-svn-id: trunk@25110 -
2013-07-16 07:57:49 +00:00
nickysn
0d565aeba9 + extended test tfarptr2.pp
git-svn-id: trunk@25109 -
2013-07-15 22:36:12 +00:00
nickysn
56fbf8d4fe + added test tfarptr2.pp, which tests far pointer equality comparison
git-svn-id: trunk@25108 -
2013-07-15 22:13:17 +00:00
nickysn
1eaa23b738 + added a simple test for i8086 far pointers
git-svn-id: trunk@25107 -
2013-07-15 14:47:02 +00:00