scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 38525701a87109668c97a64fa7d39a54e6ebb84c
parent 7203abbbf68f9bf1fd4aa51673f657e8da4c4fb0
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 19 Dec 2018 11:15:42 +0000

[libc] Fix system generation in some platforms

Diffstat:
Msrc/libc/arch/amd64/dragonfly/gensys.sh | 4++--
Msrc/libc/arch/amd64/dragonfly/syscall.lst | 2+-
Msrc/libc/arch/amd64/linux/syscall.lst | 2+-
Msrc/libc/arch/amd64/longjmp.s | 3++-
Msrc/libc/arch/amd64/netbsd/gensys.sh | 4++--
Msrc/libc/arch/amd64/netbsd/syscall.lst | 2+-
Msrc/libc/arch/amd64/openbsd/gensys.sh | 4++--
Msrc/libc/arch/amd64/openbsd/syscall.lst | 2+-
Msrc/libc/arch/amd64/setjmp.s | 3++-
9 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/libc/arch/amd64/dragonfly/gensys.sh b/src/libc/arch/amd64/dragonfly/gensys.sh @@ -19,8 +19,8 @@ $name: jb 1f retq -1: movl %eax,(errno) - movl \$-1,%eax +1: movq %rax,(errno) + movq \$-1,%rax retq EOF done diff --git a/src/libc/arch/amd64/dragonfly/syscall.lst b/src/libc/arch/amd64/dragonfly/syscall.lst @@ -4,7 +4,7 @@ 4 _write 5 _open 6 _close -17 _brk +17 _brk 20 _getpid 37 _kill 199 _lseek diff --git a/src/libc/arch/amd64/linux/syscall.lst b/src/libc/arch/amd64/linux/syscall.lst @@ -4,7 +4,7 @@ 2 _open 3 _close 8 _lseek -12 _brk +12 _brk 13 _sigaction 39 _getpid 60 _Exit diff --git a/src/libc/arch/amd64/longjmp.s b/src/libc/arch/amd64/longjmp.s @@ -1,7 +1,8 @@ .file "longjmp" .text - .globl longjmp + .globl longjmp,_longjmp +_longjmp: longjmp: mov %rsi,%rax test %rax,%rax diff --git a/src/libc/arch/amd64/netbsd/gensys.sh b/src/libc/arch/amd64/netbsd/gensys.sh @@ -19,8 +19,8 @@ $name: jb 1f retq -1: movl %eax,(errno) - movl \$-1,%eax +1: movq %rax,(errno) + movq \$-1,%rax retq EOF done diff --git a/src/libc/arch/amd64/netbsd/syscall.lst b/src/libc/arch/amd64/netbsd/syscall.lst @@ -4,7 +4,7 @@ 4 _write 5 _open 6 _close -17 _brk +17 _brk 20 _getpid 37 _kill 199 _lseek diff --git a/src/libc/arch/amd64/openbsd/gensys.sh b/src/libc/arch/amd64/openbsd/gensys.sh @@ -19,8 +19,8 @@ $name: jb 1f retq -1: movl %eax,(errno) - movl \$-1,%eax +1: movq %rax,(errno) + movq \$-1,%rax retq EOF done diff --git a/src/libc/arch/amd64/openbsd/syscall.lst b/src/libc/arch/amd64/openbsd/syscall.lst @@ -4,7 +4,7 @@ 4 _write 5 _open 6 _close -17 _brk +17 _brk 20 _getpid 46 _sigaction 122 _kill diff --git a/src/libc/arch/amd64/setjmp.s b/src/libc/arch/amd64/setjmp.s @@ -1,7 +1,8 @@ .file "setjmp.s" .text - .globl setjmp + .globl setjmp,_setjmp +_setjmp: setjmp: mov %rbx,(%rdi) mov %rbp,8(%rdi)