Style fixes in libruntime.

This commit is contained in:
Ruben Ayrapetyan
2014-08-12 14:16:05 +04:00
parent aa43e06366
commit b4a29f754a
11 changed files with 830 additions and 673 deletions
+13 -13
View File
@@ -16,7 +16,7 @@
#ifndef LINUX_X86_ASM_H
#define LINUX_X86_ASM_H
FIXME( Implement x86 ABI );
FIXME(Implement x86 ABI);
#error "Not implemented"
/*
@@ -25,11 +25,11 @@ FIXME( Implement x86 ABI );
* syscall
* mov %rax -> ret
*/
#define SYSCALL_1( syscall_no, arg1, ret) \
__asm ( "syscall" \
: "=a" ( ret ) \
#define SYSCALL_1 (syscall_no, arg1, ret) \
__asm ("syscall" \
: "=a" (ret) \
: "a" (syscall_no), "D" (arg1) \
: "rcx", "r11" );
: "rcx", "r11");
/*
* mov syscall_no -> %rax
@@ -38,11 +38,11 @@ FIXME( Implement x86 ABI );
* syscall
* mov %rax -> ret
*/
#define SYSCALL_2( syscall_no, arg1, arg2, ret) \
__asm ( "syscall" \
: "=a" ( ret ) \
#define SYSCALL_2 (syscall_no, arg1, arg2, ret) \
__asm ("syscall" \
: "=a" (ret) \
: "a" (syscall_no), "D" (arg1), "S" (arg2) \
: "rcx", "r11" );
: "rcx", "r11");
/*
* mov syscall_no -> %rax
@@ -52,11 +52,11 @@ FIXME( Implement x86 ABI );
* syscall
* mov %rax -> ret
*/
#define SYSCALL_3( syscall_no, arg1, arg2, arg3, ret) \
__asm ( "syscall" \
: "=a" ( ret ) \
#define SYSCALL_3 (syscall_no, arg1, arg2, arg3, ret) \
__asm ("syscall" \
: "=a" (ret) \
: "a" (syscall_no), "D" (arg1), "S" (arg2), "d" (arg3) \
: "rcx", "r11" );
: "rcx", "r11");
#define _START \
mov (%rsp), %rdi; \