mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
29 lines
588 B
Plaintext
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
|
|
}
|
|
|