1
Fork 0

Implement global_asm! using an external assembler

Fixes #1061
This commit is contained in:
bjorn3 2020-07-09 16:55:38 +02:00
parent 1987a3b6c0
commit 037d411bf4
5 changed files with 121 additions and 18 deletions

View file

@ -284,6 +284,26 @@ fn main() {
#[cfg(not(jit))]
test_tls();
#[cfg(not(jit))]
unsafe {
global_asm_test();
}
}
#[cfg(not(jit))]
extern "C" {
fn global_asm_test();
}
#[cfg(not(jit))]
global_asm! {
"
.global global_asm_test
global_asm_test:
// comment that would normally be removed by LLVM
ret
"
}
#[repr(C)]