I'm working on using rust for an instrumentation library. Currently I have functions like this:
#[no_mangle]
pub extern "C" fn __measure_instruction(
arg: u32,
arg2: u32,
arg3: u32
){}
This works fine when I compile the program and instrumentation together. However, I want to call this instrumentation from binaries without making any register use assumptions. Ideally I want to use the PreserveAll LLVM calling convention so only a limited set of registers need to be saved. I noticed that no Rust call convention entry exists for PreserveAll, is this something I can override or does the Rust compiler need to be modified to add support for PreserveAll?