Commit Graph

65102 Commits

Author SHA1 Message Date
Jonas Maebe
f1bcd02aaf Typed const builder: store tsym
Useful for LLVM debug info generation
2022-05-13 22:49:02 +02:00
Jonas Maebe
5075198a8b tfileposinfo: separate types for the fields
Allows other units to declare variables of the appropriate type when storing
those values separately
2022-05-13 22:49:02 +02:00
Jonas Maebe
b7b495a679 LLVM: assign procdef.procstarttai, like in the regular code generator 2022-05-13 22:49:02 +02:00
Jonas Maebe
229eb93e72 tnodeuitls: merge GenerateObjCImageInfo into InsertObjectInfo
LLVM needs to insert the Objective-C image info into the general object info
metadata. This way we don't need to store a reference to that metadata so
as to add extra data to it later (tnodeutils is never instantiated, it only
contains class methods)
2022-05-13 22:49:02 +02:00
Jonas Maebe
78535bbcd8 agllvm: support for writing specialised metadata nodes 2022-05-13 22:49:02 +02:00
Jonas Maebe
d294731542 LLVM: enable DWARF debug info generation 2022-05-13 22:49:02 +02:00
Jonas Maebe
527c68b6c3 agllvm: remove useless code 2022-05-13 22:49:02 +02:00
Jonas Maebe
a8cb061a50 LLVM: support for attaching metadata to instructions 2022-05-13 22:49:02 +02:00
Jonas Maebe
4293d4455c LLVM: factor out writing operands in agllvm 2022-05-13 22:49:02 +02:00
Jonas Maebe
411fa298ae LLVM: data location debug info support
This was added to LLVM for Fortran arrays, but can also be used for Pascal
dynamic arrays
2022-05-13 22:49:02 +02:00
Jonas Maebe
1d010d918b LLVM metadata: specialised metadata fleshing out 2022-05-13 22:49:02 +02:00
Jonas Maebe
ac89cfc6c7 aasmtai: added tai_string.Create(ansistring)
Also prevent range check errors for empty strings
2022-05-13 22:49:02 +02:00
Jonas Maebe
4da1ad71a4 * moved a bunch of constants from dbgdwarf to dbgdwarfconst 2022-05-13 22:49:02 +02:00
florian
a285500d36 * patch by Rike: Use reverse_longword instead of manually reversing longword, resolves #39720 2022-05-13 22:38:03 +02:00
Nikolay Nikolov
812736bd41 + support the atomic.fence instruction in the WebAssembly internal object writer 2022-05-13 22:56:36 +03:00
Nikolay Nikolov
1d70437017 + added intrinsic (for RTL internal use) that emits the WebAssembly atomic.fence instruction 2022-05-13 22:46:27 +03:00
Nikolay Nikolov
ddab39dbdc + enable the atomics extension on the llvm-mc command line (extension appears
to be recognized since LLVM 8.0, so it should be safe to always enable this
  from the llvm-mc command line)
2022-05-13 21:15:54 +03:00
Nikolay Nikolov
5198e47e36 + added the atomic memory access WebAssembly instructions from the threading proposal for WebAssembly 2022-05-13 20:55:12 +03:00
Michaël Van Canneyt
de7d7d34ca * Compile jwrsa 2022-05-13 08:52:42 +02:00
Michaël Van Canneyt
6f6a003414 * Patches from Pascal Riekenberg, some small corrections 2022-05-13 08:52:42 +02:00
florian
4f9c19d943 * simplifications by Rika (*2 loops => shl/Bsr), resolves #39717 2022-05-12 22:56:36 +02:00
Pierre Muller
69d40dd17a Use round to convert float constant into s64comp type for LLVM compiler as is done in general case 2022-05-12 22:32:26 +02:00
florian
deec6fc4ba * set max. variable and constant alignment for win32 and win64 to 64 byte boundaries 2022-05-11 20:58:38 +02:00
Pierre Muller
8184287ec0 Fix for variables longer than 127 chars 2022-05-10 23:18:01 +02:00
florian
578ce51fc3 * fix broken merge 2022-05-10 22:38:19 +02:00
florian
a73869b879 * arm-linux: set max. alignment for constants and variables to 32 byte boundaries 2022-05-09 22:45:21 +02:00
florian
084a4a0563 * made checking for supported targets more fool proof 2022-05-09 22:45:01 +02:00
J. Gareth "Curious Kit" Moreton
3e11b0e870 * New tests for aligned records 2022-05-09 20:03:44 +00:00
J. Gareth "Curious Kit" Moreton
971b8b9217 * Compiler error is now thrown if record alignment is not a power of 2 or is greater than 64. 2022-05-09 20:03:44 +00:00
Jonas Maebe
8bef28ccbe PPU version: bump
fcaea21075 changed name mangling
2022-05-09 21:19:06 +02:00
florian
4add05c625 * x86_64-linux and i386-linux align variables and constants up to 64 byte boundaries 2022-05-08 17:50:00 +02:00
Jonas Maebe
3d3c904ac5 TSymStr: more consistent usage 2022-05-08 15:03:44 +02:00
Jonas Maebe
fcaea21075 SymAnsiStr: fix "make all" and webtbs/tw39661*
Fixes compilation with LLVM backend
2022-05-08 14:59:36 +02:00
florian
78f23a462e * set minimum compiler to compile the compiler to 3.2.0 2022-05-07 23:13:16 +02:00
J. Gareth "Curious Kit" Moreton
f4e28ab357 * x86: Fixes to GetInt/MMRegisterBetween assignments 2022-05-07 20:54:40 +00:00
J. Gareth "Curious Kit" Moreton
fb14bc8459 * New webtbs/tw39646.pp test to evaluate fix for
i39646
2022-05-07 20:53:35 +00:00
J. Gareth "Curious Kit" Moreton
54aae023ea * Bug fix that prevents downsizing of
"(x div y) and z" when "x div y" is 64-bit and
    z is 32-bit or less.  Fixes i39646
2022-05-07 20:53:35 +00:00
marcoonthegit
4a8ddc50b3 * fix TreeView_GetItemRect reported by 440bx on forum 2022-05-07 22:10:27 +02:00
marcoonthegit
c745e2cfba * improved version that is still readable and has hex inline. Most importantly, it writes directly to result string rather than a temp, saving a copy that is hurting specially for longer strings. 2022-05-07 19:05:35 +02:00
Michaël Van Canneyt
62c9e19f39 * QOI format read/write implementation by Marģers 2022-05-07 10:30:46 +02:00
Michaël Van Canneyt
712823eb6c * Add some delphi compatibility enumerateds to TShiftState 2022-05-07 10:20:04 +02:00
magorium
d78e39d360 AROS: 32/64-bit RTL utility compatibility update
Update some utility RTL record structures to be 32/64-bit compatible.

Unit Utility was already up-to-date with these changes.
2022-05-06 22:21:47 +00:00
magorium
853b9c5c96 AROS: Unit amigados, record field members update
Update some amigados unit record field members for AROS compatiblity.

These changes reflect the changes made in the doslib RTL (that were present in
the previous commit).
2022-05-06 22:21:47 +00:00
magorium
94d47bf7cb AROS: RTL doslib, record field members update
Update some doslib RTL record field members for AROS compatiblity.
2022-05-06 22:21:47 +00:00
magorium
d207a293c7 AROS: 32/64-bit unit amigados compatibility update
Update some amigados record structures to be 32/64-bit compatible.

These changes reflect the changes made in the doslib RTL (that were present in
the previous commit) but note that some of Unit amigados' record structures
were already up to date.
2022-05-06 22:21:47 +00:00
magorium
b2f6ca70cd AROS: 32/64-bit RTL doslib compatibility update
Update some doslib RTL record structures to be 32/64-bit compatible.
2022-05-06 22:21:47 +00:00
magorium
2324055b1f AROS: Unit exec update. Memory sizes are IPTR
Memory sizes are expressed in IPTR/PtrUInt in order to be compatible to both
32 and 64-bit.

This changes some of Exec API call signatures and should not impact
existing code.

These changes reflect the changes made in the exec RTL (that were present in
the previous commit) but note that Unit Exec record structures were already
up to date.

See: d7df812342
2022-05-06 22:21:47 +00:00
magorium
e339d236e1 AROS: RTL exec update. Memory sizes are IPTR
Memory sizes are expressed in IPTR/PtrUInt in order to be compatible to both
32 and 64-bit.

Affects both record structures and API call signatures.

See: d7df812342
2022-05-06 22:21:47 +00:00
magorium
2a75debff6 AROS: 32/64-bit RTL exec compatibility update
Update some exec RTL record structures to be 32/64-bit compatible.

Unit Exec was already up-to-date with these changes.
2022-05-06 22:21:47 +00:00
magorium
61304bf324 AROS: Add stack aligned record fields for 32-bit and 64-bit compatibility
Final step that attempts to ensure that fields of particular records are
'STACKED' (stack aligned) properly for both 32 and 64 bit.

AROS introduced STACKED structure members, which are members that are padded
according to the current used stacksize which in itself is based on the target
CPU.

These structures are required to have a particular defined size in memory and
have a particular field alignment, therefor these records are always end-padded
(whether required or not) so that we are able to force the compiler to add
padding depending on the RECORDMIN setting.

Other available FPC directives and/or solutions seem currently not able to
solve that issue and we do not wish to manually check each structure to
determine if it requires end-padding or not (based on bitness) simply because
it is unmaintainable.

This change attempts to ensure that these record structures compile using the
correct memory size and field layout for both 32 and 64-bit CPU's.

The introduction of stack aligned record fields solves a lot of 64-bit related
crashes when working with native OOP such as MUI and BOOPSI.

Note: Not tested on big endian.
2022-05-06 22:00:27 +00:00