| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
c_backend: Implement C backend (#3504) * c_backend: Implement C backend Add the `--cflags` option to forward flags to the underlying C compiler * c_backend: Fix Windows cross-compilation Cross-compiling for Windows using the C backend failed to produce valid C code and target object files. Win32 entry points were incorrectly named `main` with invalid parameter counts, untyped function pointer invocations produced illegal C syntax, and mismatched cross-module pointer types caused compiler rejections. Additionally, Clang emitted host-format binaries because target triples were not forwarded, and the runtime required non-freestanding headers. * c_backend: Fix alignment faults in optimized builds Optimized builds targeting x86_64 encountered hardware alignment faults during execution under Windows/Wine. Local variables requiring 16-byte alignment, such as jmp_buf for setjmp and large aggregate buffers, lacked alignment specifiers in the generated C code. This caused unaligned stack placement and crashed SSE instructions like movdqa. Additionally, direct pointer dereferences of 128-bit integers led compilers to emit aligned vector instructions on unaligned memory. Ensure stack variables maintain required alignment and safely perform 128-bit integer pointer accesses. TODO: Needs cleaning * enable tcc TLS * decl mapping and TCC runtime support Check C3 type bit width on shifts to prevent false aborts. Unwrap replaced decls to fix local variable lookups. Emit weak attribute on functions to prevent link collisions. Add missing math builtins, bitwise intrinsics, and __dso_handle for TCC (although TCC doesn't support int128). * Refactor and deduplicate C codegen backend Consolidate repeated code patterns across C codegen to reduce size and improve maintainability. Guard against emitting types from inactive modules. * test_suite_runner: add `--backend` flag * same for ci_test.sh although more changes needed * Add known issues and fix cflags build flag. * Update releasenotes. * Update releasenotes. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 21 天前 | |
c_backend: Implement C backend (#3504) * c_backend: Implement C backend Add the `--cflags` option to forward flags to the underlying C compiler * c_backend: Fix Windows cross-compilation Cross-compiling for Windows using the C backend failed to produce valid C code and target object files. Win32 entry points were incorrectly named `main` with invalid parameter counts, untyped function pointer invocations produced illegal C syntax, and mismatched cross-module pointer types caused compiler rejections. Additionally, Clang emitted host-format binaries because target triples were not forwarded, and the runtime required non-freestanding headers. * c_backend: Fix alignment faults in optimized builds Optimized builds targeting x86_64 encountered hardware alignment faults during execution under Windows/Wine. Local variables requiring 16-byte alignment, such as jmp_buf for setjmp and large aggregate buffers, lacked alignment specifiers in the generated C code. This caused unaligned stack placement and crashed SSE instructions like movdqa. Additionally, direct pointer dereferences of 128-bit integers led compilers to emit aligned vector instructions on unaligned memory. Ensure stack variables maintain required alignment and safely perform 128-bit integer pointer accesses. TODO: Needs cleaning * enable tcc TLS * decl mapping and TCC runtime support Check C3 type bit width on shifts to prevent false aborts. Unwrap replaced decls to fix local variable lookups. Emit weak attribute on functions to prevent link collisions. Add missing math builtins, bitwise intrinsics, and __dso_handle for TCC (although TCC doesn't support int128). * Refactor and deduplicate C codegen backend Consolidate repeated code patterns across C codegen to reduce size and improve maintainability. Guard against emitting types from inactive modules. * test_suite_runner: add `--backend` flag * same for ci_test.sh although more changes needed * Add known issues and fix cflags build flag. * Update releasenotes. * Update releasenotes. --------- Co-authored-by: Christoffer Lerno <christoffer@aegik.com> | 21 天前 | |
Add @feat (#3406) * - Add `@feat` attribute. - Add `$feat` compile time function. * Update http tests. * Fixes * EMSCRIPTEN -> POSIX | 2 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 21 天前 | ||
| 21 天前 | ||
| 2 个月前 |