Commit Graph

26984 Commits

Author SHA1 Message Date
Nikolay Nikolov
3d55ac9d09 * fixed bug, introduced in 6ff566350c, due to
missing parenthesis
2023-06-11 09:01:07 +03:00
Nikolay Nikolov
6ff566350c * disallow passing WebAssembly reference types as untyped var/constref/const parameters 2023-06-11 08:56:27 +03:00
Nikolay Nikolov
f670ebbb28 * disallow WebAssembly reference types to be declared as var, constref or out parameters 2023-06-11 08:17:06 +03:00
Nikolay Nikolov
8cd6606970 + support nil comparison of WebAssembly reference types (externref and funcref) 2023-06-11 07:17:04 +03:00
Nikolay Nikolov
9daabb2123 + support using nil constants for setting values of WebAssembly reference types (funcref and externref) 2023-06-11 06:23:02 +03:00
Nikolay Nikolov
ca03841724 - removed redundant semicolon 2023-06-11 06:07:13 +03:00
Nikolay Nikolov
a47a1c093a * disallow conversion between regular pointers and WasmExternRef 2023-06-11 05:28:39 +03:00
Nikolay Nikolov
8b138aa059 + also check for assigned(left) after calling inherited in twasmaddrnode.pass_typecheck, to avoid another crash 2023-06-11 04:11:02 +03:00
Nikolay Nikolov
84b60d3f00 * check for codegenerror in twasmaddrnode.pass_typecheck and exit early, to avoid crashes 2023-06-11 04:05:17 +03:00
Nikolay Nikolov
8743f72f11 + disallow taking the address of WebAssembly externref type 2023-06-11 04:01:58 +03:00
Nikolay Nikolov
fa9873c6eb Merge branch 'main' into wasm_reference_types 2023-06-11 03:08:40 +03:00
Nikolay Nikolov
a0b78ad1f7 + WebAssembly internal assembler support for the ref.is_null instruction 2023-06-07 06:38:25 +03:00
Nikolay Nikolov
2039509cfb + WebAssembly internal asm support for the ref.null instruction 2023-06-07 06:13:17 +03:00
Nikolay Nikolov
11712658b0 + implemented WebAssembly code generator support for funcref and externref data
types, using new register types R_FUNCREFREGISTER and R_EXTERNREFREGISTER
2023-06-07 05:25:57 +03:00
Nikolay Nikolov
e555eddeda * fixed the textual representation of the ref.null instruction for llvm-mc 2023-06-07 03:36:28 +03:00
Nikolay Nikolov
48556ab039 + enable the reference types extension in llvm-mc via a command line option 2023-06-07 03:30:40 +03:00
Pierre Muller
3770b55ce1 Disable substitution by environment variables in message comment related functions 2023-06-07 01:02:28 +02:00
Pierre Muller
627fd6bce1 Add new substitute_env_variables parameter for DefaultReplacements function (with default true value) 2023-06-07 01:02:28 +02:00
Nikolay Nikolov
3b3a0a660c * the a_ref_null instruction split into two subinstructions - a_ref_null_externref and a_ref_null_funcref 2023-06-07 01:42:46 +03:00
Nikolay Nikolov
1f76366125 + introduced the is_wasm_reference_type(tdef) helper 2023-06-05 05:00:31 +03:00
Nikolay Nikolov
5cc4096f41 * formatting 2023-06-05 04:56:03 +03:00
Nikolay Nikolov
c33f47a707 + introduced is_wasm_externref(tdef) helper 2023-06-05 04:55:33 +03:00
Nikolay Nikolov
022d2804a9 + introduced is_wasm_funcref(tdef) helper 2023-06-05 04:51:03 +03:00
Nikolay Nikolov
dd09bf64b3 + handle externref parameters in create_functype_common 2023-06-05 04:37:54 +03:00
Nikolay Nikolov
a778fb2eaa + support externref in defToWasmBasic 2023-06-05 04:31:53 +03:00
Nikolay Nikolov
3e21d24098 + magically insert a void externref type in the System unit, called WasmExternRef 2023-06-05 04:26:57 +03:00
Nikolay Nikolov
c925c1aaa6 + introduced flag is_wasm_externref to tcpupointerdef for wasm32. This is to be
used for declaring WebAssembly externref reference types.
2023-06-05 04:09:56 +03:00
Nikolay Nikolov
ad69c6e1b5 + also support funcref parameters in create_functype_common 2023-06-05 02:53:44 +03:00
Nikolay Nikolov
bebe53ef9f * added support and simplified the handling of results in create_functype_common for reference types 2023-06-05 02:46:34 +03:00
Nikolay Nikolov
60cde554fd + handle wasm funcrefs in tgcpu.defToWasmBasic 2023-06-05 02:44:34 +03:00
Nikolay Nikolov
33fb887479 * ppudump compilation fixed 2023-06-05 01:45:30 +03:00
Nikolay Nikolov
93438ef1a5 + added the wasmfuncref directive for procvars. Not actually implemented, just
parsed.
2023-06-05 01:29:22 +03:00
florian
52147baa04 * correct tripletcpustr, resolves #40301 2023-05-31 20:26:50 +02:00
Michael VAN CANNEYT
a3f441b590 * loongarch64 architecture reinstated 2023-05-31 09:40:43 +02:00
Michael VAN CANNEYT
babcb631f8 * Delegate darwin ifdef out of program flow, towards const, for clarity 2023-05-31 09:34:24 +02:00
Michael VAN CANNEYT
c0893e5c16 * get rid os some warnings 2023-05-31 09:34:24 +02:00
Michael VAN CANNEYT
c6effbd676 * Refactor: add utility routine to handle command-line changes 2023-05-31 09:34:24 +02:00
Michael VAN CANNEYT
a52b3522dc * Refactor: Rename some variables for clarity 2023-05-31 09:34:24 +02:00
Michael VAN CANNEYT
647f211aa5 Refactor check for -PB and -PP for clarity of flow 2023-05-31 09:34:23 +02:00
Michael VAN CANNEYT
5d104c9115 Refactor initialization of binary and processor name for clarity of flow 2023-05-31 09:34:23 +02:00
Michael VAN CANNEYT
27476a915b * Refactor processorname -> suffix name for clarity of flow 2023-05-31 09:34:23 +02:00
Michaël Van Canneyt
8696ca652d * Emit comments in RTTI info for classes/interfaces 2023-05-29 13:41:25 +00:00
Michaël Van Canneyt
0515be62b4 * Add option to allow emitting comments in RTTI info 2023-05-29 13:41:25 +00:00
Pierre Muller
3bb2586269 Fix for sparc64 specific code generation bug report #40252 2023-05-26 17:10:23 +02:00
Pierre Muller
484c178c15 Add new make variable BETATARGETS, for CPU targets in beta stage, to include it into distclean list 2023-05-26 11:32:16 +00:00
Pierre Muller
5a123d33ba Add -Awin64-as option for aarch64 compiler for win64 target 2023-05-26 11:15:55 +00:00
Pierre Muller
c1e2f557f1 Add '-b pei_aarch64' option for aarch64-win64 system 2023-05-26 11:15:55 +00:00
Pierre Muller
d24548f8d8 Disable -EB/-EL passing for freertos OS as the corresponding released binutils do not support this option 2023-05-25 21:47:27 +00:00
Pierre Muller
c38cc828e8 Add new test code to verify that tentfile.buf limits are not overpassed 2023-05-23 22:39:03 +02:00
ccrause
be54d40660 Also add boot information to board aliases. 2023-05-22 19:08:01 +00:00
ccrause
289fdc72c5 [AVR] Include bootloader starting address and max size where relevant. 2023-05-22 19:08:01 +00:00
Pierre Muller
c6d936dc25 Use clang instead of as for AsBinStr for aarch64-win64 target 2023-05-22 13:27:48 +00:00
florian
8ae016fb85 * clearified message is mentioned in documentation issue 39349 2023-05-21 15:38:21 +02:00
Pierre Muller
219fedfea6 Restore start section at end of assembler block inside z80 asm reader 2023-05-15 19:51:11 +02:00
Pierre Muller
7c64bce04e Set defdynlinker depending on selected ABI for riscv32 and riscv64 2023-05-11 16:21:05 +00:00
Pierre Muller
665670ae01 Add -EB or -EL paramter to xtensa assembler call (Warning: this requires a patched 2.40 release\!) 2023-05-11 01:02:04 +00:00
Pierre Muller
4750840e89 Specify endianess and abi when calling xtensa linker 2023-05-11 01:02:04 +00:00
Pierre Muller
60cff917ba Only modify softfloat_exception_mask, as this is not handled equally for all CPUs with GetEXceptionMask/SetExceptionMask 2023-05-10 15:16:24 +01:00
Pierre Muller
24acfb8064 * Use correct sizeof to check if entry size is large enough 2023-05-10 07:38:28 +01:00
Pierre Muller
b53034705f Use GetExceptionMask/SetExceptionMask to avoid floating point exception inside FPC_SOFT_FFPUX80 code 2023-05-06 10:03:26 +02:00
Pierre Muller
f720ea3a21 Restrict previous change to compilers that do not have 10-byte extended type 2023-05-04 22:54:59 +02:00
Pierre Muller
bb407aa135 Fix for tentryfile.getreal with FPC_SOFT_FPUX80, putreal still needs the same change 2023-05-04 00:23:30 +02:00
J. Gareth "Curious Kit" Moreton
e40996cd2c * Fixed bug in "JccMovJmpMov2CMovCMov" optimisation where it didn't track registers in references getting changed 2023-04-30 22:25:55 +00:00
Pierre Muller
144ee6d51d Add missing swaping in case of different endianess of stab entry inside TInternalAssembler.WriteStab 2023-04-30 21:23:06 +02:00
Pierre Muller
dc04a8a677 Fix storing of unaligned 64-bit to memory 2023-04-21 10:32:13 +01:00
Pierre Muller
aaf356ba9f Avoid read past buffer end for empty source when checking for utf-8 signature 2023-04-12 20:10:44 +02:00
Pierre Muller
892220d6fe Treat -Cb / -Cb- options in first pass (to be able to use FPC_BIG_ENDIAN inside .fpc.cfg config file) 2023-04-06 16:49:40 +02:00
Pierre Muller
2a4ca98e85 Use systems_darwin set for supported targets for as_clang_llvm_darwin 2023-04-06 14:40:15 +00:00
Pierre Muller
3855625b8d Add tf_use_psabieh for LLVM for x86_64-iphonesim, aarch64-ios and aarch64-iphonesim targets 2023-04-05 00:01:03 -05:00
florian
a807144ead * patch by Rika: Fix and possible simplification of SanitiseXMLString, part of #39800 2023-04-04 23:21:14 +02:00
florian
8f3cce556d * some error messages use nicer symbol names 2023-04-01 22:34:37 +02:00
Nikolay Nikolov
4143912b72 * use a TFPList, instead of a dynamic array in twasmnodeutils.InsertObjectInfo.
No functional changes.
2023-04-01 17:17:42 +03:00
Nikolay Nikolov
e82c98bfce * wasm32: generate module info by traversing through current_module and its
used_units list recursively. This should fix #40229
2023-04-01 04:25:15 +03:00
florian
e40f997a40 * another patch to fix #40223 2023-03-31 23:45:45 +02:00
Pierre Muller
644ffa8e7a Do not always set DEBUG_AOPTCPU 2023-03-30 22:07:37 +00:00
florian
6663d5ca63 * do not replace index registers with esp/rsp, resolves #40223 2023-03-30 21:36:35 +02:00
Dmytro Bogatskyy
327aac7f24 Add aarch64-iphonesim target 2023-03-27 18:45:00 +00:00
florian
b797bbf5dc * spelling fixed 2023-03-26 15:55:37 +02:00
florian
466561f09f * patch by Rika: Use Index* for pointer lists, resolves #40218 2023-03-25 21:32:29 +01:00
florian
3ad8b4199c * patch by Rika: Shorten cutils.compareansistrings, resolves #40213 2023-03-24 22:50:19 +01:00
Jonas Maebe
12bde4e903 WPO: fix dead code detection, and handle procvars
Extend dead code detection to not only look for the main mangled name, but also
for any aliases before deciding that a routine has been dead-stripped.

Assume objects/classes can also be constructed if the address of one of their
constructors or of the TObject.NewInstance class method has been taken.

Resolves #40204
2023-03-24 21:22:18 +01:00
florian
8cd10d88cc * revert use of DW_AT_external for types as this is not covered by the dwarf standard 2023-03-23 22:44:00 +01:00
florian
4848327300 * write types declared in the interface section with a DW_AT_external tag, should resolve #40210 2023-03-22 21:16:49 +01:00
florian
488c389b9b + support FILEEXISTS(...) in preprocessor expressions, resolves #39527
+ tests
  * tscannerfile.readpreproc sets preproc_pattern correctly for quoted strings
2023-03-20 23:17:09 +01:00
florian
0d3ec87492 * also initalize default helper variables of initialization sections, resolves #40183 2023-03-19 21:19:10 +01:00
Jonas Maebe
0ea0b69a30 LLVM: cleaned up some comments 2023-03-18 23:14:25 +01:00
Jonas Maebe
e41bfa0495 LLVM: LLVM 16 support
No changes compared to LLVM 15 that affect us
2023-03-18 23:13:58 +01:00
Jonas Maebe
839849085b LLVM: don't use type names in ctor/dtor arrays
Workaround for https://github.com/llvm/llvm-project/issues/56809
2023-03-18 23:13:03 +01:00
Jonas Maebe
0e46041717 WPO: also consider NewInstance to detect class instancing
Resolves #40200
2023-03-18 21:18:25 +01:00
florian
64319dc019 * PopCount takes care only of the bit pattern, so take the uvalue to avoid an internal error, resolves #40190 2023-03-17 22:30:36 +01:00
Sven/Sarah Barth
c1ecfc323a * ensure that a procvar (especially a "REFERENCE TO") begins either with FUNCTION or PROCEDURE
+ added test
2023-03-15 23:39:59 +01:00
florian
7909f00c83 * project files updated 2023-03-15 23:01:44 +01:00
florian
2b0317f400 * compilation fixed with -Oodfa 2023-03-14 23:10:32 +01:00
florian
30cb20bccd + riscv32-freertos: first version of TlinkerFreeRTOS.GenerateDefaultLinkerScripts 2023-03-14 22:22:01 +01:00
J. Gareth "Curious Kit" Moreton
3f25438d35 * x86: TEST/Jcc/TEST optimisations can now look beyond the next instruction under -O3 2023-03-11 22:10:35 +00:00
J. Gareth "Curious Kit" Moreton
d372286159 * x86: RegModifiedByInstruction and RegInInstruction
are now more accurate for (I)MUL and (I)DIV.
2023-03-11 22:10:35 +00:00
J. Gareth "Curious Kit" Moreton
3635f7cd6f * x86: Fixed oversight in RegModifiedByInstruction not checking W0, W1 and WU-type flags 2023-03-11 22:10:35 +00:00
J. Gareth "Curious Kit" Moreton
b637a3a022 * x86: Fix to MOV/CMP register deallocation positioning 2023-03-11 22:10:35 +00:00
ccrause
f83a8f0f8f Only perform OpCp2Op optimization when the first Op is ANDI and comparison is against 0. 2023-03-09 18:19:20 +02:00
J. Gareth "Curious Kit" Moreton
77f53ebde3 * x86: The LEA/LEA optimisations can now work with a different
destination register and the intermediate register still in
	 use.
2023-03-08 21:54:41 +00:00
J. Gareth "Curious Kit" Moreton
931bda5633 * x86: LeaLea2Lea now handles cases where the second LEA instruction
has a second register in the reference.
2023-03-08 21:54:41 +00:00
florian
66ff7a928c + added debug messages 2023-03-08 22:54:17 +01:00
florian
99b01f6634 * second mul might get called with a zero operand if the other has a side effect,
handle this correctly in ti386addnode.second_mul64bit, resolves #40182
2023-03-06 23:19:34 +01:00
florian
bf8746ed10 * fixed comment
* shortened code
2023-03-05 21:24:50 +01:00
florian
ccbdfa9150 + x86: AND/CMP -> CMP optimiziation 2023-03-04 21:20:52 +01:00
J. Gareth "Curious Kit" Moreton
b8933dd267 * x86: Some refactoring to use aoc_ForceNewIteration instead of manually advancing p 2023-03-04 18:40:27 +00:00
J. Gareth "Curious Kit" Moreton
7854152304 * Adjustment to TBLockNode.pass_1 to actually strip nothing nodes 2023-03-03 21:07:31 +00:00
J. Gareth "Curious Kit" Moreton
ecf2ad3e53 x86: Some oversights fixed where another iteration of pass 1 wasn't performed when it should have been 2023-03-03 20:47:24 +00:00
florian
708aaa7b97 * fix (hopefully) build without an ld.bfd variant 2023-03-02 22:56:23 +01:00
florian
40f23030dc * check if a linker with the postfix .bfd exists, if yes, use it, resolves #40175 2023-03-01 23:01:19 +01:00
J. Gareth "Curious Kit" Moreton
c4899b5dc0 * Dead code in TAddNode.Simplify has been stripped 2023-02-28 20:56:38 +00:00
J. Gareth "Curious Kit" Moreton
487ca08cf3 * In TAddNode.Simplify, commutative operations now ensure integer constant operands go on the right for simplicity 2023-02-28 20:56:38 +00:00
Sergey Larin
de58691e75 Allow WideChar const to UTF8String const conversion 2023-02-24 22:59:39 +00:00
J. Gareth "Curious Kit" Moreton
4d33e5f137 * x86: OptPass1_V_MOVAP now uses GetNextInstructionUsingReg and UpdateUsedRegsBetween 2023-02-24 19:39:39 +00:00
J. Gareth "Curious Kit" Moreton
9ee672f9eb * New UpdateUsedRegsBetween utility subroutine 2023-02-24 19:39:39 +00:00
florian
95e5eeb226 * fix compilation with -dEXTDEBUG 2023-02-24 20:39:13 +01:00
J. Gareth "Curious Kit" Moreton
a5702d89e8 * More complex uses of the pruning methods in TAddNode.Simplify 2023-02-21 20:44:02 +00:00
J. Gareth "Curious Kit" Moreton
9d8fd6d55e * TAddNode.Simplify now uses pruning methods 2023-02-21 20:44:02 +00:00
J. Gareth "Curious Kit" Moreton
7488f1e3f8 * New node pruning methods 2023-02-21 20:44:02 +00:00
J. Gareth "Curious Kit" Moreton
2a44ffe51b * x86: BZHI optimisation now sets the subtract and shift nodes to 'do not execute' as they are skipped over. 2023-02-21 20:44:02 +00:00
J. Gareth "Curious Kit" Moreton
16bd996e74 * x86: 'and not' optimisation now sets the NOT node to 'do not execute' as it is skipped over 2023-02-21 20:44:02 +00:00
J. Gareth "Curious Kit" Moreton
1b43913408 * New 'do not execute' flag for notes and respective internal error triggering 2023-02-21 20:44:02 +00:00
florian
586a7d30ab * patch by ccrause: fixes another .fpc* section problem for AVR, resolves #40162 2023-02-20 22:48:15 +01:00
J. Gareth "Curious Kit" Moreton
dd7320ec13 * x86: PostPeepholeOptCmp and PostPeepholeOptTestOr
now do a final attempt of TrySwapMovCmp to
	 clean up Pass 2 optimisations
2023-02-19 20:22:49 +00:00
J. Gareth "Curious Kit" Moreton
4d676cd6fa * x86: JccMovJmpMov2CMovCMov will no longer move
MOV instructions (fixes i40122)
2023-02-19 20:22:49 +00:00
florian
8f7e61eef6 * patch by ccrause: do not load .fpc* sections into avr microcontroller to save space, resolves #40160 2023-02-19 20:19:20 +01:00
J. Gareth "Curious Kit" Moreton
4e8ef448ed * i386: Bug fix where EBP was marked as preserved when it wasn't, causing faulty optimisations 2023-02-19 16:49:29 +00:00
florian
a221f2af79 * completed post/pre inc/decrement addressing mode instructions in TAoptBaseCpu.RegModifiedByInstruction 2023-02-18 11:15:39 +01:00
florian
22f1289b2a * post/pre inc/decrement references modify obviously the base register on avr, resolves #40153 2023-02-17 23:02:40 +01:00
florian
ece59f2534 * also count the use of enum syms in preprocessor expressions correctly 2023-02-16 23:02:47 +01:00
florian
811c683775 * set rangedef of dyn. arrays correctly, resolves #40149 2023-02-15 22:14:55 +01:00
Pierre Muller
b49c3fe4f8 Aslo check that live_end is assigned before refering to it 2023-02-13 15:50:04 +01:00
Pierre Muller
c8b2a36bb1 Add support for -Ploongarch64 option 2023-02-13 13:01:21 +00:00
florian
63199a0966 * memory sizes updated 2023-02-12 20:55:38 +01:00
J. Gareth "Curious Kit" Moreton
2224305834 * x86: Fixed bad register tracking in OptPass2JMP 2023-02-12 15:14:21 +00:00
florian
def475f889 * arm compilation fixed 2023-02-11 21:21:21 +01:00
florian
d06852e6e9 + exec_e_cant_call_linker shows now the error message 2023-02-11 21:07:01 +01:00
florian
d3ccd10674 * call esptool.py properly on Darwin 2023-02-11 21:06:40 +01:00
florian
67864b662a * fix systems_freertos 2023-02-11 20:49:52 +01:00
florian
c7a0c0bbb4 * set FPU type properly for riscv32-freertos 2023-02-11 20:42:31 +01:00
florian
f1f84a292c * don't not generate non-constant leb128 entriesm for riscv32-freertos 2023-02-10 21:28:39 +01:00
florian
0e05e908d5 riscv32-freertos:
* unit name fixed
 * linker script fixed
 * assembler supports dwarf
2023-02-09 21:29:06 +01:00
florian
71e0c12c88 * set fpu type correctly for riscv32-freertos 2023-02-08 22:38:17 +01:00
florian
87ec3d6fad + completed identifiers for RiscV ABIs 2023-02-08 22:26:58 +01:00
florian
7e3bdd501c * enable to check the existing of environment variables in config files 2023-02-08 21:33:21 +01:00
florian
f79448a9ff * target cpu type fixed 2023-02-07 22:59:51 +01:00
J. Gareth "Curious Kit" Moreton
33dfb6cb4e * x86: Converted bit-test optimisations to use
debug_hexstr so comments aren't truncated
	 (and put $ before BTx values)
2023-02-06 21:31:50 +00:00
J. Gareth "Curious Kit" Moreton
ae47cc2c88 * x86: New debug_hexstr instruction to help produce concise debug comments 2023-02-06 21:31:50 +00:00
florian
6e84ee5806 * patch by Jinyang He to fix building loongarch64 with -Oodfa/-O4 2023-02-06 22:26:02 +01:00
Jinyang He
783bbb66f9 Update Makefiles 2023-02-05 19:18:48 +00:00
Jinyang He
92e60d2107 add loongarch64 linux rtl support 2023-02-05 19:18:48 +00:00
Jinyang He
3d2c96ebbf Add loongarch64 linux support to compiler 2023-02-05 19:18:48 +00:00
Jinyang He
12c4290ffe Add loongarch64 architecture support to compiler 2023-02-05 19:18:48 +00:00
Jinyang He
8fac3d62ce add has_double_field 2023-02-05 19:18:48 +00:00
Jinyang He
96f4300158 Fix the edge of first_imaginary in move op 2023-02-05 19:18:48 +00:00
Jinyang He
2d680afab7 Fix the ~ is NOR rather than NOT 2023-02-05 19:18:48 +00:00
Jinyang He
cda8971baa Add dwarf cfa support 2023-02-05 19:18:48 +00:00
Jonas Maebe
7f41bb4718 JVM: add typesym for anonymous record typed constants
Fixes compilation of system unit with JVM compiler after b38d13577f
2023-02-05 10:58:59 +01:00
florian
9c10167b6f + CPUX86_HAS_BSWAP 2023-02-04 19:20:10 +01:00
Karoly Balogh
6bbb10e64d m68k: do not generate LEA instructions with explicitly specified size. only long is possible anyway. 2023-01-30 09:56:41 +01:00
Karoly Balogh
c577ac5ce9 m68k: add tables to convert from some stub opcodes + condition into real opcodes. Use them in the external assembler writer for now. Later the internal assembler will need these tables too. 2023-01-30 09:56:41 +01:00
florian
e9ec4a8bb3 * more riscv32-freertos-esp32c3 stuff added 2023-01-29 19:30:11 +01:00
florian
09b435cdab * transform a/a only into 1 if fastmath is on 2023-01-29 13:49:33 +01:00
florian
bedd4edc72 + first work for esp32-c3 support 2023-01-28 21:28:19 +01:00
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