Files
c3c/test/test_suite/asm/naked.c3t
2025-08-04 15:51:49 +02:00

29 lines
588 B
Plaintext

// #target: macos-x64
module testing;
fn void start() @export("_start") @naked @nostrip {
asm {
movq $rax, 0x3c;
movq $rdi, 42;
syscall;
}
}
fn void foo(char a) @naked @nostrip { }
/* #expect: testing.ll
define void @_start() #0 {
entry:
call void asm sideeffect alignstack "movq $$60, %rax\0Amovq $$42, %rdi\0Asyscall \0A", "~{cc},~{rax},~{rcx},~{r8},~{r11},~{flags},~{dirflag},~{fspr}"()
unreachable
}
; Function Attrs: naked nounwind uwtable
define void @testing.foo(i8 zeroext %0) #0 {
entry:
unreachable
}