diff options
| author | ruki <[email protected]> | 2020-05-19 23:12:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-19 13:12:57 +0800 |
| commit | 26880aba618ec5aab600170f1d695d34ee742068 (patch) | |
| tree | 19652683a75411bf6dbbca04f1067a3a9e8c6342 /tests/projects/asm/yasm | |
| parent | ea6b12de91048a1fe404bbad8b14ed2a148730a7 (diff) | |
add gas tests
Diffstat (limited to 'tests/projects/asm/yasm')
| -rw-r--r-- | tests/projects/asm/yasm/src/main.S | 20 | ||||
| -rw-r--r-- | tests/projects/asm/yasm/xmake.lua | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/projects/asm/yasm/src/main.S b/tests/projects/asm/yasm/src/main.S new file mode 100644 index 000000000..800722a44 --- /dev/null +++ b/tests/projects/asm/yasm/src/main.S @@ -0,0 +1,20 @@ +bits 64 + +extern _puts + +section .data + +message: + db 'hello xmake!', 0 + +section .text + +global _main +_main: + push rbp + mov rbp, rsp + lea rdi, [rel message] + call _puts + xor rax, rax + pop rbp + ret diff --git a/tests/projects/asm/yasm/xmake.lua b/tests/projects/asm/yasm/xmake.lua new file mode 100644 index 000000000..f728b2ca1 --- /dev/null +++ b/tests/projects/asm/yasm/xmake.lua @@ -0,0 +1,3 @@ +target("test") + set_kind("binary") + add_files("src/*.S") |
