codegen #[naked]
functions using global_asm!
This commit is contained in:
parent
9c707a8b76
commit
bd8f8e0631
18 changed files with 624 additions and 102 deletions
|
@ -442,6 +442,14 @@ impl<'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn mangled_name(&self, instance: Instance<'tcx>) -> String {
|
||||
let llval = self.get_fn(instance);
|
||||
llvm::build_string(|s| unsafe {
|
||||
llvm::LLVMRustGetMangledName(llval, s);
|
||||
})
|
||||
.expect("symbol is not valid UTF-8")
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn inline_asm_call<'ll>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue