rust/tests/codegen/patchable-function-entry.rs
Matthew Maurer ac7595fdb1 Support for -Z patchable-function-entry
`-Z patchable-function-entry` works like `-fpatchable-function-entry`
on clang/gcc. The arguments are total nop count and function offset.

See MCP rust-lang/compiler-team#704
2024-06-25 18:21:42 +02:00

9 lines
251 B
Rust

// compile-flags: -Z patchable-function-entry=15,10
#![crate_type = "lib"]
#[no_mangle]
pub fn foo() {}
// CHECK: @foo() unnamed_addr #0
// CHECK: attributes #0 = { {{.*}}"patchable-function-entry"="5"{{.*}}"patchable-function-prefix"="10" {{.*}} }