diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-07-05 13:05:40 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-07-05 13:05:40 (GMT) |
commit | 5021eb90b9bd2ecc78f108bb9a2c4fb220cc7e9f (patch) | |
tree | 95386640a57e84d6395b7f055b8ff5837c14cae6 /Tests/Assembler/main-linux-x86-gas.s | |
parent | a28b298aa66cee7a033d56fbe70b6556486d9103 (diff) | |
download | CMake-5021eb90b9bd2ecc78f108bb9a2c4fb220cc7e9f.zip CMake-5021eb90b9bd2ecc78f108bb9a2c4fb220cc7e9f.tar.gz CMake-5021eb90b9bd2ecc78f108bb9a2c4fb220cc7e9f.tar.bz2 |
ENH: add a simple assembler test
Alex
Diffstat (limited to 'Tests/Assembler/main-linux-x86-gas.s')
-rw-r--r-- | Tests/Assembler/main-linux-x86-gas.s | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Tests/Assembler/main-linux-x86-gas.s b/Tests/Assembler/main-linux-x86-gas.s new file mode 100644 index 0000000..9e260a3 --- /dev/null +++ b/Tests/Assembler/main-linux-x86-gas.s @@ -0,0 +1,29 @@ + .file "main.c" + .section .rodata + .align 4 +.LC0: + .string "hello assembler world, %d arguments given\n" + .text +.globl main + .type main, @function +main: + leal 4(%esp), %ecx + andl $-16, %esp + pushl -4(%ecx) + pushl %ebp + movl %esp, %ebp + pushl %ecx + subl $20, %esp + movl (%ecx), %eax + movl %eax, 4(%esp) + movl $.LC0, (%esp) + call printf + movl $0, %eax + addl $20, %esp + popl %ecx + popl %ebp + leal -4(%ecx), %esp + ret + .size main, .-main + .ident "GCC: (GNU) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)" + .section .note.GNU-stack,"",@progbits |