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