Implemented runtime files and tests

This commit is contained in:
Max Wash
2020-03-31 12:55:52 +01:00
parent 4cc8e52052
commit 28256512c9
8 changed files with 59 additions and 13 deletions

View File

@@ -14,9 +14,9 @@
#define __have_long32 1
#endif
#ifdef __cplusplus
#if defined(__cplusplus)
extern "C" {
#endif
#endif /* defined(__cplusplus) */
#ifdef __INT8_TYPE__
typedef __INT8_TYPE__ __int8_t;
@@ -236,8 +236,8 @@ typedef __uint64_t __uint_fast64_t;
#undef __EXP
#ifdef __cplusplus
#if defined(__cplusplus)
}
#endif
#endif /* defined(__cplusplus) */
#endif /* _MACHINE__STDINT_H */

View File

@@ -8,7 +8,7 @@
#if defined(__cplusplus)
extern "C" {
#endif
#endif /* defined(__cplusplus) */
typedef __intptr_t ptrdiff_t;
typedef __uintptr_t size_t;
@@ -16,6 +16,6 @@ typedef int wchar_t;
#if defined(__cplusplus)
}
#endif
#endif /* defined(__cplusplus) */
#endif
#endif /* STDDEF_H_ */

View File

@@ -50,4 +50,4 @@ typedef __uintptr_t uintptr_t;
typedef
#endif
#endif /* STDINT_H_ */

View File

@@ -0,0 +1,15 @@
.global _start
.type _start, @function
.extern main
.type main, @function
_start:
pop %rbp
pop %rdi
mov %rsp, %rsi
andq $-16, %rsp
call main
movq %rax, %rdi
movq $60, %rax
syscall