-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update default asm dialect on asm strings. Fix naked function analysis.
- Loading branch information
Showing
5 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#define COMPILER_VERSION "0.4.681" | ||
#define COMPILER_VERSION "0.4.682" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
// #target: macos-x64 | ||
module testing; | ||
import std::io; | ||
|
||
fn void test() @naked @export("hello") | ||
{ | ||
asm("nop"); | ||
fn void start() @export("_start") @naked @nostrip { | ||
asm { | ||
movq $rax, 0x3c; | ||
movq $rdi, 42; | ||
syscall; | ||
} | ||
} | ||
fn void main() | ||
{ | ||
} | ||
|
||
/* #expect: testing.ll | ||
|
||
define void @_start() #0 { | ||
entry: | ||
call void asm alignstack "movq $$60, %rax\0Amovq $$42, %rdi\0Asyscall \0A", "~{cc},~{rax},~{rcx},~{r8},~{r11},~{flags},~{dirflag},~{fspr}"() | ||
ret void | ||
} | ||
|