Nikolay Nikolov
33a389dfb7
* WebAssembly internal linker: add the data segment names to the name section
2024-09-20 16:28:14 +03:00
Nikolay Nikolov
a46c6229c5
+ WebAssembly interal linker: add global names to the name custom section
2024-09-19 07:00:56 +03:00
Nikolay Nikolov
507e728ee8
+ introduced local method WriteNameMap for writing name maps in the WebAssembly name custom section
2024-09-19 06:48:22 +03:00
Nikolay Nikolov
b5d0cd57ed
+ introduced method TWasmExeOutput.AddToGlobalNameMap
2024-09-19 06:43:52 +03:00
Nikolay Nikolov
7c545cfa8b
+ introduced method TWasmExeOutput.AddToNameMap
2024-09-19 06:42:03 +03:00
Nikolay Nikolov
85143f515d
+ introduced private type TCustomSectionNameMap to class TWasmExeOutput
2024-09-19 06:40:37 +03:00
Nikolay Nikolov
2ee8a59fbd
+ introduced private type TCustomSectionNameMapEntry to class TWasmExeOutput
2024-09-19 06:39:38 +03:00
Nikolay Nikolov
ffd461860b
+ added extra values to TWasmNameSubsectionType from the extended name section
...
proposal and the gc proposal
2024-09-19 06:35:49 +03:00
Pierre Muller
b1a18f5690
Handle floatx80 records with gaps also in InternalAssembler
2024-09-18 18:54:44 +00:00
florian
76fc3275bc
* handle except blocks as normal code block with regard to specialization of generics, resolves #40890
2024-09-17 23:02:25 +02:00
Nikolay Nikolov
29ee863e8f
- WebAssembly code generator: removed the g_fingerprint hack, that added 4
...
useless i64 constants on the stack with random numbers and then drop them. It
was used for primitive debugging, since previously it wasn't possible to
identify the function name. Now we can produce DWARF debug info, as well as a
"names" custom section to give each function a name and most WebAssembly
environments support at least one of the two mechanisms. Therefore the
g_fingerprint hack is no longer necessary.
2024-09-17 06:14:03 +03:00
Nikolay Nikolov
cf7d9fa4c5
+ WebAssembly internal linker: create a name custom section to help debugging
2024-09-17 05:34:20 +03:00
florian
9d7ea2c069
* revert check for boolean type when handling LOC_FLAG in tcgassignmentnode.pass_generate_code. This makes pas boolean the default,
...
resolves #40908
2024-09-16 22:48:18 +02:00
Pierre Muller
400094921c
Handle cross-endian case inside TCoffObjData.writereloc method
2024-09-16 18:58:40 +00:00
florian
0e0c4bd621
* make UpdateFnv64 closer to the original algorithm as proposed by Gareth
2024-09-15 21:49:02 +02:00
Nikolay Nikolov
beee98e246
* WebAssembly debug info: make wasmtime happy by not emitting line info end
...
sequences for procedures that lack any debug lines emitted previously
2024-09-15 11:15:17 +03:00
Nikolay Nikolov
aba44452f3
* WebAssembly internal linker: also don't remove unused data sections if
...
smartlinking is turned off.
2024-09-15 08:59:08 +03:00
Nikolay Nikolov
36ecb2b5da
* WebAssembly internal linker: don't remove unused code sections if smartlinking
...
is turned off. This is needed for debugging, because FPC doesn't support debug
info with smartlinking on most platforms, and that includes WebAssembly.
2024-09-15 08:32:35 +03:00
Nikolay Nikolov
993db6cf32
WebAssembly debug info: use different LINE_BASE and LINE_RANGE on WebAssembly to
...
improve compatibility with WasmTime's debugger support
2024-09-15 07:21:32 +03:00
Nikolay Nikolov
4914a5a31f
+ introduced LINE_RANGE constant in the DWARF debug info generation unit
2024-09-15 05:36:42 +03:00
Nikolay Nikolov
562ca0ad80
* WebAssembly internal assembler writer: generate the function locals header
...
when assembling the tai_local directive, instead of injecting them manually in
TWasmObjOutput.WriteFunctionCode. This makes function code offsets correct
and avoids the need to manually adjust relocation fixups by adding the locals
header size. It also fixes relative relocations, used in DWARF debug line
info.
2024-09-15 03:44:14 +03:00
Nikolay Nikolov
1a08d76ccb
+ WebAssembly: insert a tai_local directive also for assembler functions
2024-09-15 02:12:48 +03:00
Nikolay Nikolov
80523e192a
* TWasmObjData.DeclareLocal renamed DeclareLocals. No functional changes.
2024-09-15 01:03:56 +03:00
Nikolay Nikolov
b9ca30165c
* WebAssembly: refactored tai_local, so that it is a single directive,
...
containing multiple locals, instead of creating multiple tai_local directives,
each containing a single local. No functional changes.
2024-09-15 00:49:05 +03:00
Nikolay Nikolov
05b67c7408
- WebAssembly: removed tai_local.name, because we don't use it
2024-09-15 00:09:39 +03:00
florian
a685e2aa5a
+ avrsim6 controller type
2024-09-14 16:00:35 +02:00
florian
761b451962
+ AVR: dummy thlcgcpu.g_intf_wrapper implementation
2024-09-14 16:00:07 +02:00
florian
190b27ad45
* use proper value for Fnv64 initialization
...
* PPU version increased
2024-09-14 13:54:54 +02:00
florian
84da5e619c
* use also an FNV hash to shorten interface wrapper names
2024-09-13 22:13:22 +02:00
Pierre Muller
f5336f6311
Set DynamicLinker for FreeBSD systems
2024-09-13 09:22:29 +00:00
Nikolay Nikolov
99943610cb
* WebAssembly: generate the final bashB opcode of a function via the
...
end_function instruction, instead of adding it magically in the object writer.
This makes the WebAssembly debug line info more accurate, covering the
end_function instruction as well.
2024-09-11 07:46:23 +03:00
Nikolay Nikolov
d81170ab23
* fix generation of addend for R_WASM_FUNCTION_OFFSET_I32 relocations. This
...
improves code address accuracy for WebAssembly debug line info information.
2024-09-11 04:50:35 +03:00
Nikolay Nikolov
c8e4a52428
+ WebAssembly internal object writer: added safety check for catching bugs,
...
caused by instruction size changes between Pass1 and Pass2
2024-09-11 04:44:50 +03:00
Nikolay Nikolov
d41d98b70b
* WebAssembly internal object writer: fixed helper function SlebSize()
2024-09-11 04:44:05 +03:00
Nikolay Nikolov
23debb77b3
* set procalign and loopalign to 0 for WebAssembly - code alignment is unnecessary, as this is a VM.
2024-09-11 04:12:00 +03:00
Nikolay Nikolov
d2231e99e8
* fix the final entry size in the .debug_aranges table on platforms where the
...
ALU size differs from the address size (such as WebAssembly 32-bit)
2024-09-11 02:39:29 +03:00
Nikolay Nikolov
cc15a2dba7
* fixed blocksize when generating debug info for WebAssembly threadvars
2024-09-11 01:22:52 +03:00
Nikolay Nikolov
1ddf014980
* create a TWasmGlobalAsmSymbol instead of TAsmSymbol when generating debug info
...
for thread vars. This fixes a memory corruption error, when later the compiler
tries to access the extra fields in TWasmGlobalAsmSymbol for the '__tls_base'
symbol.
2024-09-11 01:12:33 +03:00
Nikolay Nikolov
dbc3e71eda
+ more relocation types added to the enum TWasmRelocationType
2024-09-11 01:00:30 +03:00
Nikolay Nikolov
06917784d0
- removed redundant if
2024-09-11 00:46:58 +03:00
Nikolay Nikolov
b7742def46
+ WebAssembly internal linker: support the R_WASM_GLOBAL_INDEX_I32 relocation,
...
used for threadvar debug info, among another possible uses.
2024-09-11 00:31:27 +03:00
Nikolay Nikolov
60965cdb69
+ generate proper reference to the TLS_BASE_SYM global in the WebAssembly debug info for threadvars
2024-09-11 00:12:53 +03:00
Nikolay Nikolov
9799c6a5ec
+ support writing R_WASM_GLOBAL_INDEX_I32 relocations in the WebAssembly internal object writer
2024-09-11 00:12:20 +03:00
Nikolay Nikolov
ee98fa8e3f
+ WebAssembly internal linker: support data relocations to threadvars, resolve
...
them as relative values to the beginning of the TLS section. Will be used for
generating debug info for threadvars.
2024-09-10 23:56:00 +03:00
florian
1ed9054bb9
* fix capabilites check
2024-09-10 22:53:35 +02:00
Nikolay Nikolov
d60300e807
+ WebAssembly DWARF debug info: generate DW_AT_frame_base entries for functions
2024-09-10 21:42:11 +03:00
Nikolay Nikolov
97e5936f78
* generate debuginfo for WebAssembly threadvars like for normal vars, when
...
WebAssembly threads are turned off
2024-09-10 19:58:32 +03:00
ccrause
fc76d9fac2
Omit FPC_INIT_FUNC_TABLE generation if no unit initialization is registered for current project.
2024-09-09 20:00:44 +00:00
J. Gareth "Curious Kit" Moreton
677fd4fb00
* Added missing i386-win32 target selection
2024-09-09 14:24:05 +01:00
Nikolay Nikolov
424686ce34
* fix warning (second attempt :) )
2024-09-07 18:05:35 +03:00