Commit Graph

291 Commits

Author SHA1 Message Date
Michaël Van Canneyt
adf9f98f7c * Define char as AnsiChar 2023-07-22 08:26:22 +00:00
Nikolay Nikolov
3e21d24098 + magically insert a void externref type in the System unit, called WasmExternRef 2023-06-05 04:26:57 +03:00
Jinyang He
12c4290ffe Add loongarch64 architecture support to compiler 2023-02-05 19:18:48 +00:00
Jonas Maebe
3a34fc7be3 llvm: use formaldef rather than undefineddef for llvm_metadata
Better matches the intent, and fixes compilation issues on AArch64
2022-06-12 21:20:37 +02:00
Jonas Maebe
fe0048bcec llvm: changed llvm_metadatatype from untyped pointer to undefineddef
That matches its meaning better, as it should not result in type conversions.
E.g. some kinds of metadata parameters expect a "type register" parameter such
as "metadata i32* %reg.3"
2022-06-04 22:26:40 +02:00
Pierre Muller
5acd7a7b83 Rename tsymtable.insert and delete methods to insertsym ands deletesym 2022-05-03 23:00:28 +02:00
nickysn
93ecf5f155 * synchronized with trunk
git-svn-id: branches/wasm@47357 -
2020-11-09 00:06:32 +00:00
svenbarth
c496b609d1 * fix for Mantis #38051: make Chr() a real intrinsics so that it can be used in type declarations as well
+ added test

git-svn-id: trunk@47353 -
2020-11-08 22:23:02 +00:00
nickysn
22f082c18f * synchronized with trunk
git-svn-id: branches/wasm@47026 -
2020-09-30 21:30:37 +00:00
pierre
fa12dfa7b5 Rename pvmt internal type to lower_pvmt for i386-watcom as watcom assembler is not case sensitive
git-svn-id: trunk@47014 -
2020-09-30 12:18:39 +00:00
nickysn
62cb7c2d12 * synchronized with trunk
git-svn-id: branches/wasm@46214 -
2020-08-03 21:15:39 +00:00
nickysn
6e7bb5927e [PATCH 04/83] update for Wasm target. adapting Karoly's changes from webassembly branch
From 8acd7baf8d14236dc12781dd15bac188581ccecf Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <skalogryz.lists@gmail.com>
Date: Thu, 29 Aug 2019 15:09:58 -0400

git-svn-id: branches/wasm@45881 -
2020-07-29 16:28:18 +00:00
svenbarth
d401639b24 * fix for Mantis #37251: apply patches by Bi0T1N to implement the IsConstValue() intrinsic
+ added tests

git-svn-id: trunk@45695 -
2020-06-25 20:42:47 +00:00
nickysn
f81c4a9454 * synchronize with trunk
git-svn-id: branches/z80@44519 -
2020-04-02 22:55:11 +00:00
florian
44d9498eff * cosmetics
git-svn-id: trunk@44514 -
2020-04-02 20:04:02 +00:00
nickysn
755fe97c51 * synchronize with trunk
git-svn-id: branches/z80@44397 -
2020-03-29 16:24:32 +00:00
florian
73c68236b6 * Xtensa: completed compiler skeleton
git-svn-id: trunk@44323 -
2020-03-21 12:49:45 +00:00
florian
70a836c4a2 * first part of merging parts of Jeppe's intrinsics patch, mainly r31135
is merged by this commit with a lot of adaptions

git-svn-id: trunk@43949 -
2020-01-14 21:52:39 +00:00
Jonas Maebe
9bd33f7a45 + support for LLVM metadata constant string parameters
o they are implemented as a new metadata register class, whereby the
     subregister indicates the metadata type (currently always a string)
     and the superregister is an index in the metadata array (which
     contains the strings). LLVM metadata can only be passed as parameters
     to intrinsics in bitcode, so moves of metadata into other registers
     triggers internal errors and when moving them into parameters, we
     replace the parameter's register with the metadata register (and look
     up the corresponding string when writing out the bitcode)

git-svn-id: trunk@43816 -
2019-12-30 15:04:57 +00:00
svenbarth
b0ac0ddcc9 + add support for the IsManagedType() intrinsics which reports for a type (or variable) whether it needs initialization/finalization
+ added tests

git-svn-id: trunk@43409 -
2019-11-06 23:04:52 +00:00
Jonas Maebe
a051b8d225 - remmoved doregister parameter from t*sym constructors, as the registration
is handled automatically nowadays

git-svn-id: trunk@42998 -
2019-09-14 17:30:45 +00:00
Jonas Maebe
d8903ce6b3 - removed maxcrecordalign parameter/field from recordsymtables, as this value
cannot be modified in the settings (so we can directly use the one from
    current_settings)

git-svn-id: trunk@42447 -
2019-07-14 19:24:32 +00:00
Jonas Maebe
3fa6838815 * basic llvm metadata support
git-svn-id: branches/debug_eh@41978 -
2019-05-02 19:45:26 +00:00
Jonas Maebe
b3a8543a56 * synchronised with trunk till r40942
git-svn-id: branches/debug_eh@40943 -
2019-01-20 17:37:07 +00:00
Jonas Maebe
170ec00348 - removed withnode (was no longer used since a very long time)
git-svn-id: trunk@40777 -
2019-01-05 22:28:37 +00:00
Jonas Maebe
9630eb7ce9 * synchronised with trunk till r40466
git-svn-id: branches/debug_eh@40467 -
2018-12-04 19:54:31 +00:00
Jonas Maebe
122d0d36d6 + volatile() expression that marks an expression as volatile
* disable matching volatile references in the assembler optimisers, so they
    can't be removed (more conservative than needed, but better than removing
    too many)
   o the CSE optimiser will ignore them by default, because they're an unknown
     inline node for it
  * also removed no longer used fpc_in_move_x and fpc_in_fillchar_x inline node
    identifiers from rtl/inc/innr.inc, and placed fpc_in_unaligned_x at the
    right place

git-svn-id: trunk@40465 -
2018-12-04 19:53:20 +00:00
Jonas Maebe
bc8ed77af1 * synchronised with trunk till r40398
git-svn-id: branches/debug_eh@40399 -
2018-11-29 21:19:12 +00:00
Jonas Maebe
50ab607676 + customint torddef type to create arbitraty bit-width integers
o use this to handle non-power-of-two-sized parameters for llvm
   o no general support in the parser/code generator, so don't expose

git-svn-id: trunk@40398 -
2018-11-29 20:57:08 +00:00
Jonas Maebe
8555ec1438 + fpc_eh_return_data_regno() intrinsic to get the return register numbers
for the Dwarf EH exception handler result

git-svn-id: branches/debug_eh@40070 -
2018-10-28 18:16:38 +00:00
Jonas Maebe
0b246f3dbd * converted Boolean8 to an internal type, and mapped Boolean to the
new internal pasbool1(type) (part of mantis #34411)
   o apply the _Bool x86-64 parameter passing rules only to pasbool1

git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
Jeppe Johansen
ceb38833f2 Added RiscV32/64 target, from a cleaned up version of branches/laksen/riscv/trunk.
git-svn-id: branches/laksen/riscv_new@39474 -
2018-07-20 08:21:15 +00:00
florian
6d5ce55232 * unified def creation for open arrays
git-svn-id: trunk@38408 -
2018-03-04 17:59:05 +00:00
nickysn
0119e7afb3 * changed the codepointer type in the i8086 small and compact memory models from
nearpointer to nearcspointer

git-svn-id: trunk@37730 -
2017-12-14 17:36:15 +00:00
nickysn
ef6cc202cd * corrected check for f_variants, introduced in r37660 (it was incorrectly
checking for f_threading instead)

git-svn-id: trunk@37668 -
2017-12-03 15:20:45 +00:00
florian
0725bfcdf0 * do not generate references to the variant type, if the variants feature is not available
git-svn-id: trunk@37660 -
2017-12-02 17:16:32 +00:00
nickysn
78e0f6c68b + added an i8086-specific FarAddr() function, similar to Addr(), but always
returns a far pointer, regardless of the current memory model

git-svn-id: trunk@37628 -
2017-11-27 16:41:48 +00:00
svenbarth
0b02dab684 + new Delphi-compatible intrinsic GetTypeKind() which returns the TTypeKind of a type as a constant value (and thus can be optimized away in If- and Case-statements)
+ added test

git-svn-id: trunk@36875 -
2017-08-11 22:12:53 +00:00
florian
b367cdeb96 * create intern types for sparc64
git-svn-id: trunk@36429 -
2017-06-05 21:32:13 +00:00
nickysn
efc5e339d0 * use an enum instead of integer constants to represent inline numbers
* compinnr.inc include file converted to a unit
* inline number field size stored in ppu increased from byte to longint
* inlines in the parse tree (when written with the -vp option) now printed with
  their enum name, instead of number

git-svn-id: trunk@36174 -
2017-05-10 14:41:43 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
florian
fc4a8c0daa * more z80 support for the compiler
git-svn-id: branches/z80@35678 -
2017-03-28 20:21:03 +00:00
nickysn
657685a8b6 * use sizesinttype instead of ptrsinttype for the index and high parameter of
open arrays/dynarrays/string-like char arrays, etc.

git-svn-id: trunk@34665 -
2016-10-08 13:56:24 +00:00
nickysn
5501061115 * use sizesinttype instead of ptrsinttype for the $length and $mlength fields,
when creating the $pvmt system type

git-svn-id: trunk@34650 -
2016-10-08 00:48:34 +00:00
nickysn
acfe6d2f2c + added alusinttype and aluuinttype to symdef, which correspond to the ALU size,
sizeof(aint) and the ALUSInt/ALUUInt types in the RTL

git-svn-id: trunk@34628 -
2016-10-04 22:36:20 +00:00
nickysn
35b2ffa872 + added types sizesinttype and sizeuinttype, corresponding to the SizeInt and
SizeUInt types for the target platform

git-svn-id: trunk@34619 -
2016-10-04 13:40:02 +00:00
nickysn
dd12e0afb2 * set ptrsinttype and ptruinttype according to voidpointertype.size, instead of
using the cpuXXbitaddr define, so it now really reflects the default pointer
  size in the different i8086 memory models

git-svn-id: trunk@34607 -
2016-10-03 20:09:16 +00:00
svenbarth
a2c9c75e97 Convert Insert() and Delete() to intrinsics in preparation for dynamic array support for these two procedures.
Since overloading compilerprocs does not work each procedure got its own unique name, but they are using the new compilerproc extension to map them to the Insert and Delete symbol so that error messages can be shown with the respective name for the procedure declarations instead of fpc_shortstr_delete for example.

git-svn-id: trunk@33895 -
2016-06-03 21:25:49 +00:00
Jonas Maebe
9d2bba1917 * create a separate type and def for the LLVM "i1" type, because reusing
pasbool8type for this results in too much trouble (we mustn't use i1
    for parameters, because then LLVM will try to apply the ABI convention
    for passing "1 bit" values, or in records because then this may
    result in unwanted bitpacking). Downside: the new LLVMBool1 type is
    also exposed in the system unit, because we need it to define LLVM
    intrinsics...

git-svn-id: trunk@33726 -
2016-05-20 20:51:44 +00:00
sergei
36043d13ae - Removed remains of tai_labeled_instruction, already commented out probably in 1.0 times.
git-svn-id: trunk@33074 -
2016-02-09 02:25:27 +00:00