Károly Balogh
6d795df166
m68k: removed silly debug writeln accidentally left in r35671
...
git-svn-id: trunk@35673 -
2017-03-28 11:57:17 +00:00
Károly Balogh
eeb660017e
m68k: improve floating point compares against memory references by swapping sides when left is a reference and right is a register
...
git-svn-id: trunk@35672 -
2017-03-28 11:50:39 +00:00
Károly Balogh
21468861d4
m68k: handle more reg_ref and ref_reg operations more flexibly on the cg level. these OPs should get utilized better with some of the upcoming inline nodes
...
git-svn-id: trunk@35671 -
2017-03-28 09:57:14 +00:00
sergei
8ae0864c9a
* x86 Intel asm reader: handle special variables "self" and "result" similar to regular ones in terms of subscripting. This makes fix from r34911 apply to these special variables. Resolves #31542 .
...
git-svn-id: trunk@35669 -
2017-03-27 19:58:55 +00:00
nickysn
fc59649a98
+ added inline nodes for handling and/or/xor in place (i.e. x:=x op y, where
...
op=and/or/xor). They generate more optimal code on certain architectures
(including x86). The new inline nodes aren't generated by the compiler yet,
but will be used in the future, at certain optimization levels, whenever the
pattern x:=x op y is detected by the compiler.
git-svn-id: trunk@35666 -
2017-03-26 23:16:53 +00:00
florian
73c46a5988
- removed unused constants
...
git-svn-id: trunk@35664 -
2017-03-26 13:06:34 +00:00
florian
0897bd154a
+ align(<int64>,<int64>) and align(<qword>,<qword>), resolves an issue reported on the mailing list with large records
...
+ tests
* trecordsymtable.insertunionst takes a asizeint parameter
* changed one aint into a asizeint
git-svn-id: trunk@35662 -
2017-03-26 09:35:56 +00:00
florian
74423b88e0
* comment on border between linear list and jmp tree for case statements extended
...
git-svn-id: trunk@35661 -
2017-03-26 07:36:58 +00:00
nickysn
5cb724edd9
+ added optimized implementation of a_op64_reg_ref for i386 as well; improves
...
generated code for inc(int64_var,int64_var) and dec(int64_var,int64_var)
git-svn-id: trunk@35660 -
2017-03-25 21:40:20 +00:00
nickysn
f0a63fa895
+ added an optimized implementation of a_op64_reg_ref for i8086; this improves
...
the generated code on i8086 for things like inc(int64_var,int64_var) and
dec(int64_var,int64_var)
git-svn-id: trunk@35657 -
2017-03-25 18:45:31 +00:00
florian
0cf5ef459d
+ tcgtypeconvnode.second_class_to_intf supports LOC_CONSTANT as well, resolves #31596
...
git-svn-id: trunk@35655 -
2017-03-25 10:27:29 +00:00
svenbarth
abc4cf21d1
* fix compiling the 64-bit compiler with a 32-bit one
...
git-svn-id: trunk@35654 -
2017-03-24 15:47:36 +00:00
florian
971280f082
+ tarmcasenode.genjmptreeentry
...
git-svn-id: trunk@35649 -
2017-03-23 21:37:12 +00:00
florian
1ae90bce53
* commented how the limit for a case jmp tree had been determined
...
git-svn-id: trunk@35647 -
2017-03-23 18:35:48 +00:00
florian
d5754cf47c
* create jmp trees for really big case statements
...
git-svn-id: trunk@35645 -
2017-03-23 17:50:53 +00:00
Károly Balogh
a405b5a150
m68k: improve getreferencestring function a bit
...
git-svn-id: trunk@35634 -
2017-03-20 23:48:28 +00:00
sergei
2357ca1fe6
* Fixed size suffix generated for CVTSI2SS, CVTSI2SD, VCVTSI2SS, VCVTSI2SD instructions. Mantis #31550 .
...
* tasm2.pp already detected this bug if run with -al option. Added a copy of tasm2.pp and configured it with -al, so it is run daily on all suitable machines.
git-svn-id: trunk@35626 -
2017-03-19 10:29:28 +00:00
Károly Balogh
a4b096e9da
m68k: added the embedded target
...
git-svn-id: trunk@35589 -
2017-03-15 13:37:56 +00:00
pierre
9fc17dc9e9
Fix FreeBSD cycle starting for release compiler after FPSysCtl interface change
...
git-svn-id: trunk@35575 -
2017-03-13 21:33:09 +00:00
florian
ad557a1da6
* allow call dword ptr eax in delphi, resolves #18225
...
git-svn-id: trunk@35572 -
2017-03-12 16:37:48 +00:00
florian
b55cb246da
* do +/-/pred/succ to inc/dec optimizations only at an appropriate optimziation level
...
git-svn-id: trunk@35569 -
2017-03-12 07:49:37 +00:00
pierre
a7c7319352
Avoid use of getcopy method for i:=i+/i k optimization
...
git-svn-id: trunk@35568 -
2017-03-11 21:41:51 +00:00
florian
e12e47c01a
* set pe flag on win32 for the pp executable that it is "large aware" (tested by allocating 1.5 GB before real compilation starts, no regressions found), resolves #31517
...
git-svn-id: trunk@35564 -
2017-03-11 14:59:37 +00:00
florian
a679cd4e37
* copy loadnodeflags in tloadnode.dogetcopy as well
...
git-svn-id: trunk@35558 -
2017-03-10 20:44:20 +00:00
pierre
e87cc28b64
Replaced owner field by fileindex field in tpreprocstack class, in order to display correct include file for scan_e_endif_expected error
...
git-svn-id: trunk@35557 -
2017-03-09 22:43:23 +00:00
florian
ea3495c20e
* compilation with -Oodfa fixed
...
git-svn-id: trunk@35555 -
2017-03-09 22:09:43 +00:00
yury
d139868dc4
* Use .rodata section for Android.
...
git-svn-id: trunk@35553 -
2017-03-09 20:17:35 +00:00
yury
3bedccf946
* ARM scheduler need to move register de-allocs located before the instruction. Also preserve order of allocs and de-allocs.
...
git-svn-id: trunk@35552 -
2017-03-09 19:05:15 +00:00
yury
9f3759bcb8
* Enable minor size optimization for thread var loading code when -Os is specified or PIC code is generated and PIC uses GOT.
...
git-svn-id: trunk@35551 -
2017-03-09 16:08:39 +00:00
nickysn
bd48a71a98
* replace i:=i+k/i:=k+i/i:=i-k (integer only, for now; later we can also do this for pointers too) by inc/dec(i,k)
...
git-svn-id: trunk@35550 -
2017-03-09 15:35:27 +00:00
yury
03f4875310
* Removed creation of unused symbol. It was needed before r35492.
...
git-svn-id: trunk@35547 -
2017-03-09 13:51:23 +00:00
yury
94a65e99f1
* Removed unused var.
...
git-svn-id: trunk@35546 -
2017-03-09 13:49:46 +00:00
yury
fe0e30030f
* In ARM scheduler move all needed additional items with an instruction:
...
- all reg allocs and PIC labeels before the instruction;
- all reg deallocs and reg syncs after the instruction.
It fixes bug #31135 .
git-svn-id: trunk@35545 -
2017-03-09 12:26:02 +00:00
yury
0f9876effb
* Fixed a memory leak when div is replaced by shift.
...
git-svn-id: trunk@35540 -
2017-03-07 11:11:18 +00:00
yury
beafb239d4
* Fixed memory leak.
...
git-svn-id: trunk@35539 -
2017-03-07 10:20:27 +00:00
yury
54f1890fea
* Fixed memory leak of tlabelnode.labsym.
...
git-svn-id: trunk@35538 -
2017-03-07 10:14:59 +00:00
yury
60e21e4222
* Reverted r34524 - workaround for compiling with -gc. It is not needed anymore since cycle completes with -gc.
...
git-svn-id: trunk@35537 -
2017-03-07 09:30:16 +00:00
yury
2387ea1ee0
* Removed unneeded var assignment.
...
git-svn-id: trunk@35536 -
2017-03-07 09:08:45 +00:00
yury
5405a4727a
* Removed unused vars.
...
git-svn-id: trunk@35535 -
2017-03-07 08:56:07 +00:00
yury
29986a1616
* Removed unused vars.
...
git-svn-id: trunk@35534 -
2017-03-07 08:24:10 +00:00
Jonas Maebe
a2bd07bfd6
* fixed compilation of 64-bit cross-compilers on 32 bit platforms
...
(mantis #31487 )
git-svn-id: trunk@35532 -
2017-03-06 21:37:34 +00:00
florian
8bea3e0614
* the optimization introduced in r35526 requires that the tested set has no side effects as it is copied
...
git-svn-id: trunk@35531 -
2017-03-06 21:35:04 +00:00
florian
13b3866552
* convert (s*[const. set])<>/=[] for var. sets into or'ed in nodes, if const. set contains only a few elements
...
git-svn-id: trunk@35526 -
2017-03-05 20:29:22 +00:00
florian
a8ba81a585
* unused data structure removed
...
git-svn-id: trunk@35523 -
2017-03-05 08:13:34 +00:00
svenbarth
7dc4f16db3
* fix for Mantis #31431 : allow specializations to allow private/protected variables that their generic could have accessed
...
git-svn-id: trunk@35510 -
2017-03-03 21:45:29 +00:00
Károly Balogh
5426c11611
marked a few uses of TConstExprInt as const during parameter passing, to avoid a few unnecessary record copying
...
git-svn-id: trunk@35509 -
2017-03-03 17:29:59 +00:00
svenbarth
ece13bcc5a
* fix for Mantis #31465 : only consider non-static fields when checking whether a record may be used with Default()
...
+ added test (Note: the test fails due to missing = operator, but without the fix there was a stack overflow)
git-svn-id: trunk@35508 -
2017-03-03 17:03:46 +00:00
svenbarth
c16238e8dd
* fix for Mantis #31464 : add an entry for the WebAssembly CPU (this is already the target name that LLVM uses)
...
git-svn-id: trunk@35507 -
2017-03-03 16:14:52 +00:00
Károly Balogh
e8cad013f4
ppudump: fix build after r35497
...
git-svn-id: trunk@35500 -
2017-03-01 15:41:37 +00:00
Károly Balogh
bfd95d6bef
fix build with generic_cpu defined after r35497
...
git-svn-id: trunk@35499 -
2017-03-01 15:32:12 +00:00
Károly Balogh
319a397ae8
webassembly: reserve a system id and cpu id slot for the platform
...
git-svn-id: trunk@35497 -
2017-03-01 15:15:58 +00:00
Károly Balogh
d3f69c1753
atari: tos is no longer a define, so use atari to define shortasmprefix
...
git-svn-id: trunk@35496 -
2017-03-01 15:14:46 +00:00
maciej-izak
16a11c8b7a
Bug fix for getting pointer to function result (mantis #10933 #19861 )
...
git-svn-id: trunk@35495 -
2017-03-01 13:23:02 +00:00
Károly Balogh
07cfb2f43a
m68k: removed unused 3 ops taicpu constructors
...
git-svn-id: trunk@35494 -
2017-02-28 22:10:59 +00:00
svenbarth
04443b0a94
* correctly create relocations for .pdata sections (fixes linking error with ld)
...
git-svn-id: trunk@35492 -
2017-02-28 19:46:15 +00:00
florian
ec45a92fb5
* more nodedata printing fixes, similiar to r35477
...
git-svn-id: trunk@35480 -
2017-02-25 15:41:39 +00:00
Jonas Maebe
4c68ea1000
* use pocalls_cdecl and cstylearrayofconst more consistently instead of
...
ad hoc set constants containing varying number cdecl-like calling
conventions
o added pocall_sysv_abi_cdecl and pocall_ms_abi_cdecl to cstylearrayofconst
o also allow C-style blocks with mwpascal instead of cdecl (mwpascal = cdecl
with "const" = "constref" for record parameters)
o did not touch cases related to name mangling and import/export names,
because those are a real mess and easily break things left and right :/
git-svn-id: trunk@35479 -
2017-02-25 11:46:35 +00:00
Jonas Maebe
1adde89621
* copy tcallnode.right after copying the callinitblock, as right can be a
...
temprefnode referring to a temp from the init block (mantis #31421 )
git-svn-id: trunk@35478 -
2017-02-24 19:57:40 +00:00
Jonas Maebe
b5fb9beec9
* fixed printing of nodedata to the screen
...
git-svn-id: trunk@35477 -
2017-02-24 19:57:36 +00:00
florian
b9dba41ad0
* intel assembler reader: scale factor in references can also be a constant symbol, resolves #31165
...
git-svn-id: trunk@35473 -
2017-02-22 20:59:52 +00:00
Jonas Maebe
b86f2d7e3c
* only initialize global regvars in unit and main program init code
...
(bug in r35461)
git-svn-id: trunk@35462 -
2017-02-21 07:37:15 +00:00
Jonas Maebe
cadf177a93
* fixed bugs in r33737: that revision was supposed to only move
...
code from one unit to another, but in splitting some methods
I made a couple of mistakes :/ (causing global variables to be
initialised three times)
git-svn-id: trunk@35461 -
2017-02-20 22:15:34 +00:00
florian
99a0c2464d
* version update
...
git-svn-id: trunk@35457 -
2017-02-19 19:15:19 +00:00
florian
e7fd71db36
+ write name of segment/group which is too large
...
git-svn-id: trunk@35456 -
2017-02-19 19:15:18 +00:00
florian
c4fe4ab1f5
* correctly handle push <imm> on 80186+
...
git-svn-id: trunk@35455 -
2017-02-19 19:15:16 +00:00
florian
7213a13081
* split fpc_mul_<64 bit> into separate procedures with and without overflow checking
...
git-svn-id: trunk@35454 -
2017-02-19 19:15:14 +00:00
maciej-izak
af8e0efe57
* Rtti info about Management Operators (MO) in init table for records. Note: commit contains minimal changes for RTL (for proper "make") no functional changes. More RTL changes for fully functionally MO in next commits.
...
compiler/ncgrtti.pas
+ write_record_operators procedure which fills simple VMT like table for MO.
* recorddef_rtti save MO (if exists)
* objectdef_rtti_fields save nil pointer/entry for objects rtti (have same RTL parts like for records)
compiler/options.pas
+ new define FPC_HAS_MANAGEMENT_OPERATORS
compiler/symconst.pas
+ new item itp_init_record_operators for tinternaltypeprefix enum
+ new entry '$init_record_operators$' in internaltypeprefixName
rtl/inc/rtti.inc
+ new field RecordOp (pointer to MO VMT table) in TRecordInfoInit
+ new types to handle MO VMT: TRTTIRecordOpVMT, PRTTIRecordOpVMT, TRTTIRecCopyOp, TRTTIRecVarOp
rtl/objpas/typinfo.pp
+ RecordOp field for TRecInitData record
git-svn-id: trunk@35445 -
2017-02-19 00:22:59 +00:00
maciej-izak
25db29d0a6
* symtable.pas:
...
+ search_management_operator function to find Tprocdef for selected management operator in record definition
tokens.pas:
+ new constants: first_managment_operator and last_managment_operator used in search_management_operator
git-svn-id: trunk@35444 -
2017-02-18 19:27:53 +00:00
maciej-izak
9441fb3968
* ngenutil.pas, tnodeutils.sym_maybe_initialize: Ensure that management operator (Initialize) is used also for local variables.
...
git-svn-id: trunk@35443 -
2017-02-18 19:19:46 +00:00
maciej-izak
520bb31fa6
* Parse management operators. Each management operator is special kind of operator without result.
...
git-svn-id: trunk@35442 -
2017-02-18 19:12:48 +00:00
maciej-izak
168e59837a
* New function token2managementoperator for conversion: ttoken to tmanagementoperator
...
git-svn-id: trunk@35441 -
2017-02-18 18:58:32 +00:00
maciej-izak
b912deae33
* each record with managed field or with any management operator needs init table (update for symdef.pas, trecorddef.needs_inittable)
...
git-svn-id: trunk@35440 -
2017-02-18 18:50:57 +00:00
maciej-izak
15ba9b54c6
Store informations about management operators in ppu files for records.
...
ppu.pas:
* increase ppu version
symconst.pas:
+ new enum tmanagementoperator and set tmanagementoperators
symtable.pas, trecordsymtable:
+ new field managementoperators
+ new method includemanagementoperator
symdef.pas, trecorddef.ppuload and trecorddef.ppuwrite:
* save/load for managementoperators
git-svn-id: trunk@35439 -
2017-02-18 18:43:25 +00:00
maciej-izak
48b149acd4
New tokens for new management operators: Initialize, Finalize, AddRef and Copy. Small code adjustment for parser (pdecobj.pas, pstatmnt.pas, psub.pas, ptype.pas) was required because few of old token has from now value which is outside range of set: _CONSTRUCTOR, _FINALIZATION.
...
New tokens for operators:
* _OP_INITIALIZE, _OP_FINALIZE, _OP_ADDREF, _OP_COPY
New tokens:
* _INITIALIZE, _FINALIZE, _ADDREF, _COPY
git-svn-id: trunk@35438 -
2017-02-18 18:12:45 +00:00
florian
3d6d5145bf
* fix handling of const string symbols in preprocessor expressions
...
+ accept string constants in preprocessor expressions, resolves #31246
git-svn-id: trunk@35432 -
2017-02-12 17:29:45 +00:00
florian
c961c72c30
* tarmtypeconvnode.first_int_to_real should call the generic method in the parent class, if soft fpu code is generated, resolves #31350
...
git-svn-id: trunk@35430 -
2017-02-12 16:05:13 +00:00
Jonas Maebe
015f034904
* reverted r35424, wasn't ready for commit yet
...
git-svn-id: trunk@35426 -
2017-02-11 21:21:44 +00:00
Jonas Maebe
265c8e7bbc
+ support for specifying ms_abi_default, ms_abi_cdelc, sysv_abi_default, and
...
sysv_abi_cdecl calling conventions on x86-64 to force using the SYSV/
Microsoft ABI on platforms that don't use it by default (mainly to ease
porting pure assembler routines)
git-svn-id: trunk@35425 -
2017-02-11 19:57:12 +00:00
Jonas Maebe
4d9617da97
* fixed check to determine whether a record parameter can be subscripted
...
directly in inline assembly: that's only possible if it's a register
parameter where the address of the record was passed (rather than the
record itself)
git-svn-id: trunk@35424 -
2017-02-11 19:57:08 +00:00
svenbarth
ca11a4baaa
* only generate a big obj COFF file if the high bound of the sections is larger than $7fff (it could be that the final count is smaller again as sections that have the same name are combined)
...
git-svn-id: trunk@35409 -
2017-02-10 14:40:23 +00:00
svenbarth
c6bfb0064f
* keep track of the sections that are created in the asmlists
...
git-svn-id: trunk@35408 -
2017-02-10 14:38:53 +00:00
maciej-izak
1d301b6dbe
More consequent writing of Rtti. Part of code related to recorddef moved from recorddef_rtti to write_child_data_rtti(). When typeinfo is used in code init Rtti is a child of the full Rtti. Commit also contains correction for code commited for mantis #31249 (r35376) and mantis #31305 (r35377) for objects. Before was impossible to compile code with usage of typeinfo() function for object without managed fields ("Undefined symbol" error).
...
+ Test attached
git-svn-id: trunk@35403 -
2017-02-06 18:52:37 +00:00
florian
41b028ffc0
* unpcklp* require aligned memory, so do not spill replace their first operand by a memory location, resolves #31332
...
git-svn-id: trunk@35400 -
2017-02-05 20:59:54 +00:00
florian
b41989adfa
* offset of vstr/vld is limited to +/- 1020, take care of this during spilling
...
git-svn-id: trunk@35396 -
2017-02-04 18:42:02 +00:00
svenbarth
7af52f81a7
* initialize boheader to avoid a warning
...
git-svn-id: trunk@35392 -
2017-02-04 13:57:47 +00:00
svenbarth
669be1e4c2
* don't directly use sym.value as that is not necessarily initialized anymore
...
git-svn-id: trunk@35389 -
2017-02-04 13:49:44 +00:00
svenbarth
7e85e27865
* fix ncgrtti correctly (for once that warning was indeed useful :P )
...
git-svn-id: trunk@35388 -
2017-02-04 13:46:26 +00:00
florian
4b63da81aa
* initialize para to avoid warning
...
git-svn-id: trunk@35387 -
2017-02-04 13:30:19 +00:00
florian
8ba0abf0d7
* avoid warning about OutName not being initialized
...
git-svn-id: trunk@35386 -
2017-02-04 13:25:38 +00:00
florian
23a02c9063
* fix arm compiler building
...
git-svn-id: trunk@35385 -
2017-02-04 13:20:45 +00:00
svenbarth
a9888eba70
* also generate Big Obj COFF files with the GNU utilities (needs 2.25 or newer), at least as long as the new option -a5 isn't given, which disables this
...
Note 1: using an older AS might fail anyway if the amount of sections is too high (like in packages\odata\src\sharepoint.pp)
Note 2: it might be an idea to keep track of the created sections in the asmlists and only enable the option if *really* necessary (like with the internal COFF output generator), though this might lead to false positives due to multiple sections with the same name (since I'd prefer to use the KISS principle only a counter would be used)
git-svn-id: trunk@35381 -
2017-02-03 22:45:32 +00:00
svenbarth
76445fd4b7
+ add ability to generate Big Obj COFF files if required due to the section count being higher than $7fff
...
Note: such files can be linked GNU ld only starting from 2.25; then again the older versions would fail anyway as they'd complain about a too high section count...
git-svn-id: trunk@35380 -
2017-02-03 22:40:10 +00:00
svenbarth
95bea696ca
+ add ability to read Big Obj COFF files as generated by MSVC with /bigobj and GNU AS with -mbig-obj (starting from version 2.25); this format allows 2^31 sections per COFF file instead of 2^16, thus solving the problem of compiling packages\odata\src\sharepoint.pp
...
Note: the field names of tcoffbigobjheader and coffbigobjsymbol are inspired from the field names of the structs declared in LLVM
git-svn-id: trunk@35379 -
2017-02-03 22:36:58 +00:00
svenbarth
c1390b3442
* fix for Mantis #31249 : applied (adjusted) patch provided by Maciej Izak
...
Commit message:
[PATCH] More consistent RTTI (also better performance) for classic
objects (reference to initrtti from fullrtti).
git-svn-id: trunk@35376 -
2017-01-31 18:21:53 +00:00
Károly Balogh
a34b6c7c53
m68k: atari also uses syscalls, so update the comment for that too
...
git-svn-id: trunk@35375 -
2017-01-31 14:43:25 +00:00
svenbarth
d149f260fc
- remove no longer needed gen_fpc_dummy()
...
git-svn-id: trunk@35374 -
2017-01-29 22:40:36 +00:00
svenbarth
cc42bb8a7a
* generate the package stub for all Windows and NativeNT targets
...
git-svn-id: trunk@35373 -
2017-01-29 22:39:34 +00:00
svenbarth
48bddbbc43
* use new potype_pkgstub instead of gen_fpc_dummy() as the former works on all platforms that needs it
...
With this dynamic packages are starting to work on x86_64-win64
git-svn-id: trunk@35372 -
2017-01-29 22:39:06 +00:00
svenbarth
1a6a8b7c9f
+ introduce a new potype for the main stub of a package library (which on Windows is simply a DLLMain returning True)
...
git-svn-id: trunk@35371 -
2017-01-29 22:37:40 +00:00
svenbarth
1c98a48c47
* mark __FPC_specific_handler as an external symbol
...
git-svn-id: trunk@35370 -
2017-01-29 22:26:13 +00:00