Commit Graph

26670 Commits

Author SHA1 Message Date
florian
048385fd7f * compilation fixed 2023-01-28 11:42:52 +01:00
florian
3e75ba52f3 * initial preparations for riscv32-freertos 2023-01-27 22:39:15 +01:00
Sven/Sarah Barth
e8fcc5343b * use new chartype_for_stringlike function to retrieve the char type for a stringlike def instead of casting to a stringdef 2023-01-26 07:07:34 +01:00
Sven/Sarah Barth
ea417fbaaf + add utility function to retrieve the char type def from a stringlike def 2023-01-26 07:07:34 +01:00
florian
dfb8794d4d * compilation after merge fixed 2023-01-25 20:44:34 +01:00
Pierre Muller
aaa6f0d9c5 Only signed extension is needed 2023-01-25 19:36:45 +00:00
Pierre Muller
4793447be1 Add sign extension to 32-bit for unaligned OS_8 and OS_16 types (to try to solve #40102) 2023-01-25 19:36:45 +00:00
florian
8ef0f59025 * mark constant symbols used in preprocessor expressions as used, resolves #40108 2023-01-24 22:36:26 +01:00
Jonas Maebe
821c22a38f LLVM: workaround to fix make all 2023-01-23 22:44:48 +01:00
Jonas Maebe
e54197e9d2 Darwin: support -Xg for DWARFv4 2023-01-22 22:34:25 +01:00
florian
789031a6e6 * compile float*2 as float+float if possible as proposed by Rika, resolves #40116 2023-01-22 20:07:40 +01:00
florian
ec28b7586c + support procvar[] in tp/mac procvar mode if the procvar returns an array type 2023-01-22 16:24:29 +01:00
J. Gareth "Curious Kit" Moreton
f3f9c68ddb * x86-64: Extended the movl/movq optimisation to cover more distance 2023-01-22 09:35:35 +00:00
J. Gareth "Curious Kit" Moreton
42b052eb83 * x86-64: movl/movq -> movl/movl zero-extension optimisation 2023-01-22 09:35:35 +00:00
Jonas Maebe
00a5d30300 LLVM: remove use of getelementptr in make_simple_ref_ptr
We cannot safely infer whether it needs to be indirect or not there,
it should be done at a higher level if appropriate.
2023-01-20 21:07:18 +01:00
Jonas Maebe
51fdbb5524 macOS: set max var/constalign to 64
For all non-ppc(64) targets. Fixes test/talignrec1.
2023-01-20 21:07:18 +01:00
Jonas Maebe
29bae2297f tcginnode.pass_generate_code: use tlhcgobj.g_undefined_ok
Also override the code that uses this for LLVM with a variant that does not
need it for LLVM versions that do not support the freeze instruction.
2023-01-20 21:07:18 +01:00
Jonas Maebe
ab581c5c30 LLVM: override thlcgobj.g_undefined_ok
Uses the freeze instruction available in LLVM 10.0+. If we don't freeze undef/
poison values before using them in a calculation (even if that calculation is
something like "and 0", which masks the result completely), the result will
still be undef/poison and will keep propagating.
2023-01-20 21:07:18 +01:00
Jonas Maebe
ee0ad3ff86 thlcgobj.g_undefined_ok: new method
Specify that a register's contents may be undefined because of previous
operations (e.g. shifting by more bits than the register has, whose result
depends on the target architecture), but that the code generator will
later on ensure that if this is the case, that result will be overwritten/
masked.
2023-01-20 21:07:18 +01:00
Jonas Maebe
0b6942de8a llvm:a fix opaque ptr IR for Objective-C protocol
Also for interfacecom functions and properties. Fixes test/tobjc9 and
test/tobjc9b with LLVM 15.0+
2023-01-20 21:07:18 +01:00
florian
55deefbab5 * do not crash on illegal with statement, resolves #40118 2023-01-18 23:03:28 +01:00
florian
5598ffc210 * x86_64: warn only on negative offsets if rsp is involed, second part of #40113
+ tests
2023-01-17 23:09:42 +01:00
florian
8b08486fa1 * do not warn on lea e/rsp with negative address offset, part of #40113
+ tests
2023-01-15 23:06:05 +01:00
Pierre Muller
5cedecbe25 Avoid float_raise call in FPC_SOFT_FPUX80 code 2023-01-14 11:41:20 +00:00
Pierre Muller
977ca19dc0 Set current_filepos in Internal assembler class also if DEBUG macro is set 2023-01-14 11:41:20 +00:00
florian
a9dca32689 * undid accidentely activated define 2023-01-13 22:34:57 +01:00
florian
e77ec69de4 * avoid internal error in case of an illegal generic declaration 2023-01-12 23:05:51 +01:00
J. Gareth "Curious Kit" Moreton
df80d4e612 * x86: CMOV optimisations now check optimizecputype rather than cputype 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
4d57dee8d9 * x86: Extension to CanBeCMOV that permits a potentially unsafe reference if it appears in the previous comparison 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
b108608b29 * x86: New CMP optimisation that mimics some of the CMOV optimisations and removes unnecessary conditions. 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
bab60d819f * x86: Refactored CMOV optimisations and permitted the use of constants in some cases. 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
5f3749dc49 * x86: Introduced TrySwapMovOp method, and redesigned TrySwapMovCmp
to use it while also trying to move one more instruction back
2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
6af886c2b9 * Removed foolish inline from StripLabelFast 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
5cdef8050b * Fixed bug in register preservation tracking 2023-01-10 22:23:58 +00:00
florian
f4d9082028 * copyright for 2023 updated 2023-01-09 22:54:46 +01:00
Karoly Balogh
3cea1706e9 m68k: more work on instruction validation for the internal assembler 2023-01-09 12:01:10 +01:00
Karoly Balogh
69761839c0 m68k: removed the unused S_IQ opsize 2023-01-09 12:01:10 +01:00
florian
0b45cd95f7 + introduce long forms for $E, $F and $S, resolves #39889 2023-01-08 21:29:31 +01:00
Karoly Balogh
459dc68ab9 m68k: more boiler plate and refactor for a future internal assembler 2023-01-05 13:32:34 +01:00
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