Commit Graph

107 Commits

Author SHA1 Message Date
1c3f177205 feat(llvm): Continue implementation of compact_unwind support 2025-02-04 10:33:45 +01:00
77e21dad8c feat(compiler): Initial support for GOT-based relocations and compact_unwind tables for Mach-O
(Work in progress) macOS uses a different scheme for exception handling
in Mach-O; in contrast with the "usual" .eh_frame mechanism, Mach-O has
a `compact_unwind` section in which EH-related metadata are embedded.
This commit begins the effort to support it in its entirety. On the path
to that end, it also adds GOT-based relocations, which are necessary for
Mach-O object files.
2025-01-15 12:14:36 +01:00
84b8ced6dd chore: Fix tests 2024-11-06 17:23:27 +01:00
cf2d30940b feat: Move "compilation" types from wasmer_types to wasmer_compiler 2024-11-06 16:42:06 +01:00
481e19fe7f Merge remote-tracking branch 'origin/main' into run-264-upgrade-to-http-10 2024-07-16 08:51:35 +00:00
42ad918bf2 Fix other unwraps in compile iterators 2024-07-13 22:09:44 +10:00
5450f7122e Fix panic if attempting to compile with unsupported CPU (eg. x86_64 without AVX or SSE4.2) 2024-07-13 22:07:08 +10:00
e20857af03 Fix clippy warnings 2024-07-11 15:35:07 +00:00
4a437464fb feat(singlepass): add NEON feature for arm64 2024-03-27 18:27:44 +01:00
db6dd420e1 Optimized ModuleInfo usage 2023-02-16 20:44:49 -08:00
5109a407c4 WASIX Preparation
This commit extracts changes to core libraries made in the WASIX branch.

It is not reasonable to extract the partial commit history, so this is
just a batch commit.

The history will make a bit more sense again if we decide to merge the
WASIX branch with full commit history.
2022-12-16 11:47:04 +01:00
b588819e0e Fixed linter 2022-11-24 11:56:47 +01:00
cee68baee8 Added some unit test for get_cpu_features_used 2022-11-24 11:43:06 +01:00
3ffda13056 Singlepass will also use BMI1 on x86_64 (for TZCNT) 2022-11-23 13:12:11 +01:00
d0bef5c026 Store Used CpuFeature in Artifact instead Present CpuFeatures for Singlepass 2022-11-23 11:28:22 +01:00
907d8c53c8 Merge branch 'master' into imp_singlepass_x86_64_tzcnt 2022-11-21 20:11:17 +01:00
3421e46f6f Some Refactor of Singlepass compiler to have better error and cpu features handling 2022-11-14 13:13:41 +01:00
ecc0c9e547 Limit the use of clone when handling Compilation object 2022-11-09 13:23:44 +01:00
187d2e6364 Remove Artifact trait
In favor of using UniversalArtifact everywhere
2022-07-25 13:13:52 +03:00
e4b0b71164 Converted all machine and emitter of singlepass to use Result instead of panic (but assert are still present) 2022-06-22 11:32:44 +02:00
bdad5298ba Merge branch 'master' into singlepass_multivalue 2022-06-16 16:28:58 +02:00
8f539d134b Move wasmer_compiler/{address_map, function, module, sourceloc, trap, unwind}.rs to wasmer_types 2022-06-16 16:57:45 +03:00
b1f1939bf7 Move wasmer_compiler/{section,relocation}.rs to wasmer_types 2022-06-16 16:57:45 +03:00
feee4e3587 Move wasmer_compiler errors to wasmer_types error module 2022-06-16 16:57:45 +03:00
02be85f610 Enable multi-value handling in Singlepass compiler 2022-06-16 11:12:52 +02:00
5339f7cdae Fix clippy lints
Fixes: #2926
2022-06-09 16:05:53 +02:00
00f9a3c8d7 Remove loupe dependency
Closes #2731
Closes #2744
2022-06-08 14:12:49 +03:00
e745ceab7a Moved TableStyle and MemoryStyle to wasmer-types (and compiler-single pass do not depend from vm anymore) 2022-05-03 09:32:34 +02:00
eb7ef52521 Move VMOffset (and a few friends) to wasmer_types, and adapted compiler-singlepass to use it 2022-05-03 09:32:34 +02:00
d5bbfd0768 Moved TrapCode enum to wasmer_types, and adapted compiler and wompiler-singlepass 2022-05-03 09:32:34 +02:00
408847ee75 Added support for Windows x64 in Singlepass for Unwind infos 2022-03-11 16:01:07 +01:00
187b7508c9 Added some infrastructure to generate EH_Frame in singlepass compiler 2022-03-02 12:21:55 +01:00
b6b07ba4e4 Fix singlepass Arm64 since #2775 2022-02-18 16:43:40 +01:00
82bc23e082 Merge branch 'master' into bat/feature/add-sse-singlepass 2022-01-31 11:46:47 +01:00
b32b5cfa53 [feat]: Adding the plumbing necessary for the singlepass to choose between different simd instruction sets. Partial work on supporting SSE4.2 2022-01-30 10:55:26 +01:00
74779f5e80 Merge branch 'master' into singlepass_aarch64 2022-01-21 11:08:43 +01:00
ffb9cd33b9 Use trampolines for all libcalls in engine-universal and engine-dylib
In both of these engines, the compiled code may be loaded in memory far
from the Wasmer runtime which means that libcalls may not be reachable
through the normal relocation types. Instead a trampoline is needed to
allow reaching any address in the 64-bit address space.

In the case of engine-dylib, this is even worse since the symbols are
not exported by the executable without some special linker flags. The
solution here is to manually patch in the addresses at load time into
a data table of function pointers.
2022-01-20 11:47:20 +00:00
005351ba31 improv(compiler) Added SDIV, UDIV and UREM operations (105 tests passes now) 2022-01-14 17:15:11 +01:00
26d334f4ac improv(compiler) Enabled aarch64 tests 2022-01-14 17:15:10 +01:00
69478cd575 improvement(compiler) Added squeleton for arm64 singlepass 2022-01-14 17:15:10 +01:00
6fd9d132b6 improvement(compiler) renammed codeGen_x64 to CodeGen, now that it's archetecture independant 2021-12-08 11:06:04 +01:00
3e52f770b2 improvement(compiler) CodeGen now completly abstracted, using Machine trait only 2021-12-08 11:01:25 +01:00
517f81b302 improvement(compiler) More x86_64 speicific code removed from CodeGen 2021-12-06 15:38:07 +01:00
6a33200218 improvement(compiler) abstraction of emit_memory_op 2021-12-03 17:51:40 +01:00
cb88b6db62 Avoid depending on the host target in compilers 2021-11-23 15:19:32 +00:00
44eef4964a feat(compiler) Fixed single-pass build 2021-10-05 14:19:08 +02:00
9c9c0beb6b feat(compiler) Adjust test for unsupported platforms 2021-09-16 12:16:18 +02:00
2e5dae0019 feat(compiler) Make CallingConvention a paramter in SinglePass 2021-09-16 11:03:39 +02:00
9f1dcfcb04 feat(compiler) Added windows x86_64 ABI to SinglePass compiler, but tests are not OK yet 2021-09-15 14:09:09 +02:00
98481f51fe Move ModuleInfo to wasmer-types 2021-07-16 15:42:39 -07:00