Jules Bertholet
8f86c4abec
Skip align tests on wasm
2025-07-06 18:10:52 -04:00
Folkert de Vries
1fdf2b5620
add #[align] attribute
...
Right now it's used for functions with `fn_align`, in the future it will
get more uses (statics, struct fields, etc.)
2025-06-18 12:37:08 +02:00
Folkert de Vries
df8a3d5f1d
stabilize naked_functions
2025-04-20 11:18:38 +02:00
Folkert de Vries
41ddf86722
Make #[naked] an unsafe attribute
2025-04-19 00:03:35 +02:00
Folkert de Vries
c0957ef45a
naked functions: on windows emit .endef without the symbol name
...
also add test with `fastcall`, which on i686 uses a different mangling scheme
2025-03-11 00:27:32 +01:00
David Wood
92eb4450fa
tests: use minicore more
...
minicore makes it much easier to add new language items to all of the
existing `no_core` tests.
2025-02-24 09:26:54 +00:00
Jubilee Young
3c0c9b6770
tests/codegen: use -Copt-level=3 instead of -O
2025-02-11 13:41:35 -08:00
Folkert de Vries
47573bf61e
add -Zmin-function-alignment
2025-01-10 22:53:54 +01:00
Folkert de Vries
4202c1ea75
make naked function generics test stricter
2024-12-10 21:41:05 +01:00
Folkert
bd8f8e0631
codegen #[naked] functions using global_asm!
2024-12-10 21:41:03 +01:00
Folkert de Vries
562ec5a6fb
disallow asm! in #[naked] functions
...
also disallow the `noreturn` option, and infer `naked_asm!` as `!`
2024-10-06 18:12:25 +02:00
Folkert
47b42bef32
use naked_asm! in naked-function tests
2024-10-06 18:12:25 +02:00
jdonszelmann
c3000ad3ba
add repr to the allowlist for naked functions, and test that it works
2024-08-27 17:17:47 +02:00
Zalathar
5330ccdb34
Use -Zno-profiler-runtime instead of //@ needs-profiler-support
...
For PGO/coverage tests that don't need to build or run an actual artifact, we
can use `-Zno-profiler-runtime` to run the test even when the profiler runtime
is not available.
2024-06-14 13:31:46 +10:00
Nicholas Nethercote
72800d3b89
Run rustfmt on tests/codegen/.
...
Except for `simd-intrinsic/`, which has a lot of files containing
multiple types like `u8x64` which really are better when hand-formatted.
There is a surprising amount of two-space indenting in this directory.
Non-trivial changes:
- `rustfmt::skip` needed in `debug-column.rs` to preserve meaning of the
test.
- `rustfmt::skip` used in a few places where hand-formatting read more
nicely: `enum/enum-match.rs`
- Line number adjustments needed for the expected output of
`debug-column.rs` and `coroutine-debug.rs`.
2024-05-31 15:56:43 +10:00
Guy Shefy
9139d7252d
do not add prolog for variadic naked functions
...
fixes #99858
2024-04-12 15:29:39 +03:00
许杰友 Jieyou Xu (Joe)
6e48b96692
[AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives
2024-02-22 16:04:04 +00:00
Jubilee Young
0ca0556651
tests/codegen/naked-* -> naked-fn/naked-*
2023-07-29 18:34:41 -07:00