Commit Graph

48045 Commits

Author SHA1 Message Date
sergei
cc3e09ee46 * Handle possible relocation types in assembler reader using a single AS_RELTYPE token, rather than with individual tokens for each case. Since possible relocations are target-dependent, this will allow to support any amount of them without modifying the base tattreader class.
git-svn-id: trunk@33117 -
2016-02-23 21:28:46 +00:00
sergei
4e7c0d0670 * MIPS: removed ConvertCalljmp method. Testing shows that it never changes instructions.
* Treat numerical expressions in operands as constants, not as references by default. A reference cannot be represented by number alone on MIPS.

git-svn-id: trunk@33116 -
2016-02-23 21:19:46 +00:00
sergei
5f6442074a - MIPS,SPARC: removed method ReadSym which is never used.
- SPARC: also removed PowerPC-style parsing of address type (e.g. foo@hi). SPARC syntax is %hi(foo).

git-svn-id: trunk@33113 -
2016-02-23 12:49:18 +00:00
Jonas Maebe
356a5aff05 * apparently, Darwin/x86-64 also uses an opaque ISA pointer on OS X 10.11
-> assume it is always the case for non-fragile ABI platforms
    (mantis #29667)

git-svn-id: trunk@33112 -
2016-02-22 08:44:00 +00:00
svenbarth
94c0938edd Reverted accidentally committed inline if-then-else expression (committed in r33048 when I reverted the IfThen()... -.- )
git-svn-id: trunk@33111 -
2016-02-19 21:51:56 +00:00
svenbarth
25744dd3f1 Fix for Mantis #29609.
pexpr.pas, factor.factor_read_id:
  * don't use a cloadvmtaddrnode for accessing class properties in records

+ added test

git-svn-id: trunk@33110 -
2016-02-19 21:37:02 +00:00
svenbarth
1945bf64b4 Merged revision(s) 32302-32305, 32310 from branches/svenbarth/packages:
+ new stream class TCRangeStream that represents a substream of another stream while being also extendable
........
Extend tentryfile so that it can be opened from a stream in addition to a file

entfile.pas, tentryfile:
  + new method openstream() to open a readable tentryfile based on a stream
  + new method createstream() to open a writeable tentryfile based on a stream
  * adjust openfile() to use openstream()
  * adjust createfile() to use createstream()
........
A few extensions for tentryfile needed for package files

entfile.pas, tentryfile:
  + new property position to retrieve/control the position of the underlying stream (works also with tempclose()/tempopen())
  + new method substream() to retrieve a stream that goes from the specified offset with the specified length (-1 create a stream that is extendable, aka for writing)
  + new property stream to get the underlying stream directly; be careful when using this!
........
Extend tppumodule so that it can be opened from a stream as well.

fppu.pas, tppumodule:
  * rename openppu() to openppufile()
  + new method openppustream() to open a module based on a stream
  + put the common part of openppufile() and openppustream() into a new method openppu()
........
Fix compilation.

fppu.pas, tppumodule:
  * openppu: add parameter ppufiletime for printing the time of the file (only if filetime is not -1)
  * openppufile: pass the retrieve time of the PPU to openppu()
  * openppustream: pass -1 to openppu()
........

git-svn-id: trunk@33109 -
2016-02-19 17:13:58 +00:00
svenbarth
0226195272 With the TlsKey and SysInstance changes in revisions r33091 and r33107 respectively revisions r29009, r32580 and r32581 can be considered as merged.
git-svn-id: trunk@33108 -
2016-02-19 16:26:05 +00:00
svenbarth
af53fcb48c Adjust SysInstance so that it is correctly handled with the indirect entry information on Win32
win/sysosh.inc, TEntryInformationOS:
  + new field SysInstance that will hold the address to the main program's SysInstance variable
win32/system.pp:
  * rename SysInstance to FPCSysInstance and make it a PLongInt
  * OsSetupEntryInformation: setup FPCSysInstance
  * adjust initialization of SysInstance to use FPCSysInstance instead
win32/sysinit.inc:
  * SysInstance is no longer an external
  * initialize the OS.SysInstance field of EntryInformation
win64/system.pp:
  * add a FPCSysInstance that's a pointer to SysInstance
win/winres.inc:
  * SysInstance is now a pointer and has the same name on both Win32 and Win64

git-svn-id: trunk@33107 -
2016-02-19 16:22:20 +00:00
svenbarth
6d81760136 typinfo.pp, TTypeData:
* document the property data that follows for interface types (both COM and Corba)

git-svn-id: trunk@33106 -
2016-02-19 15:23:52 +00:00
svenbarth
8152d1185c Only write the IIDStr for Corba interfaces (it's completely redundant for COM ones)
ncgrtti.pas, TRTTIWriter.write_rtti_data.objectdef_rtti.objectdef_rtti_interface_full:
  * only set the ifHasStrGUID flag for Corba interfaces and if the IIDStr is not '' (which it is by default)
  * only write the IIDStr for Corba interfaces

git-svn-id: trunk@33105 -
2016-02-19 15:22:46 +00:00
Jonas Maebe
f3df3a7a67 + test for mantis #28668
git-svn-id: trunk@33104 -
2016-02-18 22:03:46 +00:00
Jonas Maebe
001417bb47 + test from mantis #28667
git-svn-id: trunk@33103 -
2016-02-18 21:58:34 +00:00
michael
2a33ee63bb * Forgot to commit, constant for TThread.ExecuteInthread
git-svn-id: trunk@33101 -
2016-02-17 07:46:56 +00:00
michael
789b80f702 * ExecuteInThread added
git-svn-id: trunk@33100 -
2016-02-16 18:59:35 +00:00
michael
ae3b0eab2a * Fix stringlist addstrings so virtual method is preserved (bug id 0029630)
git-svn-id: trunk@33099 -
2016-02-16 18:59:01 +00:00
michael
a7963d7877 * Fix bug #29506
git-svn-id: trunk@33098 -
2016-02-14 17:27:03 +00:00
Jeppe Johansen
1c0c944311 Added x86_64-embedded target. Patch from Benjamin Rosseaux
git-svn-id: trunk@33097 -
2016-02-14 10:57:00 +00:00
sergei
161f812113 * Explicitly typecast (-longint) to longint, otherwise it becomes an int64 on 64-bit targets, causing wrong result of sign(longint). Mantis #29649.
git-svn-id: trunk@33096 -
2016-02-14 10:29:11 +00:00
sergei
41751bc5b4 + Next portion of MIPS peephole optimizations. Get more aggressive and do more than a single pass if needed, enabling optimization of instructions that logically turn into MOVE due to register renaming.
git-svn-id: trunk@33095 -
2016-02-13 12:33:30 +00:00
michael
263c888555 * Fix bug ID #28723
git-svn-id: trunk@33094 -
2016-02-13 11:47:17 +00:00
sergei
e8f2f42b75 * Reverted r29373 and replaced it with more appropriate fix.
git-svn-id: trunk@33093 -
2016-02-13 11:09:31 +00:00
michael
db19d73ec0 * Add ClearFirst parameter to AddStrings (bug ID 29630)
git-svn-id: trunk@33092 -
2016-02-13 11:03:51 +00:00
svenbarth
6afda909d4 Rework TlsKey handling on Windows so that it works as intended with indirect main information
rtl/inc/system.inc:
  * SetupEntryInformation: call new, optional function OSSetupEntryInformation to handle platform specific entry information initialization
rtl/win/sysosh.inc, TEntryInformationOS:
  + new field TlsKeyAddr which will hold the address to the main binary's TlsKey variable
win32/sysinit.inc:
  + provide the variable holding the TlsKey and pass that on to the entry information record
win32/system.pp:
  + new OS specific entry information initialization (currently only the TlsKey)
win/systhrd.inc:
  * declare TlsKey as a pointer to a DWord value instead of a DWord; on non-indirect entry platforms this is initialized with the address of new variable TlsKeyVar, on indirect entry platforms it will be initialized by the entry information initialization
  * adjust usages of TlsKey from DWord to PDWord
win/systlsdir.inc:
  * TlsKey is now a PDWord and (in sysinit) points to TlsKeyVar
win/syswin.inc:
  * adjust TlsKey usage
inc/heaptrc.pp:
  * TlsKey is now a PDWord, thus adjust the import and the usage

git-svn-id: trunk@33091 -
2016-02-12 17:03:52 +00:00
svenbarth
8775897621 * fix copy & paste error (didn't influence the test as str3 isn't changed, but at least it's consistent that way...)
git-svn-id: trunk@33090 -
2016-02-12 16:09:32 +00:00
svenbarth
77cb13c38c Revert r33057. MaxLen is the maximum value that Pos can return and does not need to be adjusted by (Offset - 1). Also there's no buffer that could be overrun as i is not used to access the string's buffer. Fixes failure of tests/test/units/system/tstring.pp
git-svn-id: trunk@33089 -
2016-02-12 16:07:26 +00:00
sergei
e23ed15634 * MIPS: reworked and fixed procedure fixup_jmps:
* support conditional branches with 2 parameters
  * factored out common parts
  * adjusted range limits, they were copy-pasted from PowerPC target which uses 14-bit offsets. MIPS however uses 16-bit offsets, i.e. can branch 4 times farther.

git-svn-id: trunk@33088 -
2016-02-12 13:53:04 +00:00
lacak
6ca424900b fcl-db: datadict: when querying for table indexes use ServerIndexDefs instead of local IndexDef
git-svn-id: trunk@33087 -
2016-02-12 13:27:23 +00:00
lacak
b38b441d53 fcl-db: dbase: Bug #28734, Patch by Luiz Americo
git-svn-id: trunk@33086 -
2016-02-12 11:43:40 +00:00
lacak
f55ab74e6a fcl-db: dbase: call inherited InternalPost to check required fields. Revealed by test TestRequired
git-svn-id: trunk@33085 -
2016-02-12 10:07:08 +00:00
sergei
ed2488eb03 - MIPS: removed the ugly hack of splitting LDC1/SDC1 instructions into pairs of LWC1/SWC1 at assembler writer level. It probably was there as a workaround for insufficient alignment of double-precision variables, which was present once, but fixed a long time ago.
git-svn-id: trunk@33084 -
2016-02-11 15:09:19 +00:00
yury
111595dcd9 * pas2jni: Fixed procedure parameters parsing in some cases.
git-svn-id: trunk@33083 -
2016-02-10 16:28:41 +00:00
pierre
e488d7c81c Prepare for upcoming GDB 7.11 release
git-svn-id: trunk@33082 -
2016-02-10 13:05:01 +00:00
sergei
7f58608008 * MIPS: changed function is_macro_instruction into method of taicpu. Functionality unchanged.
git-svn-id: trunk@33081 -
2016-02-10 12:46:55 +00:00
lacak
5f17bcbc97 fcl-db: tests: cosmetic
git-svn-id: trunk@33080 -
2016-02-10 11:28:10 +00:00
lacak
810d724493 fcl-db: sqldb: ensure, that if error happens during ExecuteDirect, UnprepareStatement is called. Leaving unfinished statement causes error on later connection close (SQLite). Bug #29376 (fixed as suggested by reporter).
DB test suite do not show any regression.

git-svn-id: trunk@33079 -
2016-02-10 11:13:02 +00:00
lacak
b5ef41b2be fcl-db: sqldb: cosmetic
git-svn-id: trunk@33078 -
2016-02-10 10:02:17 +00:00
sergei
55492a0f30 * Don't do useless string case conversions in a loop.
git-svn-id: trunk@33077 -
2016-02-10 02:10:23 +00:00
sergei
2861362780 * Reuse binary search routine from rgbase.pas to look up AT&T register names, removes need in regnumber_count_bsstart constant. Resolves #29471.
git-svn-id: trunk@33076 -
2016-02-09 16:48:32 +00:00
marcus
fc2069eca8 - Removed the string for tai_labeled_instruction, repairs m68k building after revision 33074
git-svn-id: trunk@33075 -
2016-02-09 08:08:18 +00:00
sergei
36043d13ae - Removed remains of tai_labeled_instruction, already commented out probably in 1.0 times.
git-svn-id: trunk@33074 -
2016-02-09 02:25:27 +00:00
sergei
4fc05e6ec1 - MIPS: removed taicpu.delayslot_annulled, it was a copy-paste from SPARC code.
git-svn-id: trunk@33073 -
2016-02-09 01:32:42 +00:00
yury
a02da7c7d2 * pas2jni: Fixed handling of method pointers.
git-svn-id: trunk@33072 -
2016-02-08 18:52:32 +00:00
florian
ddad3b3166 * allow very small heaps for avr
git-svn-id: trunk@33071 -
2016-02-07 18:28:13 +00:00
florian
dfd261f2d6 * embedded heap manager takes care of ReturnNilIfGrowHeapFails
git-svn-id: trunk@33070 -
2016-02-07 18:28:12 +00:00
sergei
9b84581f4c + function copysign(x,y), calculates abs(x)*sign(y), private for unit math (not in interface).
* fixed sinh and arsinh return values at -0.0 and -Inf.

git-svn-id: trunk@33069 -
2016-02-07 15:34:02 +00:00
florian
fd61d65313 * handle controller type already in the first options pass_1
* set heapsize for the avrsim controller target to a reasonable size

git-svn-id: trunk@33068 -
2016-02-07 11:24:47 +00:00
sergei
a4ed9f3b54 * Improved sign(x) functions to be branchless in most cases. Resolves #14206.
git-svn-id: trunk@33067 -
2016-02-07 11:18:31 +00:00
florian
56b6cedcf4 * increase ram size of the avrsim controller target
git-svn-id: trunk@33066 -
2016-02-07 11:17:55 +00:00
florian
0695c92b73 * make Dos.GetMsCount a dummy for embedded targets
git-svn-id: trunk@33065 -
2016-02-07 11:16:39 +00:00