Karoly Balogh
f2d6b4d530
m68k: added a helper function to check if a register is an FPU register
2023-01-05 13:32:33 +01:00
Jonas Maebe
a641860fa8
Implicit specialisation: use regular array parameters for array constructors
...
Fixes compilation of test/timpfuncspez5 with LLVM and debug info, as the LLVM
debug info writer internalerror's when you try to generate debug info for
an array constructor (since those types should never appear as parameter/
variable types).
Replace them with reusable regular array types, so that multiple invocations
of the same generic function with array constructors of the same type and
number of elements are collapsed into the same specialisation
2023-01-03 21:44:44 +01:00
Pierre Muller
cd8aa3f0e0
Avoid generation of invalid 'cb(n)z sp,label' instruction
2023-01-02 18:22:49 +00:00
florian
6c5f9537b3
* avoid to generate bt [mem], reg, resolves #40039
2022-12-31 18:27:27 +01:00
Tomas Hajny
1bb4003984
* messages regenerated after fixing #40008
2022-12-31 17:31:31 +01:00
Tomas Hajny
baf950bf76
* improved consistency as suggested in bug #40008
2022-12-31 17:27:06 +01:00
Jonas Maebe
32f8dc7ef5
symcreat: add hidden high parameters in create_procdef_alias
...
No longer happens automatically for pc_bareproc procdef copies
2022-12-31 11:59:05 +01:00
J. Gareth "Curious Kit" Moreton
a1abe51f2a
* Refactor of is_cyclic to use a linked list on the stack instead of a dynamic array
2022-12-31 09:04:02 +00:00
Sven/Sarah Barth
4b659175d9
- remove no longer required readonly functionality from tparasymtable
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
e1288897f3
* fix #40031 : with support for inline specializations it no longer makes sense to make the parameter symtable of a procedure variable type readonly as there *are* defs that are added to it
...
+ add adjusted test
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
b6b2785b66
* also skip high parameters when pc_normal_no_hidden is given to tprocdef.getcopyas
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
430bcac389
* ensure that all hidden parameter symbols are removed when adding an anonymous function to a capturer (they'll be added again later on)
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
d7d65fe0d7
* fix typo in comment
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
4510945465
* fix #40062 : ensure that Self is only added to anonymous functions when dealing with method pointers
...
+ added test
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
d410deb7ae
* when assigning an anonymous function to a method pointer move the function to the normal function level to avoid potential problems when accessing other variables
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
a6ddea87b7
* don't free the old, captured Self symbol as that does not belong to the anonymous function
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
1d73dab2b0
* a callnode for an anonymous function can have its procdefinition fixed, thus avoid the need to check for overloads
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
5d7e3ca240
* fix #40060 : ensure that Self is not added for anonymous functions that are part of a static class method
...
+ added test
2022-12-30 23:32:00 +01:00
Sven/Sarah Barth
4c6338207f
* fix #40061 : the Self of types that aren't implicit pointers (recods, TP-style objects, primitive types (for helpers)) needs to be stored as a Pointer in the Capturer so that modifications are correctly visible
...
+ added tests
2022-12-30 23:32:00 +01:00
florian
7affd78904
* do not throw an internal error on typed constants with wrong element count, resolves #40066
2022-12-30 21:53:04 +01:00
Karoly Balogh
721e988da2
m68k: add some initial CPU-specifc boilerplate for an internal ELF writer
2022-12-29 05:08:46 +01:00
Karoly Balogh
e19f60503b
m68k: updated instruction tables to match vasm release 1.9a
2022-12-29 03:36:51 +01:00
florian
4430422489
* improve module local data accesses by avoiding a got read
2022-12-28 22:05:23 +01:00
florian
30e0df384d
* second part of #40041 fixed
...
+ tests
2022-12-22 22:41:39 +01:00
florian
e0fef23d77
* properly transform a+const1-const2 into a+const1+(-const2), resolves #40041
2022-12-21 22:34:46 +01:00
Pierre Muller
e2905b8fad
Refuse A_Jcc, A_SETcc, and A_CMOVcc without condition
2022-12-10 19:50:47 +00:00
Pierre Muller
af04a523bb
* Fix testing of A_JCC and A_SETCC, add A_CMOVCC
...
* Add $PIC for i386 and x86_64 solaris assemblers
2022-12-10 17:41:33 +01:00
Pierre Muller
b9a8e6832f
Do not set usesectionprogbits and usesectionflags to true for solaris assembler
2022-12-10 17:41:05 +01:00
florian
14466ee9d9
* change table updates
2022-12-06 22:41:30 +01:00
Jonas Maebe
851af5033f
Darwin/AArch64: adjust alignment info of custom-aligned paralocs
...
Resolves #40019
2022-12-06 21:46:26 +01:00
florian
8ad7decaa3
* another change information update
2022-12-04 23:17:56 +01:00
Jonas Maebe
bba1076e12
LLVM: add Xcode 14.0 support (-ClvXcode-14.0)
2022-12-04 21:51:55 +01:00
Jonas Maebe
1e83d415c3
LLVM: us paraloc def instead of para def for byval
...
We also use the paraloc instead of the para to write the def
2022-12-04 21:51:55 +01:00
J. Gareth "Curious Kit" Moreton
f00a932cc6
* New is_cyclic function to detect if def references itself - fixes #40010
2022-12-03 23:53:16 +00:00
florian
42d91c02bd
* continued to fix change information
2022-12-03 23:36:07 +01:00
Jonas Maebe
230142e183
AArch64 cgcpu: add missing brackets around and/or expression
2022-12-03 21:17:18 +01:00
florian
e0eff8bd89
+ more change information fixed
2022-12-02 23:34:36 +01:00
Sven/Sarah Barth
7a34677b2a
* as long as the type passed into a TypeInfo() is not an undefined or error def the resulting value will always be constant at compile time, so it can be compared to another then no matter if typenode or not
...
+ added tests
2022-12-02 17:47:15 +01:00
Jonas Maebe
c5f4a6acd0
LLVM: fix variant records when alignment of first part is not the highest
...
Resolves #40015
2022-12-01 22:43:40 +01:00
florian
96d4bd19ac
* use bzhi only (if at all) for in_and_assign_x_y and not other in_*_x_y operations, resolves #40016
2022-11-30 22:16:21 +01:00
florian
a1a2549cf1
+ Debug message
2022-11-29 23:20:35 +01:00
J. Gareth "Curious Kit" Moreton
cc27576339
* x86: Fixed movzwl/movzbl bug in OptPass2Movx (resolves i40003)
2022-11-28 21:43:50 +00:00
florian
1700516721
* cleanup
2022-11-26 23:27:02 +01:00
J. Gareth "Curious Kit" Moreton
170c112301
* x86: Added FMA as an FPU target distinct from AVX and AVX2 (the latter of which has a new FPUX86_HAS_AVX2 flag)
2022-11-25 22:14:59 +00:00
J. Gareth "Curious Kit" Moreton
69c7838571
* x86: Addition of AMD CPUs: Bobcat, Jaguar, Piledriver, Excavator, Zen2 and Zen3 (and supporting flags)
2022-11-25 22:14:59 +00:00
florian
247423400f
* create muln with create instead of create_internal when converting "n - n mod const)" so pass1 works properly, resolves #40004
2022-11-24 22:43:27 +01:00
Pierre Muller
84be45f55d
Fix compilation failure of RTL with -Co option for x86_64-linux target
2022-11-24 17:01:37 +00:00
Pierre Muller
1a19fe1f03
Use correct class typecast for commit ba4cee279b
2022-11-23 08:43:28 +01:00
florian
0ba4cee279
* convert n-n mod const into n div const*const, resolves #39615
2022-11-22 22:41:58 +01:00
florian
7da8c774be
+ ShlShl2Shl optimization
2022-11-21 22:23:55 +01:00
florian
f6a8b045c2
* cosmetics
2022-11-21 22:10:29 +01:00
florian
4778973492
* further look ahead for temp. deallocation for FstpFldFstp2Fstp and FstpFld2<Nop>
2022-11-19 21:05:22 +01:00
florian
ef53f9bc25
+ FstpFldFstp2Fstp optimization
2022-11-18 23:37:34 +01:00
J. Gareth "Curious Kit" Moreton
e7e4044bf0
* CollapseZeroDistJump no longer updates registers or strips dead labels, instead just setting p to p.Next
2022-11-18 17:20:20 +00:00
J. Gareth "Curious Kit" Moreton
c21bf747fb
* x86: Extension to Cmp1Jl2Cmp0Jle to catch inverted variant
2022-11-18 17:20:20 +00:00
J. Gareth "Curious Kit" Moreton
e57ef24e37
* x86: TEST and CMP optimisations now perform jump optimisations prematurely to remove unnecessary TEST/CMPs
2022-11-18 17:20:20 +00:00
J. Gareth "Curious Kit" Moreton
3cf8ae8433
* x86: New XOR->BTC peephole optimisation
2022-11-15 21:10:47 +00:00
J. Gareth "Curious Kit" Moreton
f2bd099afb
* x86: Converted BTR and BTS tests to use a new utility function to check if BTx instructions are acceptable to use
2022-11-15 21:10:47 +00:00
J. Gareth "Curious Kit" Moreton
8220221866
* x86: New AND(NOT X)->BTR peephole optimisation
2022-11-15 21:10:47 +00:00
J. Gareth "Curious Kit" Moreton
827fe2bd83
* x86: New OR->BTS peephole optimisation
2022-11-15 21:10:47 +00:00
J. Gareth "Curious Kit" Moreton
314f632377
* x86: New TEST->BT peephole optimisation
2022-11-15 21:10:47 +00:00
florian
a27cb35fa8
* propagate life info properly
2022-11-15 22:06:56 +01:00
florian
3b43bd027c
* calculate life info for if nodes correctly if the then branch is empty, resolves #39992
2022-11-13 22:28:08 +01:00
J. Gareth "Curious Kit" Moreton
c9461b7313
* x86: Flags that relate to optimization hints rather than features have been moved to a separate set
2022-11-13 19:23:30 +00:00
Jonas Maebe
57466587c5
llvmdbg: remove unnecessary typedef intermediates
2022-11-12 21:14:28 +01:00
J. Gareth "Curious Kit" Moreton
a0c87be0fc
* x86: Zen processors now marked with CPUX86_HAS_FAST_BT_MEM flag
2022-11-12 13:18:53 +00:00
florian
d3abd339b7
+ cpu switch for zen
2022-11-11 23:45:52 +01:00
J. Gareth "Curious Kit" Moreton
e942c00f82
x86: MovMovMov2XChg optimisation now makes use of the CPUX86_HAS_FAST_XCHG flag
2022-11-11 22:29:58 +00:00
J. Gareth "Curious Kit" Moreton
aa5517d442
* x86: New CPU feature flags in cpuinfo units
2022-11-11 22:29:58 +00:00
Pierre Muller
71df6b83c6
Avoidd to use hp1 after calling RemoveInstruction, as the VMT is invalidated
2022-11-11 22:20:17 +00:00
Sven/Sarah Barth
a2789d611f
* fix crash in debug output in TX86AsmOptimizer.DoArithCombineOpt for DEC/INC $reg
2022-11-07 23:35:23 +01:00
Pierre Muller
d18ff64ed7
Fix a_load64_reg_ref and a_load64_ref_reg mips methods
2022-11-07 22:24:34 +00:00
Pierre Muller
c96bb0f416
Handle unaligned references in 64-bit a_load_ref_reg and a_load_reg_ref methods
2022-11-06 22:14:38 +00:00
florian
36afcbf7fe
* only i386 uses same special fastcall calling convention
2022-11-06 22:48:18 +01:00
J. Gareth "Curious Kit" Moreton
236febb148
* x86: Fixed bugs in and refactored and renamed
...
DoSubAddOpt optimisation method
2022-11-06 21:01:58 +00:00
Sven/Sarah Barth
9e3483fbeb
* fix #39977 : allow a capturer to access any method independant of visibility as the visibility checks are supposed to have been done before the captured symbol was converted
...
+ added test
2022-11-06 22:01:49 +01:00
Sven/Sarah Barth
b051e7667c
* fix #39978 : ensure that Self is captured when a method of the current class is captured into a function reference
...
+ added test
2022-11-06 22:01:49 +01:00
Sven/Sarah Barth
d221f42a57
* ensure that the correct overload is picked for function reference parameters
...
+ added tests
2022-11-06 22:01:49 +01:00
Sven/Sarah Barth
19cee9b841
+ mark the def for a capturer class with a corresponding object option
2022-11-06 22:01:48 +01:00
Sven/Sarah Barth
a714e2ff35
* fix #39981 : retrieve the symbol that returns the desired procdef/procvardef not maybe the Self or something else as we need that symbol to differentiate the procdefs
...
+ added test
2022-11-06 22:01:48 +01:00
Sven/Sarah Barth
3c2703787c
* ensure that newly created tloadparentfpnodes have a valid resultdef as they might be created in situation where the loadnode itself is no longer typechecked
2022-11-06 22:01:48 +01:00
J. Gareth "Curious Kit" Moreton
c40f518de4
* x86: "x and ((1 shl y) - 1)" to BZHI adapted for in_and_assign_x_y
2022-11-06 15:42:09 +00:00
J. Gareth "Curious Kit" Moreton
7da9b4a988
* x86: The code generator will now attempt to manipulate "x and ((1 shl y) - 1)" to use BZHI
2022-11-06 15:42:09 +00:00
J. Gareth "Curious Kit" Moreton
e748e4c7ab
* x86: Added new emit_reg_ref_reg routine and related methods to support BMI2 instructions
2022-11-06 15:42:09 +00:00
Jonas Maebe
95f94a279c
llvmdbg: fixes for method debug info
...
Mark "self" parameter as artificial
Add methods to the scope of the class/record rather than to the file scope
Add the vmt field, strip the "($)hidden" prefix from its name, and emit its
real type
2022-11-06 16:41:25 +01:00
Jonas Maebe
c5cdfbd9c0
dwarf-eh: don't emit header if there's no data to emit
2022-11-06 16:41:25 +01:00
florian
1b08b89b7b
* check if a target really supports safecall before calling load_safecallresult_node
2022-11-06 16:38:01 +01:00
florian
3db1415a44
* generate correct dfa for subroutines declared as safecall
2022-11-05 16:56:24 +01:00
florian
e67670fa70
* changed of do_optdeadstoreelim must be passed by reference as noted by Alexey Torgashin
2022-11-03 19:01:02 +01:00
florian
342524c312
* run dead store elimination multiple times if needed
2022-11-02 22:14:12 +01:00
florian
a0366d7d28
* dead store elimnation should not remove statements which can cause an exception
2022-11-02 22:13:40 +01:00
florian
3f7bf0fd70
* stop generation of typed array constants if the size does not match, resolves #39980
2022-11-01 21:16:31 +01:00
florian
0eee70ac81
* fix FindUnitSymtable for exception symtables, resolves #24801 and #39974
...
* more consistent naming of exceptsymtable enumeration symbol
2022-10-31 20:19:10 +01:00
J. Gareth "Curious Kit" Moreton
dbd8259c48
* x86: Fixed mistake in var9 optimisation under -Os; "andl $255,%eax" is not
...
smaller than "movzbl %al,%eax" because the immediate is sign-extended,
not zero-extended, so $255 will be stored as a 32-bit value.
2022-10-31 18:40:23 +00:00
Pierre Muller
92cc78e723
Allow cycle to finish successfully with -dEXTDEBUG without ALLOW_WARNINGS=1
2022-10-31 07:09:37 +01:00
Jonas Maebe
6d3e3d06e2
Linux: don't discard CFI when using it for exceptions
2022-10-30 21:57:19 +01:00
Jonas Maebe
57935a895c
Darwin: really fix -Xg for DWARF4
2022-10-30 21:57:19 +01:00
Jonas Maebe
e62cf5b9e7
systems_iphonesym -> systems_iphonesim
...
It's a simulator, not a symbolator
2022-10-30 21:57:18 +01:00
J. Gareth "Curious Kit" Moreton
3ba9cf5b4f
* x86: PostPeepholeOptTestOr has different debug messages for each found instruction, and also tests for BEXTR and BZHI.
2022-10-30 16:16:56 +00:00
J. Gareth "Curious Kit" Moreton
a7d1f7d771
* x86: FuncMov2Func now has code to remove "mov %reg,%reg" (since it doesn't get removed in Pass 2).
2022-10-30 16:06:01 +00:00
J. Gareth "Curious Kit" Moreton
3d805b8a9a
* x86: FuncMov2Func moved to separate method and also called by OptPass2MOV.
2022-10-30 16:06:01 +00:00
J. Gareth "Curious Kit" Moreton
d35be8a9ea
* x86: Extended FuncMov2Func optimisation to handle 1, 3 and 4-operand functions
2022-10-30 16:06:01 +00:00
J. Gareth "Curious Kit" Moreton
9fc2b9062d
* x86: Updated Mov0LblCmp0Jne optimisation to work when alignment hints appear before the label
2022-10-30 15:58:43 +00:00
florian
a1064ad8fd
+ MovSubCmp2MovSub optimization
2022-10-30 16:58:09 +01:00
Pierre Muller
ae12a79bf7
Avoid string truncation
2022-10-30 10:59:31 +01:00
Pierre Muller
dce70b3b70
Short version of the mips code genration bug
2022-10-29 21:34:00 +01:00
Jonas Maebe
f18524f2fe
Darwin: fix mac0S 11.0 version string
...
Prevents LLVM warnings
2022-10-29 14:24:37 +02:00
Jonas Maebe
cd8ddffe42
AArch64: X18 is not a volatile register
...
It may be unused on some platforms, but in general it's reserved for OS library
usage (usually related to TLS)
2022-10-29 14:24:37 +02:00
Jonas Maebe
49fb1b4c29
RTTI: don't generate full RTTI for internal types
...
These are types created by the code generator for internal purposes, and hence
are never queried by user code
2022-10-29 14:24:37 +02:00
Sven/Sarah Barth
f0e31628ad
* ensure that hmodule is initialized correctly
2022-10-29 12:15:59 +02:00
Sven/Sarah Barth
e050a019a2
* fix #29859 : ensure that it's correctly passed down into generate_specialization whether a unit name was provided for the specialization and if so search the generic only in that unit
...
+ added tests
2022-10-28 17:40:53 +02:00
Sven/Sarah Barth
35a57bac94
* generate the generic name for a specialization of a generic interface alias in the same way as for specializations in general
2022-10-28 17:36:22 +02:00
Sven/Sarah Barth
399d82e1da
- remove unused consume_generic_interface; it has been superseded by handle_generic_interface in 17a0ac7fc0
2022-10-28 13:57:02 +02:00
florian
c75bb80b14
* more debug messages
...
* better exit codes for test
2022-10-26 23:20:18 +02:00
Pierre Muller
49ddf159b2
Fix internalerror generated with riscv32 compiler.
...
Fix
Compiling ./fcl-passrc/src/pscanner.pp
pscanner.pp(2512,40) Fatal: Internal error 2006010801
error generated for riscv32-linux target after commit #c83e6c34
by correcting expectloc for riscv32 for 64-bit comparisons.
Add a small test.
2022-10-25 18:42:14 +02:00
florian
be401422fd
* more warnings after last commit fixed
2022-10-24 22:52:52 +02:00
florian
3fa77a4f62
* fix life information propagation for while loops, resolves #39971
...
* warnings/errors fixed which are caused by the new life information propagation
+ test
2022-10-24 22:13:43 +02:00
florian
86547d35d7
+ apply OpTest/Or2Op optimization to ANDN as well
...
+ DebugMsg for OpTest/Or2Op added
2022-10-23 22:10:35 +02:00
J. Gareth "Curious Kit" Moreton
a1ea1dd98e
* x86: Changed BMI2 check to BMI1 for ordinal ANDN optimisation
2022-10-22 21:08:36 +00:00
Pierre Muller
f3179cb718
Add system_powerpc_wii to supported_targets of powerpc generic GNU assembler
2022-10-22 15:34:38 -05:00
J. Gareth "Curious Kit" Moreton
626e23d89f
* x86: The code generator will now attempt manipulate "x and (not y)" (where x and y are ordinals) to use ANDN.
2022-10-22 13:13:44 +00:00
J. Gareth "Curious Kit" Moreton
567244007e
* x86: Improvement to bug fix so an optimisation can still be made even if the other register is in use
2022-10-22 13:07:16 +00:00
J. Gareth "Curious Kit" Moreton
41b8f6a42e
* x86: Bug fix where improved AddMov2Mov optimisation didn't
...
check to see if the other register was modified in between
2022-10-22 13:07:16 +00:00
florian
2b48afe151
* check if optinfo is assigned before using it, resolves #39913
2022-10-21 21:14:39 +02:00
florian
2c51abf40d
+ print optinfo pointer if set
2022-10-21 21:13:28 +02:00
Martin
dd0711a27e
Fix incorrect dwarf entry count. Issue #39928 introduced in 1b6982107f
2022-10-20 20:03:23 +00:00
florian
e142953c6d
* make the hidden high parameter for short strings a byte for 8 bit CPUs
2022-10-19 22:48:54 +02:00
J. Gareth "Curious Kit" Moreton
45b1d592f5
* x86: Bug fix where "mov $0,%reg" was inserted on the wrong side of a SETcc instruction
2022-10-18 20:47:42 +00:00
J. Gareth "Curious Kit" Moreton
27aa4d4e34
* x86: ConvertJumpToRET now sets the condition to C_None
2022-10-18 20:47:42 +00:00
florian
5670a7543c
* properly reset nf_write/nf_modify flags for min/max inline nodes, needed by dead store optimization, resolves #39958
...
* factored out nutils.node_reset_pass1_write
2022-10-16 22:51:50 +02:00
Jeppe
c83e6c34a9
riscv32: Fix 64bit comparisons
...
- Code taken from MIPS backend
- Removed some unused code generated for RV32 64bit integer ops
2022-10-16 17:37:53 +02:00
florian
1c86a4bbeb
* if a pointer_to_array type conversion is applied to a variable, it is not written, resolves #39957
2022-10-14 23:12:18 +02:00
florian
e2a26ecece
* fixes tcg64frv.a_op64_const_reg_reg based on the analysis of Bart B, resolves #39953
2022-10-13 23:16:19 +02:00
Jonas Maebe
b150480c60
Darwin: don't try to print size statistics if the binary wasn't linked
2022-10-12 22:58:19 +02:00
Jonas Maebe
a835d8b533
rgobj: reduce compilation time of programs with long movelists
...
Reduces compilation time of webtbs/tw2242 for AArch64 with -O2 from
15 minutes to 10 seconds on my system.
from 15 minutes to 10 seconds
2022-10-12 22:58:18 +02:00
Jonas Maebe
e2ade64a1e
cgbase: make first parameter of supregset_reset "out"
2022-10-12 22:58:18 +02:00
Pierre Muller
d217a459aa
Fix bug report #39952 .
...
* compiler/aggas.pas: Avoid use of .long for 64bit constant
for targets that automatically insert alignments.
+ tests/webtbs/tw39952.pp: New test from bug report 39952.
2022-10-12 21:28:16 +01:00
Sven/Sarah Barth
bb51ac77dd
* the right side of a concatenation of multiple ShortString values can directly pass any String[x] to the utility routine, because only the Length() is used, not High() and nothing is modified (also typed pointers must not be used for them); this allows for better code generation for strings with a maximum length < 255
2022-10-11 07:40:13 +02:00
florian
1b6982107f
* TDebugInfoDwarf3.appenddef_object should not write an extra finish_entry for objects and C++ classes
2022-10-10 22:46:25 +02:00
florian
3e5f6d3228
* use AllocRegbetween in TARMAsmOptimizer.RemoveSuperfluousMove, resolves #39921
2022-10-09 21:32:22 +02:00
Sven/Sarah Barth
02aac653d2
* optimize shortstring concatenations if they're on the right side of an assignment to directly use the left side instead of a temporary
2022-10-09 13:56:52 +02:00
Sven/Sarah Barth
32261a0f6d
* fix copy/paste typo in comments
2022-10-09 13:56:52 +02:00
Jonas Maebe
d12bf094ab
cs_opt_consts: disable when non-local gotos are active
...
This optimisation can insert code after the call to fpc_setjmp, resulting in
it not getting executed after a longjmp. Fixes tmacnonlocalgoto on AArch64
with -O2 or higher.
2022-10-08 22:27:23 +02:00
Sven/Sarah Barth
188cac3bc6
* enable OpenStrings by default in mode Delphi
...
+ added test
2022-10-08 13:52:34 +02:00
Sven/Sarah Barth
920e1c8d19
* change PPU version as the change regarding $P/$OpenStrings affects the token buffers of generics (which contains the current settings)
2022-10-08 13:52:33 +02:00
Sven/Sarah Barth
6cbbf9c52a
* $P/$OpenStrings is supposed to be a local switch, so change that accordingly
...
+ added tests
2022-10-08 13:52:32 +02:00
florian
b934517871
* patch by Rika: Optimize some compiler/CFileUtl.pas functions for returning unchanged strings, resolves #39882
2022-10-07 22:32:59 +02:00
florian
ad7cc0e69d
* handle <dyn.array>+[] (and swapped) correctly, resolves #39919
2022-10-05 22:48:21 +02:00
florian
f8848dd185
* fix for commit a91e5478
, mixed localalignmax and constalignmax
2022-10-03 22:03:55 +02:00
florian
a91e547832
* set the maximum alignment values for constants and variables to 64 on aarch64-linux
2022-10-03 14:40:57 +02:00
florian
2396b36c21
* nil =/<> dyn. array is a valid expression, so isbinaryoperatoroverloadable needs to take care of it, resolves #39933
2022-10-03 10:26:09 +02:00
florian
9a760db573
* nicer error message
2022-10-02 20:47:07 +02:00
florian
7dc2a61788
* comment for git fixed
2022-10-01 19:04:09 +02:00
florian
9e9b38d0cf
* cfi for avr needs 32 bit pc begin and range
2022-09-29 23:06:03 +02:00
florian
1fc54dd8bb
* improve dwarf cfi on avr
2022-09-28 22:47:06 +02:00
florian
123f196d5d
* small correction to linker script
2022-09-27 22:10:56 +02:00
florian
88cf633b97
* use append_object_struct also for dwarf-3 when creating dwarf debug info for objects, resolves #39920
2022-09-26 21:28:39 +02:00
florian
9375257365
* look ahead for ShlOp2Op optimization
2022-09-25 20:43:57 +02:00
florian
1a66cde35b
* apply ShlOp2Shl optimization also to floating point operations
2022-09-24 22:48:41 +02:00
florian
444fe092da
* propertly check equality with the for-counter when propagating constants, resolves #39915
2022-09-24 20:39:43 +02:00
florian
dbbb91705f
* improved fix for #39912
2022-09-23 21:56:24 +02:00
Sven/Sarah Barth
b11366c95b
* when generating the call to the extracted function reference inside the nested routine we need to use the parameters of the nested function and not those of the newly created procdef (fixes some of the test case failures with -O2)
2022-09-23 15:50:19 +02:00
Sven/Sarah Barth
965bba5ab4
* cleanup captured symbols when moving them from the nested function to the new method
2022-09-23 14:44:42 +02:00
Jonas Maebe
efbf5eaa01
Fix loading of ObjC protocol type after c8fee69345
...
That type lives in the objcbase unit, not in the system unit
Resolves #39914
2022-09-21 21:27:04 +02:00
Pierre Muller
b8920670f4
Change is_macro to return true for A_JAL if in pic mode
2022-09-20 22:33:14 +01:00
Pierre Muller
2187bfaddd
Add name of unit for return type if not from current module in tprocdef.customprocname
2022-09-20 22:53:37 +02:00
Sven/Sarah Barth
4f9acc10f0
* fix #39898 : when a loadnode is captured ensure that its nf_load_procvar flag is applied to the subscript node as well
...
+ added tests
2022-09-20 00:01:49 +02:00
florian
af1194de4d
* end of an include file works like a new line with regard to single line (//) comments, resolves #39912
2022-09-19 23:03:36 +02:00
J. Gareth "Kit" Moreton
5a6d9ff532
x86: Deeper insight in OptPass2ADD and OptPass2SUB to produce more efficient code
2022-09-18 19:02:24 +00:00
J. Gareth "Curious Kit" Moreton
e7218d09fb
* x86: New MovShr/Sar2Movx optimisation
2022-09-18 14:06:18 +00:00
Sven/Sarah Barth
c8fee69345
* fix #39907 : only load system class types from units that are marked as a System unit
...
+ added test
2022-09-18 15:41:33 +02:00
Sven/Sarah Barth
7b09eee02a
* mark units compiled with cs_compilesystem with a corresponding flag
2022-09-18 15:41:33 +02:00
Pierre Muller
aca84a8128
Add /usr/lib64 and /lib64 to default library path list for sparc linux
2022-09-18 14:02:40 +02:00
florian
168016b865
* patch by Rika: Use linear file list in FInput.TInputFileManager instead of linked, resolves #39880
2022-09-17 22:46:57 +02:00
J. Gareth "Curious Kit" Moreton
b872322678
* x86: New "shr %cl; shr x" swap optimisation
2022-09-16 16:57:55 +00:00
J. Gareth "Curious Kit" Moreton
6757bf3832
* x86: New SHR-based optimisations
2022-09-16 16:57:55 +00:00
Sven/Sarah Barth
e21186cac0
* fix #39902 : in case of mode ObjFPC function pointers passed to parameters need to be checked for the correct procdef as well
...
+ added adjusted/extended test
2022-09-16 16:20:42 +02:00
Sven/Sarah Barth
13fb30c52e
* fix #39902 : correctly handle assignment of procvars to properties with a field write accessor
...
+ added adjusted/extended test
2022-09-16 16:20:42 +02:00
Jonas Maebe
68253e2a73
Missing file from b26703feaa
2022-09-16 15:22:05 +02:00
Sven/Sarah Barth
d1d0afe337
* handle_calling_convention is only needed for a function reference used in a record/class/object when it's an anonymous one
2022-09-16 14:32:25 +02:00
Sven/Sarah Barth
c43f671baa
* check whether the hdef is still a procvardef before accessing it as such
2022-09-16 14:31:57 +02:00
Jonas Maebe
b0e1867b4c
symcreat: support for scanner/parser escape sequences
...
Support escape sequences when parsing internally generated code. Used for now
to force interpreting certain identifiers as unit/namespace identifiers.
2022-09-16 11:21:05 +02:00
Jonas Maebe
e746cf96da
Overload selection: call procvars if result is compatible with parameter
...
Previously we only autmatically called procvars without parameters in TP/Delphi
modes if their result type was equal to the parameter type to which they were
passed. Resolves #39748 .
2022-09-16 11:21:05 +02:00
Jonas Maebe
136022a7b2
objc: stop generating coalesced sections
...
When targeting >= Mac OS X 10.6, don't generate coalesced sections anymore
because they are deprecated. Resolves #39818
2022-09-16 11:21:05 +02:00
Jonas Maebe
df3a0af7e0
objc: use compile-time macOS version checks
...
Use "modern" APIs for calling inherited messages when targeting Mac OS X 10.6
or later
2022-09-16 11:21:05 +02:00
Jonas Maebe
b26703feaa
Darwin version comparisons: factored out into object
...
Use numeric instead of string comparisons
2022-09-16 11:21:05 +02:00
Jonas Maebe
657b9a6203
LLVM: support for -Sv (manual vector usage)
...
Override register type for vectors to "integer registers" because we don't
use mmregister on LLVM (they're all virtual, so it doesn't matter)
2022-09-16 11:21:05 +02:00
Jonas Maebe
f51798e449
High level codegen: set MM register type for vectors
2022-09-16 11:21:05 +02:00
Jonas Maebe
a6c7ed5e61
vector support: use vector result types
...
Set the result of a vector add node to a vector type.
Ensure that that these vector types are still asignment-compatible with
regular array types (may want to change this when we expose vector types),
and don't remove type conversions from vector types to array types (so the
code generator pass can still rely on the resultdef being a vector type)
2022-09-16 11:21:04 +02:00
Jonas Maebe
cb96acefc9
vector support: check supported type during parsing already
...
Avoids internalerrors at the code generation stage when using an unsupported
type
2022-09-16 11:21:04 +02:00
Sven/Sarah Barth
62a57bf82e
* fix #39903 : correctly parse anonymous function references in records (and classes/objects)
...
+ added test
2022-09-15 22:57:05 +02:00
florian
f562a8d9fd
* hopefully final fix after 9848349610
2022-09-14 22:34:50 +02:00
florian
cc7d67d08c
* i8086 compiler fixed after 9848349610
2022-09-13 22:30:52 +02:00
florian
9848349610
* allocate registers correctly for method pointers on 16 bit address cpus, resolves #39603
2022-09-12 23:08:34 +02:00
florian
e024fdc5d7
* cleanup
2022-09-11 22:43:07 +02:00
J. Gareth "Curious Kit" Moreton
6cbb3d982d
* x86: Added SARX to BMI2 code generator
2022-09-10 19:10:55 +00:00
J. Gareth "Curious Kit" Moreton
83969d3ba3
* x86: Added BEXTR and BZHI to special spilling rules since they follow the same format as SHRX etc.
2022-09-10 19:10:55 +00:00
J. Gareth "Curious Kit" Moreton
63a2395e2c
* x86: Made a check for BMI2 more explicit in the integer division code generator
2022-09-09 21:02:29 +00:00
florian
3a11ee9a14
* apply OptPass1Data to neg as well
2022-09-06 21:42:29 +02:00
florian
f097d1ea35
* use the bts instruction on x86 if possible, the reg,reg variant is better than a mov/shl/or sequence
2022-09-05 23:24:05 +02:00